Home | History | Annotate | Download | only in examples

Lines Matching defs:device

3  * Example program to list the tracks on a device.
83 dump_tracks(LIBMTP_mtpdevice_t *device, uint32_t storageid, int leaf)
88 files = LIBMTP_Get_Files_And_Folders(device,
92 LIBMTP_Dump_Errorstack(device);
93 LIBMTP_Clear_Errorstack(device);
101 dump_tracks(device, storageid, file->item_id);
105 track = LIBMTP_Get_Trackmetadata(device, file->item_id);
124 fprintf(stdout, "Attempting to connect device(s)\n");
146 /* Successfully connected at least one device, so continue */
155 LIBMTP_mtpdevice_t *device;
159 device = LIBMTP_Open_Raw_Device_Uncached(&rawdevices[i]);
160 if (device == NULL) {
161 fprintf(stderr, "Unable to open raw device %d\n", i);
165 /* Echo the friendly name so we know which device we are working with */
166 friendlyname = LIBMTP_Get_Friendlyname(device);
174 LIBMTP_Dump_Errorstack(device);
175 LIBMTP_Clear_Errorstack(device);
178 for (storage = device->storage; storage != 0; storage = storage->next) {
179 dump_tracks(device, storage->id, LIBMTP_FILES_AND_FOLDERS_ROOT);
182 LIBMTP_Release_Device(device);