aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Meissner <marcus@jet.franken.de>2018-07-22 16:17:32 +0200
committerMarcus Meissner <marcus@jet.franken.de>2018-07-22 16:17:32 +0200
commitacbf559aa97d2c8267ad170a6e79213a2f523356 (patch)
tree766a353ce6d767029c9fde720e316260e791a013
parentd9ad6630a28a1f24ae2d851f7ddde26eca4b5296 (diff)
downloadlibmtp-acbf559aa97d2c8267ad170a6e79213a2f523356.tar.gz
merge device flags with libgphoto2 version
remove unused flag option, now used by libgphoto2
-rw-r--r--src/device-flags.h16
-rw-r--r--src/libmtp.c12
-rw-r--r--src/libusb-glue.h2
3 files changed, 9 insertions, 21 deletions
diff --git a/src/device-flags.h b/src/device-flags.h
index 0a9d8a3..c5466f4 100644
--- a/src/device-flags.h
+++ b/src/device-flags.h
@@ -232,6 +232,12 @@
#define DEVICE_FLAG_NIKON_BROKEN_CAPTURE 0x00100000
/**
+ * To distinguish the V1 series from the DSLRs and handle them
+ * (libgphoto2)
+ */
+#define DEVICE_FLAG_NIKON_1 0x00200000
+
+/**
* Broken capture support where cameras do not send CaptureComplete events.
* (libgphoto2)
*/
@@ -269,14 +275,10 @@
*/
#define DEVICE_FLAG_FORCE_RESET_ON_CLOSE 0x10000000
/**
- * Early Creative Zen (etc) models actually only support
- * command 9805 (Get object property list) and will hang
- * if you try to get individual properties of an object.
- * Or so it seemed. Later bug fixes to the library has made
- * this work flawlessly so the bug flag is moot.
- * NOT USED ANYMORE, THIS FLAG MAY BE RECYCLED.
+ * On 2016 EOS cameras, do not close the session on exiting,
+ * as the device will only report ptp errors afterwards.
*/
-#define DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL 0x20000000
+#define DEVICE_FLAG_DONT_CLOSE_SESSION 0x20000000
/**
* It seems that some devices return an bad data when
* using the GetObjectInfo operation. So in these cases
diff --git a/src/libmtp.c b/src/libmtp.c
index 1df9da9..c0e3f32 100644
--- a/src/libmtp.c
+++ b/src/libmtp.c
@@ -4492,7 +4492,6 @@ LIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *device,
uint32_t const parent)
{
PTPParams *params = (PTPParams *) device->params;
- PTP_USB *ptp_usb = (PTP_USB*) device->usbinfo;
LIBMTP_file_t *retfiles = NULL;
LIBMTP_file_t *curfile = NULL;
PTPObjectHandles currentHandles;
@@ -4508,17 +4507,6 @@ LIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *device,
return NULL;
}
- if (FLAG_BROKEN_GET_OBJECT_PROPVAL(ptp_usb)) {
- // These devices cannot handle the commands needed for
- // Uncached access!
- LIBMTP_ERROR("tried to use %s on an unsupported device, "
- "this command does not work on all devices "
- "due to missing low-level support to read "
- "information on individual tracks\n",
- __func__);
- return NULL;
- }
-
if (storage == 0)
storageid = PTP_GOH_ALL_STORAGE;
else
diff --git a/src/libusb-glue.h b/src/libusb-glue.h
index 0ea6b29..be1fedf 100644
--- a/src/libusb-glue.h
+++ b/src/libusb-glue.h
@@ -168,8 +168,6 @@ int guess_usb_speed(PTP_USB *ptp_usb);
((a)->rawdevice.device_entry.device_flags & DEVICE_FLAG_LONG_TIMEOUT)
#define FLAG_FORCE_RESET_ON_CLOSE(a) \
((a)->rawdevice.device_entry.device_flags & DEVICE_FLAG_FORCE_RESET_ON_CLOSE)
-#define FLAG_BROKEN_GET_OBJECT_PROPVAL(a) \
- ((a)->rawdevice.device_entry.device_flags & DEVICE_FLAG_BROKEN_GET_OBJECT_PROPVAL)
/* connect_first_device return codes */
#define PTP_CD_RC_CONNECTED 0