Home | History | Annotate | Download | only in examples

Lines Matching defs:device

36 void recursive_file_tree(LIBMTP_mtpdevice_t *device,
44 files = LIBMTP_Get_Files_And_Folders(device,
63 recursive_file_tree(device, storage, file->item_id, depth+2);
116 fprintf(stdout, "Attempting to connect device(s)\n");
118 LIBMTP_mtpdevice_t *device;
123 device = LIBMTP_Open_Raw_Device_Uncached(&rawdevices[i]);
124 if (device == NULL) {
125 fprintf(stderr, "Unable to open raw device %d\n", i);
129 LIBMTP_Dump_Errorstack(device);
130 LIBMTP_Clear_Errorstack(device);
132 friendlyname = LIBMTP_Get_Friendlyname(device);
134 printf("Device: (NULL)\n");
136 printf("Device: %s\n", friendlyname);
140 /* Get all storages for this device */
141 ret = LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
148 for (storage = device->storage; storage != 0; storage = storage->next) {
150 recursive_file_tree(device, storage, LIBMTP_FILES_AND_FOLDERS_ROOT, 0);
154 LIBMTP_Release_Device(device);