Home | History | Annotate | Download | only in examples

Lines Matching defs:device

3  * Example program that resets the device.
51 LIBMTP_mtpdevice_t *device;
57 device = LIBMTP_Get_First_Device();
58 if (device == NULL) {
63 printf("I will now reset your device. This means that\n");
64 printf("the device may go inactive immediately and may report errors.\n");
67 ret = LIBMTP_Reset_Device(device);
74 printf("Failed to reset device.\n");
75 LIBMTP_Dump_Errorstack(device);
76 LIBMTP_Clear_Errorstack(device);
77 LIBMTP_Release_Device(device);
81 // It is not possible to release the device after successful reset!
82 // LIBMTP_Release_Device(device);