summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2009-01-19 22:51:17 +0000
committerLinus Walleij <triad@df.lth.se>2009-01-19 22:51:17 +0000
commit7e3b307439ede600ed466095b30ff21133a0923c (patch)
tree7e12e111d75baa7563aea0098a29e74e93f04ab0
parent0b062e868c4eac3d466ea474a3d485c641d3deee (diff)
downloadlibmtp-7e3b307439ede600ed466095b30ff21133a0923c.tar.gz
Updated flags
-rw-r--r--ChangeLog5
-rw-r--r--TODO10
-rw-r--r--src/music-players.h47
-rw-r--r--src/ptp.c240
-rw-r--r--src/ptp.h128
5 files changed, 356 insertions, 74 deletions
diff --git a/ChangeLog b/ChangeLog
index 5f1658e..6b1a18a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-01-16 Linus Walleij <triad@df.lth.se>
+
+ * src/ptp.c: sync to upstream.
+ * src/ptp.h: dito.
+
2009-01-15 Linus Walleij <triad@df.lth.se>
* src/libmtp.c: include fixes from Yuri Pankov for *BSD.
diff --git a/TODO b/TODO
index 7790058..74ad560 100644
--- a/TODO
+++ b/TODO
@@ -34,10 +34,7 @@ COMPATIBILITY fixes:
SPEEDUP fixes:
-1. SPEEDUP: The recursive function that builds the folder tree is
- O(n^2)! Atleast remove all non-folders (PTP associations) from the
- list before we start sorting and building that tree. We walk the
- entire list for each group of siblings right now!
+ None known. libmtp is fast :-)
FEATURE fixes:
@@ -102,3 +99,8 @@ THOSE ARE ALREADY DONE:
8. FEATURE: Integrate libmtp with HAL / D-Bus so applications can dynamically
know when a device has been plugged in or removed. Need a mechanism to
connect a specific hal UDI.
+
+9. SPEEDUP: The recursive function that builds the folder tree is
+ O(n^2)! Atleast remove all non-folders (PTP associations) from the
+ list before we start sorting and building that tree. We walk the
+ entire list for each group of siblings right now!
diff --git a/src/music-players.h b/src/music-players.h
index c5aab4f..100e28a 100644
--- a/src/music-players.h
+++ b/src/music-players.h
@@ -391,30 +391,43 @@
/*
* Toshiba
+ * Tentatively flagged all Toshiba devices with
+ * DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST after one of them
+ * showed erroneous behaviour.
*/
- { "Toshiba", 0x0930, "Gigabeat MEGF-40", 0x0009, DEVICE_FLAG_NONE },
- { "Toshiba", 0x0930, "Gigabeat", 0x000c, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat MEGF-40", 0x0009,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
+ { "Toshiba", 0x0930, "Gigabeat", 0x000c,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Nicholas Tripp
- { "Toshiba", 0x0930, "Gigabeat P20", 0x000f, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat P20", 0x000f,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// From libgphoto2
- { "Toshiba", 0x0930, "Gigabeat S", 0x0010, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
+ { "Toshiba", 0x0930, "Gigabeat S", 0x0010, DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL |
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Rob Brown
- { "Toshiba", 0x0930, "Gigabeat P10", 0x0011, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat P10", 0x0011,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by solanum@users.sourceforge.net
- { "Toshiba", 0x0930, "Gigabeat V30", 0x0014, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat V30", 0x0014,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Michael Davis <slithy@yahoo.com>
- { "Toshiba", 0x0930, "Gigabeat U", 0x0016, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat U", 0x0016,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Devon Jacobs <devo@godevo.com>
{ "Toshiba", 0x0930, "Gigabeat MEU202", 0x0018,
DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Rolf <japan (at) dl3lar.de>
- { "Toshiba", 0x0930, "Gigabeat T", 0x0019, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat T", 0x0019,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by Phil Ingram <ukpbert@users.sourceforge.net>
// Tentatively added - no real reports of this device ID being MTP,
// reports as USB Mass Storage currently.
- { "Toshiba", 0x0930, "Gigabeat MEU201", 0x001a, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat MEU201", 0x001a,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
// Reported by anonymous SourceForge user
- { "Toshiba", 0x0930, "Gigabeat MET401", 0x001d, DEVICE_FLAG_NONE },
+ { "Toshiba", 0x0930, "Gigabeat MET401", 0x001d,
+ DEVICE_FLAG_NO_RELEASE_INTERFACE | DEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST },
/*
@@ -611,16 +624,20 @@
* The iAudio audiophile devices don't encourage the use of MTP.
*/
// Reported by Patrik Johansson <Patrik.Johansson@qivalue.com>
- { "Cowon", 0x0e21, "iAudio U3 (MTP mode)", 0x0701, DEVICE_FLAG_UNLOAD_DRIVER },
+ { "Cowon", 0x0e21, "iAudio U3 (MTP mode)", 0x0701,
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by Kevin Michael Smith <hai-etlik@users.sourceforge.net>
- { "Cowon", 0x0e21, "iAudio 6 (MTP mode)", 0x0711, DEVICE_FLAG_UNLOAD_DRIVER },
+ { "Cowon", 0x0e21, "iAudio 6 (MTP mode)", 0x0711,
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by Roberth Karman
- { "Cowon", 0x0e21, "iAudio 7 (MTP mode)", 0x0751, DEVICE_FLAG_UNLOAD_DRIVER },
+ { "Cowon", 0x0e21, "iAudio 7 (MTP mode)", 0x0751,
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by an anonymous SourceForge user
- { "Cowon", 0x0e21, "iAudio U5 (MTP mode)", 0x0761, DEVICE_FLAG_UNLOAD_DRIVER },
+ { "Cowon", 0x0e21, "iAudio U5 (MTP mode)", 0x0761,
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
// Reported by TJ Something <tjbk_tjb@users.sourceforge.net>
{ "Cowon", 0x0e21, "iAudio D2 (MTP mode)", 0x0801,
- DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL },
+ DEVICE_FLAG_UNLOAD_DRIVER | DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST },
/*
* Insignia, dual-mode.
diff --git a/src/ptp.c b/src/ptp.c
index 886a78e..dae9e12 100644
--- a/src/ptp.c
+++ b/src/ptp.c
@@ -1,8 +1,8 @@
/* ptp.c
*
* Copyright (C) 2001-2004 Mariusz Woloszyn <emsi@ipartners.pl>
- * Copyright (C) 2003-2007 Marcus Meissner <marcus@jet.franken.de>
- * Copyright (C) 2006-2007 Linus Walleij <triad@df.lth.se>
+ * Copyright (C) 2003-2009 Marcus Meissner <marcus@jet.franken.de>
+ * Copyright (C) 2006-2008 Linus Walleij <triad@df.lth.se>
* Copyright (C) 2007 Tero Saarni <tero.saarni@gmail.com>
*
* This library is free software; you can redistribute it and/or
@@ -415,6 +415,22 @@ ptp_getdeviceinfo (PTPParams* params, PTPDeviceInfo* deviceinfo)
return ret;
}
+uint16_t
+ptp_canon_eos_getdeviceinfo (PTPParams* params, unsigned char**di, unsigned long *len )
+{
+ uint16_t ret;
+ PTPContainer ptp;
+ PTPDataHandler handler;
+
+ ptp_init_recv_memory_handler (&handler);
+ PTP_CNT_INIT(ptp);
+ ptp.Code=PTP_OC_CANON_EOS_GetDeviceInfoEx;
+ ptp.Nparam=0;
+ *len=0;
+ ret=ptp_transaction_new(params, &ptp, PTP_DP_GETDATA, 0, &handler);
+ ptp_exit_recv_memory_handler (&handler, di, len);
+ return ret;
+}
/**
* ptp_opensession:
@@ -935,6 +951,30 @@ ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
}
/**
+ * ptp_setobjectprotection:
+ * params: PTPParams*
+ * uint16_t newprot - object protection flag
+ *
+ * Set protection of object.
+ *
+ * Return values: Some PTP_RC_* code.
+ *
+ */
+uint16_t
+ptp_setobjectprotection (PTPParams* params, uint32_t oid, uint16_t newprot)
+{
+ PTPContainer ptp;
+
+ PTP_CNT_INIT(ptp);
+ ptp.Code = PTP_OC_SetObjectProtection;
+ ptp.Param1 = oid;
+ ptp.Param2 = newprot;
+ ptp.Nparam = 2;
+ return ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL);
+}
+
+
+/**
* ptp_sendobject:
* params: PTPParams*
* char* object - contains the object that is to be sent
@@ -2348,6 +2388,26 @@ ptp_nikon_setcontrolmode (PTPParams* params, uint32_t mode)
}
/**
+ * ptp_nikon_afdrive:
+ *
+ * This command runs (drives) the lens autofocus.
+ *
+ * params: PTPParams*
+ *
+ * Return values: Some PTP_RC_* code.
+ *
+ **/
+uint16_t
+ptp_nikon_afdrive (PTPParams* params)
+{
+ PTPContainer ptp;
+
+ PTP_CNT_INIT(ptp);
+ ptp.Code=PTP_OC_NIKON_AfDrive;
+ ptp.Nparam=0;
+ return ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL);
+}
+/**
* ptp_nikon_capture:
*
* This command captures a picture on the Nikon.
@@ -3300,6 +3360,18 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
N_("Shady White Balance Bias")},
{PTP_DPC_NIKON_WhiteBalanceColorTemperature, /* 0xD01e */
N_("White Balance Colour Temperature")},
+ {PTP_DPC_NIKON_WhiteBalancePresetNo, /* 0xD01f */
+ N_("White Balance Preset Number")},
+ {PTP_DPC_NIKON_WhiteBalancePresetVal0, /* 0xD025 */
+ N_("White Balance Preset Value 0")},
+ {PTP_DPC_NIKON_WhiteBalancePresetVal1, /* 0xD026 */
+ N_("White Balance Preset Value 1")},
+ {PTP_DPC_NIKON_WhiteBalancePresetVal2, /* 0xD027 */
+ N_("White Balance Preset Value 2")},
+ {PTP_DPC_NIKON_WhiteBalancePresetVal3, /* 0xD028 */
+ N_("White Balance Preset Value 3")},
+ {PTP_DPC_NIKON_WhiteBalancePresetVal4, /* 0xD029 */
+ N_("White Balance Preset Value 4")},
{PTP_DPC_NIKON_ImageSharpening, /* 0xD02a */
N_("Sharpening")},
{PTP_DPC_NIKON_ToneCompensation, /* 0xD02b */
@@ -3315,13 +3387,15 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
{PTP_DPC_NIKON_CSMMenuBankSelect, /* 0xD040 */
"PTP_DPC_NIKON_CSMMenuBankSelect"},
{PTP_DPC_NIKON_MenuBankNameA, /* 0xD041 */
- "PTP_DPC_NIKON_MenuBankNameA"},
+ N_("Menu Bank Name A")},
{PTP_DPC_NIKON_MenuBankNameB, /* 0xD042 */
- "PTP_DPC_NIKON_MenuBankNameB"},
+ N_("Menu Bank Name B")},
{PTP_DPC_NIKON_MenuBankNameC, /* 0xD043 */
- "PTP_DPC_NIKON_MenuBankNameC"},
+ N_("Menu Bank Name C")},
{PTP_DPC_NIKON_MenuBankNameD, /* 0xD044 */
- "PTP_DPC_NIKON_MenuBankNameD"},
+ N_("Menu Bank Name D")},
+ {PTP_DPC_NIKON_ResetBank, /* 0xD045 */
+ N_("Reset Menu Bank")},
{PTP_DPC_NIKON_A1AFCModePriority, /* 0xD048 */
"PTP_DPC_NIKON_A1AFCModePriority"},
{PTP_DPC_NIKON_A2AFSModePriority, /* 0xD049 */
@@ -3419,19 +3493,26 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
N_("No CF Card Release")},
{PTP_DPC_NIKON_ImageCommentString, /* 0xD090 */
N_("Image Comment String")},
- {PTP_DPC_NIKON_ImageCommentAttach, /* 0xD091 */
- N_("Image Comment Attach")},
+ {PTP_DPC_NIKON_ImageCommentEnable, /* 0xD091 */
+ N_("Image Comment Enable")},
{PTP_DPC_NIKON_ImageRotation, /* 0xD092 */
N_("Image Rotation")},
{PTP_DPC_NIKON_Bracketing, /* 0xD0c0 */
- N_("Exposure Bracketing")},
- {PTP_DPC_NIKON_ExposureBracketingIntervalDist, /* 0xD0c1 */
- N_("Exposure Bracketing Distance")},
- {PTP_DPC_NIKON_BracketingProgram, /* 0xD0c2 */
- N_("Exposure Bracketing Number")},
- {PTP_DPC_NIKON_WhiteBalanceBracketStep, N_("NIKON White Balance Bracket Step")}, /* 0xD0C4 */
+ N_("Bracketing Enable")},
+ {PTP_DPC_NIKON_AutoExposureBracketStep, /* 0xD0c1 */
+ N_("Exposure Bracketing Step")},
+ {PTP_DPC_NIKON_AutoExposureBracketProgram, /* 0xD0c2 */
+ N_("Exposure Bracketing Program")},
+ {PTP_DPC_NIKON_AutoExposureBracketCount, /* 0xD0c3 */
+ N_("Auto Exposure Bracket Count")},
+ {PTP_DPC_NIKON_WhiteBalanceBracketStep, N_("White Balance Bracket Step")}, /* 0xD0C4 */
+ {PTP_DPC_NIKON_WhiteBalanceBracketProgram, N_("White Balance Bracket Program")}, /* 0xD0C5 */
{PTP_DPC_NIKON_LensID, /* 0xD0E0 */
N_("Lens ID")},
+ {PTP_DPC_NIKON_LensSort, /* 0xD0E1 */
+ N_("Lens Sort")},
+ {PTP_DPC_NIKON_LensType, /* 0xD0E2 */
+ N_("Lens Type")},
{PTP_DPC_NIKON_FocalLengthMin, /* 0xD0E3 */
N_("Min. Focal Length")},
{PTP_DPC_NIKON_FocalLengthMax, /* 0xD0E4 */
@@ -3443,23 +3524,34 @@ ptp_get_property_description(PTPParams* params, uint16_t dpc)
{PTP_DPC_NIKON_ExposureTime, /* 0xD100 */
N_("Nikon Exposure Time")},
{PTP_DPC_NIKON_ACPower, N_("AC Power")}, /* 0xD101 */
+ {PTP_DPC_NIKON_WarningStatus, N_("Warning Status")},/* 0xD102 */
{PTP_DPC_NIKON_MaximumShots, /* 0xD103 */
N_("Maximum Shots")},
- {PTP_DPC_NIKON_AFLLock, N_("NIKON AF-L Locked")},/* 0xD104 */
- {PTP_DPC_NIKON_AutoExposureLock, /* 0xD105 */
- N_("Auto Exposure Lock")},
- {PTP_DPC_NIKON_AutoFocusLock, /* 0xD106 */
- N_("Auto Focus Lock")},
+ {PTP_DPC_NIKON_AFLockStatus, N_("AF Locked")},/* 0xD104 */
+ {PTP_DPC_NIKON_AELockStatus, N_("AE Locked")},/* 0xD105 */
+ {PTP_DPC_NIKON_FVLockStatus, N_("FV Locked")},/* 0xD106 */
{PTP_DPC_NIKON_AutofocusLCDTopMode2, /* 0xD107 */
N_("AF LCD Top Mode 2")},
{PTP_DPC_NIKON_AutofocusArea, /* 0xD108 */
N_("Active AF Sensor")},
+ {PTP_DPC_NIKON_FlexibleProgram, /* 0xD109 */
+ N_("Flexible Program")},
{PTP_DPC_NIKON_LightMeter, /* 0xD10a */
N_("Exposure Meter")},
{PTP_DPC_NIKON_CameraOrientation, /* 0xD10e */
N_("Camera Orientation")},
{PTP_DPC_NIKON_ExposureApertureLock, /* 0xD111 */
N_("Exposure Aperture Lock")},
+ {PTP_DPC_NIKON_ExternalFlashAttached, /* 0xD120 */
+ N_("External Flash Attached")},
+ {PTP_DPC_NIKON_ExternalFlashStatus, /* 0xD121 */
+ N_("External Flash Status")},
+ {PTP_DPC_NIKON_ExternalFlashSort, /* 0xD122 */
+ N_("External Flash Sort")},
+ {PTP_DPC_NIKON_ExternalFlashCompensation, /* 0xD124 */
+ N_("External Flash Compensation")},
+ {PTP_DPC_NIKON_NewExternalFlashMode, /* 0xD125 */
+ N_("External Flash Mode")},
{PTP_DPC_NIKON_FlashExposureCompensation, /* 0xD126 */
N_("Flash Exposure Compensation")},
{PTP_DPC_NIKON_OptimizeImage, /* 0xD140 */
@@ -3625,6 +3717,7 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_NIKON_FocalLengthMax, PTP_VENDOR_NIKON, 0.01, 0.0, "%.0f mm"},
{PTP_DPC_NIKON_MaxApAtMinFocalLength, PTP_VENDOR_NIKON, 0.01, 0.0, "f/%.2g"},
{PTP_DPC_NIKON_MaxApAtMaxFocalLength, PTP_VENDOR_NIKON, 0.01, 0.0, "f/%.2g"},
+ {PTP_DPC_NIKON_ExternalFlashCompensation, PTP_VENDOR_NIKON, 1.0/6.0, 0.0,"%.0f"},
{0, 0, 0.0, 0.0, NULL}
};
@@ -3650,16 +3743,25 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_WhiteBalance, PTP_VENDOR_NIKON, 32785, N_("Shade")},
{PTP_DPC_WhiteBalance, PTP_VENDOR_NIKON, 32786, N_("Color Temperature")},
{PTP_DPC_WhiteBalance, PTP_VENDOR_NIKON, 32787, N_("Preset")},
+ {PTP_DPC_FlashMode, 0, 0, N_("Undefined")},
+ {PTP_DPC_FlashMode, 0, 1, N_("Automatic flash")},
+ {PTP_DPC_FlashMode, 0, 2, N_("Flash off")},
+ {PTP_DPC_FlashMode, 0, 3, N_("Fill flash")},
+ {PTP_DPC_FlashMode, 0, 4, N_("Automatic Red-eye Reduction")},
+ {PTP_DPC_FlashMode, 0, 5, N_("Red-eye fill flash")},
+ {PTP_DPC_FlashMode, 0, 6, N_("External sync")},
{PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32784, N_("Default")},
- {PTP_DPC_FlashMode, 0, 4, N_("Red-eye Reduction")},
- {PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32787, N_("Red-eye Reduction + Slow Sync")},
{PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32785, N_("Slow Sync")},
- {PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32785, N_("Rear Curtain Sync + Slow Sync")},
- {PTP_DPC_FocusMeteringMode, 0, 2, N_("Dynamic Area")},
+ {PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32786, N_("Rear Curtain Sync + Slow Sync")},
+ {PTP_DPC_FlashMode, PTP_VENDOR_NIKON, 32787, N_("Red-eye Reduction + Slow Sync")},
+ {PTP_DPC_FocusMeteringMode, 0, 1, N_("Centre-spot")},
+ {PTP_DPC_FocusMeteringMode, 0, 2, N_("Multi-spot")},
{PTP_DPC_FocusMeteringMode, PTP_VENDOR_NIKON, 32784, N_("Single Area")},
{PTP_DPC_FocusMeteringMode, PTP_VENDOR_NIKON, 32785, N_("Closest Subject")},
{PTP_DPC_FocusMeteringMode, PTP_VENDOR_NIKON, 32786, N_("Group Dynamic")},
{PTP_DPC_FocusMode, 0, 1, N_("Manual Focus")},
+ {PTP_DPC_FocusMode, 0, 2, N_("Automatic")},
+ {PTP_DPC_FocusMode, 0, 3, N_("Automatic Macro (close-up)")},
{PTP_DPC_FocusMode, PTP_VENDOR_NIKON, 32784, "AF-S"},
{PTP_DPC_FocusMode, PTP_VENDOR_NIKON, 32785, "AF-C"},
PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_ISOAuto,PTP_VENDOR_NIKON),
@@ -3671,9 +3773,10 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_NIKON_AELAFLMode, PTP_VENDOR_NIKON, 3, N_("AF Lock Hold")},
{PTP_DPC_NIKON_AELAFLMode, PTP_VENDOR_NIKON, 4, N_("AF On")},
{PTP_DPC_NIKON_AELAFLMode, PTP_VENDOR_NIKON, 5, N_("Flash Lock")},
- {PTP_DPC_ExposureMeteringMode, 0, 2, N_("Center Weighted")},
- {PTP_DPC_ExposureMeteringMode, 0, 3, N_("Matrix")},
- {PTP_DPC_ExposureMeteringMode, 0, 4, N_("Spot")},
+ {PTP_DPC_ExposureMeteringMode, 0, 1, N_("Average")},
+ {PTP_DPC_ExposureMeteringMode, 0, 2, N_("Center Weighted Average")},
+ {PTP_DPC_ExposureMeteringMode, 0, 3, N_("Multi-spot")},
+ {PTP_DPC_ExposureMeteringMode, 0, 4, N_("Center-spot")},
{PTP_DPC_ExposureProgramMode, 0, 1, "M"},
{PTP_DPC_ExposureProgramMode, 0, 3, "A"},
{PTP_DPC_ExposureProgramMode, 0, 4, "S"},
@@ -3687,15 +3790,17 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_ExposureProgramMode, PTP_VENDOR_NIKON, 32789, N_("Night Portrait")},
{PTP_DPC_StillCaptureMode, 0, 1, N_("Single Shot")},
{PTP_DPC_StillCaptureMode, 0, 2, N_("Power Wind")},
+ {PTP_DPC_StillCaptureMode, 0, 3, N_("Timelapse")},
{PTP_DPC_StillCaptureMode, PTP_VENDOR_NIKON, 32784, N_("Continuous Low Speed")},
{PTP_DPC_StillCaptureMode, PTP_VENDOR_NIKON, 32785, N_("Timer")},
{PTP_DPC_StillCaptureMode, PTP_VENDOR_NIKON, 32787, N_("Remote")},
{PTP_DPC_StillCaptureMode, PTP_VENDOR_NIKON, 32787, N_("Mirror Up")},
{PTP_DPC_StillCaptureMode, PTP_VENDOR_NIKON, 32788, N_("Timer + Remote")},
- PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_AutofocusMode,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_RBOOL(PTP_DPC_NIKON_AFAssist,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_RBOOL(PTP_DPC_NIKON_ImageReview,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_GridDisplay,PTP_VENDOR_NIKON),
+ {PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 0, N_("AF-S")},
+ {PTP_DPC_NIKON_AutofocusMode, PTP_VENDOR_NIKON, 1, N_("AF-C")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 0, N_("Auto")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 1, N_("Off")},
{PTP_DPC_NIKON_AFAreaIllumination, PTP_VENDOR_NIKON, 2, N_("On")},
@@ -3723,6 +3828,7 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
PTP_VENDOR_VAL_RBOOL(PTP_DPC_NIKON_NoCFCard,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_RBOOL(PTP_DPC_NIKON_ImageRotation,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_Bracketing,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_BOOL(PTP_DPC_NIKON_ImageCommentEnable,PTP_VENDOR_NIKON),
{PTP_DPC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, 0, N_("Centre")},
{PTP_DPC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, 1, N_("Top")},
{PTP_DPC_NIKON_AutofocusArea, PTP_VENDOR_NIKON, 2, N_("Bottom")},
@@ -3774,14 +3880,82 @@ ptp_render_property_value(PTPParams* params, uint16_t dpc,
{PTP_DPC_NIKON_MonitorOff, PTP_VENDOR_NIKON, 5, N_("5 seconds")}, /* d80 observed */
PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_LowLight,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_AFLockStatus,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_AELockStatus,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_FVLockStatus,PTP_VENDOR_NIKON),
+ PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_ACPower,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_YN(PTP_DPC_NIKON_CSMMenu,PTP_VENDOR_NIKON),
PTP_VENDOR_VAL_RBOOL(PTP_DPC_NIKON_BeepOff,PTP_VENDOR_NIKON),
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 0, "1/125"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 1, "1/60"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 2, "1/30"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 3, "1/15"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 4, "1/8"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 5, "1/4"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 6, "1/2"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 7, "1"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 8, "2"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 9, "4"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 10, "8"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 11, "15"},
+ {PTP_DPC_NIKON_ISOAuto, PTP_VENDOR_NIKON, 12, "30"},
+
{PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, 0, "0'"},
{PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, 1, "270'"},
{PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, 2, "90'"},
{PTP_DPC_NIKON_CameraOrientation, PTP_VENDOR_NIKON, 3, "180'"},
+ {PTP_DPC_NIKON_SelfTimer, PTP_VENDOR_NIKON, 0, N_("2 seconds")},
+ {PTP_DPC_NIKON_SelfTimer, PTP_VENDOR_NIKON, 1, N_("5 seconds")},
+ {PTP_DPC_NIKON_SelfTimer, PTP_VENDOR_NIKON, 2, N_("10 seconds")},
+ {PTP_DPC_NIKON_SelfTimer, PTP_VENDOR_NIKON, 3, N_("20 seconds")},
+
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 0, N_("4 seconds")},
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 1, N_("6 seconds")},
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 2, N_("8 seconds")},
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 3, N_("16 seconds")},
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 4, N_("30 minutes")},
+ {PTP_DPC_NIKON_MeterOff, PTP_VENDOR_NIKON, 5, N_("30 seconds")},
+
+ {PTP_DPC_NIKON_BracketSet, PTP_VENDOR_NIKON, 0, N_("AE & Flash")},
+ {PTP_DPC_NIKON_BracketSet, PTP_VENDOR_NIKON, 1, N_("AE only")},
+ {PTP_DPC_NIKON_BracketSet, PTP_VENDOR_NIKON, 2, N_("Flash only")},
+ {PTP_DPC_NIKON_BracketSet, PTP_VENDOR_NIKON, 3, N_("WB bracketing")},
+
+ {PTP_DPC_NIKON_BracketOrder, PTP_VENDOR_NIKON, 0, N_("MTR > Under")},
+ {PTP_DPC_NIKON_BracketOrder, PTP_VENDOR_NIKON, 1, N_("Under > MTR")},
+
+ {PTP_DPC_NIKON_FlashCommanderMode, PTP_VENDOR_NIKON, 0, N_("TTL")},
+ {PTP_DPC_NIKON_FlashCommanderMode, PTP_VENDOR_NIKON, 1, N_("Auto Aperture")},
+ {PTP_DPC_NIKON_FlashCommanderMode, PTP_VENDOR_NIKON, 2, N_("Full Manual")},
+
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 0, N_("Full")},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 1, "1/2"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 2, "1/4"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 3, "1/8"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 4, "1/16"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 5, "1/32"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 6, "1/64"},
+ {PTP_DPC_NIKON_FlashModeCommanderPower, PTP_VENDOR_NIKON, 7, "1/128"},
+
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 0, "1/125"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 1, "1/60"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 2, "1/30"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 3, "1/15"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 4, "1/8"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 5, "1/4"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 6, "1/2"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 7, "1"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 8, "2"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 9, "4"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 10, "8"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 11, "15"},
+ {PTP_DPC_NIKON_PADVPMode, PTP_VENDOR_NIKON, 12, "30"},
+
+ {PTP_DPC_NIKON_EVStep, PTP_VENDOR_NIKON, 0, "1/3"},
+ {PTP_DPC_NIKON_EVStep, PTP_VENDOR_NIKON, 1, "1/2"},
+
/* Canon stuff */
PTP_VENDOR_VAL_BOOL(PTP_DPC_CANON_AssistLight,PTP_VENDOR_CANON),
PTP_VENDOR_VAL_RBOOL(PTP_DPC_CANON_RotationScene,PTP_VENDOR_CANON),
@@ -4562,14 +4736,18 @@ ptp_remove_object_from_cache(PTPParams *params, uint32_t handle)
for (i = 0; i < params->handles.n; i++) {
if (params->handles.Handler[i] == handle) {
ptp_free_objectinfo(&params->objectinfo[i]);
- memmove(params->handles.Handler+i, params->handles.Handler+i+1,
- (params->handles.n-i-1)*sizeof(uint32_t));
- memmove(params->objectinfo+i, params->objectinfo+i+1,
- (params->handles.n-i-1)*sizeof(PTPObjectInfo));
+
+ if (i < params->handles.n-1) {
+ memmove(params->handles.Handler+i, params->handles.Handler+i+1,
+ (params->handles.n-i-1)*sizeof(uint32_t));
+ memmove(params->objectinfo+i, params->objectinfo+i+1,
+ (params->handles.n-i-1)*sizeof(PTPObjectInfo));
+ }
params->handles.n--;
/* We use less memory than before so this shouldn't fail */
params->handles.Handler = realloc(params->handles.Handler, sizeof(uint32_t)*params->handles.n);
params->objectinfo = realloc(params->objectinfo, sizeof(PTPObjectInfo)*params->handles.n);
+ break;
}
}
diff --git a/src/ptp.h b/src/ptp.h
index 28c96d3..5c0b159 100644
--- a/src/ptp.h
+++ b/src/ptp.h
@@ -1,6 +1,8 @@
/* ptp.h
*
* Copyright (C) 2001 Mariusz Woloszyn <emsi@ipartners.pl>
+ * Copyright (C) 2003-2009 Marcus Meissner <marcus@jet.franken.de>
+ * Copyright (C) 2006-2008 Linus Walleij <triad@df.lth.se>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -356,6 +358,20 @@ typedef struct _PTPIPHeader PTPIPHeader;
#define PTP_OC_NIKON_SetPreWBData 0x90C9 /* 3 params, data out */
/* 0x90CA */
#define PTP_OC_NIKON_AfCaptureSDRAM 0x90CB /* no params, no data */
+#define PTP_OC_NIKON_GetPictCtrlData 0x90CC
+#define PTP_OC_NIKON_SetPictCtrlData 0x90CD
+#define PTP_OC_NIKON_DelCstPicCtrl 0x90CE
+#define PTP_OC_NIKON_GetQuickParam 0x90CF
+
+/* Nikon Liveview stuff */
+#define PTP_OC_NIKON_GetPreviewImg 0x9200
+#define PTP_OC_NIKON_StartLiveView 0x9201
+#define PTP_OC_NIKON_EndLiveView 0x9202
+#define PTP_OC_NIKON_GetLiveViewImg 0x9203
+#define PTP_OC_NIKON_MfDrive 0x9204
+#define PTP_OC_NIKON_ChangeAfDrive 0x9205
+#define PTP_OC_NIKON_AfDriveCancel 0x9206
+
#define PTP_OC_NIKON_GetDevicePTPIPInfo 0x90E0
/* Microsoft / MTP extension codes */
@@ -492,6 +508,9 @@ typedef struct _PTPIPHeader PTPIPHeader;
/* Nikon specific response codes */
#define PTP_RC_NIKON_AdvancedTransferCancel 0xA022
+/* Canon specific response codes */
+#define PTP_RC_CANON_A009 0xA009
+
/* Microsoft/MTP specific codes */
#define PTP_RC_MTP_Undefined 0xA800
#define PTP_RC_MTP_Invalid_ObjectPropCode 0xA801
@@ -1179,6 +1198,7 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_ShootingBankNameB 0xD012
#define PTP_DPC_NIKON_ShootingBankNameC 0xD013
#define PTP_DPC_NIKON_ShootingBankNameD 0xD014
+#define PTP_DPC_NIKON_ResetBank0 0xD015
#define PTP_DPC_NIKON_RawCompression 0xD016
#define PTP_DPC_NIKON_WhiteBalanceAutoBias 0xD017
#define PTP_DPC_NIKON_WhiteBalanceTungstenBias 0xD018
@@ -1188,17 +1208,31 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_WhiteBalanceCloudyBias 0xD01C
#define PTP_DPC_NIKON_WhiteBalanceShadeBias 0xD01D
#define PTP_DPC_NIKON_WhiteBalanceColorTemperature 0xD01E
+#define PTP_DPC_NIKON_WhiteBalancePresetNo 0xD01F
+#define PTP_DPC_NIKON_WhiteBalancePresetName0 0xD020
+#define PTP_DPC_NIKON_WhiteBalancePresetName1 0xD021
+#define PTP_DPC_NIKON_WhiteBalancePresetName2 0xD022
+#define PTP_DPC_NIKON_WhiteBalancePresetName3 0xD023
+#define PTP_DPC_NIKON_WhiteBalancePresetName4 0xD024
+#define PTP_DPC_NIKON_WhiteBalancePresetVal0 0xD025
+#define PTP_DPC_NIKON_WhiteBalancePresetVal1 0xD026
+#define PTP_DPC_NIKON_WhiteBalancePresetVal2 0xD027
+#define PTP_DPC_NIKON_WhiteBalancePresetVal3 0xD028
+#define PTP_DPC_NIKON_WhiteBalancePresetVal4 0xD029
#define PTP_DPC_NIKON_ImageSharpening 0xD02A
#define PTP_DPC_NIKON_ToneCompensation 0xD02B
#define PTP_DPC_NIKON_ColorModel 0xD02C
#define PTP_DPC_NIKON_HueAdjustment 0xD02D
#define PTP_DPC_NIKON_NonCPULensDataFocalLength 0xD02E
#define PTP_DPC_NIKON_NonCPULensDataMaximumAperture 0xD02F
+#define PTP_DPC_NIKON_JPEG_Compression_Policy 0xD031
+#define PTP_DPC_NIKON_ColorSpace 0xD032
#define PTP_DPC_NIKON_CSMMenuBankSelect 0xD040
#define PTP_DPC_NIKON_MenuBankNameA 0xD041
#define PTP_DPC_NIKON_MenuBankNameB 0xD042
#define PTP_DPC_NIKON_MenuBankNameC 0xD043
#define PTP_DPC_NIKON_MenuBankNameD 0xD044
+#define PTP_DPC_NIKON_ResetBank 0xD045
#define PTP_DPC_NIKON_A1AFCModePriority 0xD048
#define PTP_DPC_NIKON_A2AFSModePriority 0xD049
#define PTP_DPC_NIKON_A3GroupDynamicAF 0xD04A
@@ -1208,12 +1242,17 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_FocusAreaIllumWhenSelected 0xD04E
#define PTP_DPC_NIKON_FocusAreaWrap 0xD04F
#define PTP_DPC_NIKON_A7VerticalAFON 0xD050
+#define PTP_DPC_NIKON_AFLockOn 0xD051
+#define PTP_DPC_NIKON_FocusAreaZone 0xD052
#define PTP_DPC_NIKON_ISOAuto 0xD054
-#define PTP_DPC_NIKON_B2ISOStep 0xD055
-#define PTP_DPC_NIKON_EVStep 0xD056
-#define PTP_DPC_NIKON_B4ExposureCompEv 0xD057
+#define PTP_DPC_NIKON_B2ISOStep 0xD055 /* EV Step ISO */
+#define PTP_DPC_NIKON_EVStep 0xD056 /* EV Step SS FN */
+#define PTP_DPC_NIKON_B4ExposureCompEv 0xD057 /* EV Step Exposure Compensation */
#define PTP_DPC_NIKON_ExposureCompensation 0xD058
#define PTP_DPC_NIKON_CenterWeightArea 0xD059
+#define PTP_DPC_NIKON_ExposureBaseMatrix 0xD05A
+#define PTP_DPC_NIKON_ExposureBaseCenter 0xD05B
+#define PTP_DPC_NIKON_ExposureBaseSpot 0xD05C
#define PTP_DPC_NIKON_AELockMode 0xD05E
#define PTP_DPC_NIKON_AELAFLMode 0xD05F
#define PTP_DPC_NIKON_MeterOff 0xD062
@@ -1227,70 +1266,108 @@ typedef struct _PTPCanon_Property {
#define PTP_DPC_NIKON_D6ControlPanelFinderRearControl 0xD06D
#define PTP_DPC_NIKON_ControlPanelFinderViewfinder 0xD06E
#define PTP_DPC_NIKON_D7Illumination 0xD06F
+#define PTP_DPC_NIKON_NrHighISO 0xD070
#define PTP_DPC_NIKON_E1FlashSyncSpeed 0xD074
-#define PTP_DPC_NIKON_FlashShutterSpeed 0xD075
+#define PTP_DPC_NIKON_FlashShutterSpeed 0xD075 /* SB Low Limit */
#define PTP_DPC_NIKON_E3AAFlashMode 0xD076
#define PTP_DPC_NIKON_E4ModelingFlash 0xD077
-#define PTP_DPC_NIKON_BracketSet 0xD078
-#define PTP_DPC_NIKON_E6ManualModeBracketing 0xD079
+#define PTP_DPC_NIKON_BracketSet 0xD078 /* Bracket Type? */
+#define PTP_DPC_NIKON_E6ManualModeBracketing 0xD079 /* Bracket Factor? */
#define PTP_DPC_NIKON_BracketOrder 0xD07A
-#define PTP_DPC_NIKON_E8AutoBracketSelection 0xD07B
+#define PTP_DPC_NIKON_E8AutoBracketSelection 0xD07B /* Bracket Method? */
#define PTP_DPC_NIKON_BracketingSet 0xD07C
#define PTP_DPC_NIKON_F1CenterButtonShootingMode 0xD080
#define PTP_DPC_NIKON_CenterButtonPlaybackMode 0xD081
#define PTP_DPC_NIKON_F2Multiselector 0xD082
-#define PTP_DPC_NIKON_F3PhotoInfoPlayback 0xD083
-#define PTP_DPC_NIKON_F4AssignFuncButton 0xD084
-#define PTP_DPC_NIKON_F5CustomizeCommDials 0xD085
-#define PTP_DPC_NIKON_ReverseCommandDial 0xD086
-#define PTP_DPC_NIKON_ApertureSetting 0xD087
-#define PTP_DPC_NIKON_MenusAndPlayback 0xD088
-#define PTP_DPC_NIKON_F6ButtonsAndDials 0xD089
+#define PTP_DPC_NIKON_F3PhotoInfoPlayback 0xD083 /* MultiSelector Dir */
+#define PTP_DPC_NIKON_F4AssignFuncButton 0xD084 /* CMD Dial Rotate */
+#define PTP_DPC_NIKON_F5CustomizeCommDials 0xD085 /* CMD Dial Change */
+#define PTP_DPC_NIKON_ReverseCommandDial 0xD086 /* CMD Dial FN Set */
+#define PTP_DPC_NIKON_ApertureSetting 0xD087 /* CMD Dial Active */
+#define PTP_DPC_NIKON_MenusAndPlayback 0xD088 /* Universal Mode */
+#define PTP_DPC_NIKON_F6ButtonsAndDials 0xD089 /* Enable Shutter */
#define PTP_DPC_NIKON_NoCFCard 0xD08A
+#define PTP_DPC_NIKON_CenterButtonZoomRatio 0xD08B
#define PTP_DPC_NIKON_ImageCommentString 0xD090
-#define PTP_DPC_NIKON_ImageCommentAttach 0xD091
+#define PTP_DPC_NIKON_ImageCommentEnable 0xD091
#define PTP_DPC_NIKON_ImageRotation 0xD092
#define PTP_DPC_NIKON_Bracketing 0xD0C0
-#define PTP_DPC_NIKON_ExposureBracketingIntervalDist 0xD0C1
-#define PTP_DPC_NIKON_BracketingProgram 0xD0C2
+#define PTP_DPC_NIKON_AutoExposureBracketStep 0xD0C1
+#define PTP_DPC_NIKON_AutoExposureBracketProgram 0xD0C2
+#define PTP_DPC_NIKON_AutoExposureBracketCount 0xD0C3
#define PTP_DPC_NIKON_WhiteBalanceBracketStep 0xD0C4
+#define PTP_DPC_NIKON_WhiteBalanceBracketProgram 0xD0C5
#define PTP_DPC_NIKON_LensID 0xD0E0
+#define PTP_DPC_NIKON_LensSort 0xD0E1
+#define PTP_DPC_NIKON_LensType 0xD0E2
#define PTP_DPC_NIKON_FocalLengthMin 0xD0E3
#define PTP_DPC_NIKON_FocalLengthMax 0xD0E4
#define PTP_DPC_NIKON_MaxApAtMinFocalLength 0xD0E5
#define PTP_DPC_NIKON_MaxApAtMaxFocalLength 0xD0E6
#define PTP_DPC_NIKON_ExposureTime 0xD100
#define PTP_DPC_NIKON_ACPower 0xD101
-#define PTP_DPC_NIKON_MaximumShots 0xD103
-#define PTP_DPC_NIKON_AFLLock 0xD104
-#define PTP_DPC_NIKON_AutoExposureLock 0xD105
-#define PTP_DPC_NIKON_AutoFocusLock 0xD106
+#define PTP_DPC_NIKON_WarningStatus 0xD102
+#define PTP_DPC_NIKON_MaximumShots 0xD103 /* remain shots (in RAM buffer?) */
+#define PTP_DPC_NIKON_AFLockStatus 0xD104
+#define PTP_DPC_NIKON_AELockStatus 0xD105
+#define PTP_DPC_NIKON_FVLockStatus 0xD106
#define PTP_DPC_NIKON_AutofocusLCDTopMode2 0xD107
#define PTP_DPC_NIKON_AutofocusArea 0xD108
-#define PTP_DPC_NIKON_LightMeter 0xD10A
+#define PTP_DPC_NIKON_FlexibleProgram 0xD109
+#define PTP_DPC_NIKON_LightMeter 0xD10A /* Exposure Status */
+#define PTP_DPC_NIKON_USBSpeed 0xD10C
#define PTP_DPC_NIKON_CameraOrientation 0xD10E
+#define PTP_DPC_NIKON_GroupPtnType 0xD10F
#define PTP_DPC_NIKON_ExposureApertureLock 0xD111
+#define PTP_DPC_NIKON_ExternalFlashAttached 0xD120
+#define PTP_DPC_NIKON_ExternalFlashStatus 0xD121
+#define PTP_DPC_NIKON_ExternalFlashSort 0xD122
+#define PTP_DPC_NIKON_ExternalFlashCompensation 0xD124
+#define PTP_DPC_NIKON_NewExternalFlashMode 0xD125
#define PTP_DPC_NIKON_FlashExposureCompensation 0xD126
#define PTP_DPC_NIKON_OptimizeImage 0xD140
#define PTP_DPC_NIKON_Saturation 0xD142
+#define PTP_DPC_NIKON_BW_FillerEffect 0xD143
+#define PTP_DPC_NIKON_BW_Sharpness 0xD144
+#define PTP_DPC_NIKON_BW_Contrast 0xD145
+#define PTP_DPC_NIKON_BW_Setting_Type 0xD146
#define PTP_DPC_NIKON_BeepOff 0xD160
#define PTP_DPC_NIKON_AutofocusMode 0xD161
#define PTP_DPC_NIKON_AFAssist 0xD163
-#define PTP_DPC_NIKON_PADVPMode 0xD164
+#define PTP_DPC_NIKON_PADVPMode 0xD164 /* iso auto time */
#define PTP_DPC_NIKON_ImageReview 0xD165
#define PTP_DPC_NIKON_AFAreaIllumination 0xD166
#define PTP_DPC_NIKON_FlashMode 0xD167
#define PTP_DPC_NIKON_FlashCommanderMode 0xD168
#define PTP_DPC_NIKON_FlashSign 0xD169
+#define PTP_DPC_NIKON_ISO_Auto 0xD16A
#define PTP_DPC_NIKON_RemoteTimeout 0xD16B
#define PTP_DPC_NIKON_GridDisplay 0xD16C
#define PTP_DPC_NIKON_FlashModeManualPower 0xD16D
#define PTP_DPC_NIKON_FlashModeCommanderPower 0xD16E
+#define PTP_DPC_NIKON_AutoFP 0xD16F
#define PTP_DPC_NIKON_CSMMenu 0xD180
+#define PTP_DPC_NIKON_WarningDisplay 0xD181
+#define PTP_DPC_NIKON_BatteryCellKind 0xD182
+#define PTP_DPC_NIKON_ISOAutoHiLimit 0xD183
#define PTP_DPC_NIKON_BracketingFramesAndSteps 0xD190
-#define PTP_DPC_NIKON_LowLight 0xD1B0
+#define PTP_DPC_NIKON_LowLight 0xD1B0 /* exp disp status */
+#define PTP_DPC_NIKON_ExposureIndicateStatus 0xD1B1 /* exp indicate status */
#define PTP_DPC_NIKON_FlashOpen 0xD1C0
#define PTP_DPC_NIKON_FlashCharged 0xD1C1
+#define PTP_DPC_NIKON_FlashMRepeatValue 0xD1D0
+#define PTP_DPC_NIKON_FlashMRepeatCount 0xD1D1
+#define PTP_DPC_NIKON_FlashMRepeatInterval 0xD1D2
+#define PTP_DPC_NIKON_FlashCommandChannel 0xD1D3
+#define PTP_DPC_NIKON_FlashCommandSelfMode 0xD1D4
+#define PTP_DPC_NIKON_FlashCommandSelfCompensation 0xD1D5
+#define PTP_DPC_NIKON_FlashCommandSelfValue 0xD1D6
+#define PTP_DPC_NIKON_FlashCommandAMode 0xD1D7
+#define PTP_DPC_NIKON_FlashCommandACompensation 0xD1D8
+#define PTP_DPC_NIKON_FlashCommandAValue 0xD1D9
+#define PTP_DPC_NIKON_FlashCommandBMode 0xD1DA
+#define PTP_DPC_NIKON_FlashCommandBCompensation 0xD1DB
+#define PTP_DPC_NIKON_FlashCommandBValue 0xD1DC
/* Microsoft/MTP specific */
#define PTP_DPC_MTP_SecureTime 0xD101
@@ -1674,6 +1751,7 @@ uint16_t ptp_deleteobject (PTPParams* params, uint32_t handle,
uint16_t ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
uint32_t* parenthandle, uint32_t* handle,
PTPObjectInfo* objectinfo);
+uint16_t ptp_setobjectprotection (PTPParams* params, uint32_t oid, uint16_t newprot);
uint16_t ptp_sendobject (PTPParams* params, unsigned char* object,
uint32_t size);
uint16_t ptp_sendobject_fromfd (PTPParams* params, int fd, uint32_t size);
@@ -1757,6 +1835,7 @@ uint16_t ptp_canon_getobjectinfo (PTPParams* params, uint32_t store,
uint32_t handle,
PTPCANONFolderEntry** entries,
uint32_t* entnum);
+uint16_t ptp_canon_eos_getdeviceinfo (PTPParams* params, unsigned char**di, unsigned long *len );
uint16_t ptp_canon_get_objecthandle_by_name (PTPParams* params, char* name, uint32_t* objectid);
uint16_t ptp_canon_get_directory (PTPParams* params, PTPObjectHandles *handles, PTPObjectInfo **oinfos, uint32_t **flags);
uint16_t ptp_canon_setobjectarchive (PTPParams* params, uint32_t oid, uint32_t flags);
@@ -1784,6 +1863,7 @@ uint16_t ptp_nikon_getwifiprofilelist (PTPParams* params);
uint16_t ptp_nikon_writewifiprofile (PTPParams* params, PTPNIKONWifiProfile* profile);
uint16_t ptp_nikon_deletewifiprofile (PTPParams* params, uint32_t profilenr);
uint16_t ptp_nikon_setcontrolmode (PTPParams* params, uint32_t mode);
+uint16_t ptp_nikon_afdrive (PTPParams* params);
uint16_t ptp_nikon_capture (PTPParams* params, uint32_t x);
uint16_t ptp_nikon_capture_sdram (PTPParams* params);
uint16_t ptp_nikon_check_event (PTPParams* params, PTPUSBEventContainer **evt, int *evtcnt);