From 237a9f9e17e26acc40105e724ab1ec7dbfe34582 Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Sun, 16 Apr 2023 10:40:24 +0200 Subject: remove dependency on ptp.h --- examples/files.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/files.c b/examples/files.c index 3ee0846..d7d46fe 100644 --- a/examples/files.c +++ b/examples/files.c @@ -21,7 +21,6 @@ * Boston, MA 02111-1307, USA. */ #include "common.h" -#include "ptp.h" #include static void dump_fileinfo(LIBMTP_file_t *file) @@ -118,8 +117,8 @@ int main(int argc, char **argv) for (i = 0; i < numrawdevices; i++) { LIBMTP_mtpdevice_t *device; LIBMTP_devicestorage_t *storage; - PTPParams *params; char *friendlyname; + char *serialnr; device = LIBMTP_Open_Raw_Device_Uncached(&rawdevices[i]); if (device == NULL) { @@ -129,13 +128,13 @@ int main(int argc, char **argv) /* Echo the friendly name so we know which device we are working with */ friendlyname = LIBMTP_Get_Friendlyname(device); - params = (PTPParams *) device->params; + serialnr = LIBMTP_Get_Serialnumber(device); if (friendlyname == NULL) { printf("Listing File Information on Device with name: (NULL) [SN:%s]\n", - params->deviceinfo.SerialNumber); + serialnr); } else { printf("Listing File Information on Device with name: %s [SN:%s]\n", - friendlyname, params->deviceinfo.SerialNumber); + friendlyname, serialnr); free(friendlyname); } -- cgit v1.2.1