Home | History | Annotate | Download | only in examples

Lines Matching defs:device

3  * Example program that lists all folders on a device.
49 printf("Attempting to connect device(s)\n");
69 /* Successfully connected at least one device, so continue */
76 LIBMTP_mtpdevice_t *device;
81 device = LIBMTP_Open_Raw_Device(&rawdevices[i]);
82 if (device == NULL) {
83 fprintf(stderr, "Unable to open raw device %d\n", i);
87 /* Echo the friendly name so we know which device we are working with */
88 friendlyname = LIBMTP_Get_Friendlyname(device);
96 LIBMTP_Dump_Errorstack(device);
97 LIBMTP_Clear_Errorstack(device);
99 /* Get all storages for this device */
100 ret = LIBMTP_Get_Storage(device, LIBMTP_STORAGE_SORTBY_NOTSORTED);
103 LIBMTP_Dump_Errorstack(device);
104 LIBMTP_Clear_Errorstack(device);
109 for (storage = device->storage; storage != 0; storage = storage->next) {
113 folders = LIBMTP_Get_Folder_List_For_Storage(device, storage->id);
117 LIBMTP_Dump_Errorstack(device);
118 LIBMTP_Clear_Errorstack(device);
124 LIBMTP_Release_Device(device);