191
191
/* Canon extension Operation Codes */
192
192
#define PTP_OC_CANON_GetPartialObjectInfo 0x9001
193
/* 9002 - sends 2 uint32, nothing back */
193
194
#define PTP_OC_CANON_SetObjectArchive 0x9002
194
/* 9002 - sends 2 uint32, nothing back */
195
#define PTP_OC_CANON_9003 0x9003
196
/* 9003 - sends nothing, nothing back */
197
/* no 9004 observed yet */
198
/* no 9005 observed yet */
195
#define PTP_OC_CANON_KeepDeviceOn 0x9003
196
#define PTP_OC_CANON_LockDeviceUI 0x9004
197
#define PTP_OC_CANON_UnlockDeviceUI 0x9005
199
198
#define PTP_OC_CANON_GetObjectHandleByName 0x9006
200
199
/* no 9007 observed yet */
201
#define PTP_OC_CANON_StartShootingMode 0x9008
202
#define PTP_OC_CANON_EndShootingMode 0x9009
203
/* 900a - sends nothing, nothing back */
204
#define PTP_OC_CANON_900a 0x900A
200
#define PTP_OC_CANON_InitiateReleaseControl 0x9008
201
#define PTP_OC_CANON_TerminateReleaseControl 0x9009
202
#define PTP_OC_CANON_TerminatePlaybackMode 0x900A
205
203
#define PTP_OC_CANON_ViewfinderOn 0x900B
206
204
#define PTP_OC_CANON_ViewfinderOff 0x900C
207
205
#define PTP_OC_CANON_DoAeAfAwb 0x900D
211
209
#define PTP_OC_CANON_GetCustomizeItemInfo 0x900F
212
210
#define PTP_OC_CANON_GetCustomizeData 0x9010
213
211
#define PTP_OC_CANON_SetCustomizeData 0x9011
215
/* initiate movie capture:
216
9010 startmoviecapture?
217
9003 stopmoviecapture?
212
#define PTP_OC_CANON_GetCaptureStatus 0x9012
220
213
#define PTP_OC_CANON_CheckEvent 0x9013
221
214
#define PTP_OC_CANON_FocusLock 0x9014
222
215
#define PTP_OC_CANON_FocusUnlock 0x9015
216
#define PTP_OC_CANON_GetLocalReleaseParam 0x9016
217
#define PTP_OC_CANON_SetLocalReleaseParam 0x9017
218
#define PTP_OC_CANON_AskAboutPcEvf 0x9018
219
#define PTP_OC_CANON_SendPartialObject 0x9019
223
220
#define PTP_OC_CANON_InitiateCaptureInMemory 0x901A
224
221
#define PTP_OC_CANON_GetPartialObjectEx 0x901B
225
222
#define PTP_OC_CANON_SetObjectTime 0x901C
226
223
#define PTP_OC_CANON_GetViewfinderImage 0x901D
224
#define PTP_OC_CANON_GetObjectAttributes 0x901E
227
225
#define PTP_OC_CANON_ChangeUSBProtocol 0x901F
228
226
#define PTP_OC_CANON_GetChanges 0x9020
229
227
#define PTP_OC_CANON_GetObjectInfoEx 0x9021
228
#define PTP_OC_CANON_InitiateDirectTransfer 0x9022
231
229
#define PTP_OC_CANON_TerminateDirectTransfer 0x9023
233
#define PTP_OC_CANON_InitiateDirectTransferEx2 0x9028
234
#define PTP_OC_CANON_GetTargetHandles 0x9029
230
#define PTP_OC_CANON_SendObjectInfoByPath 0x9024
231
#define PTP_OC_CANON_SendObjectByPath 0x9025
232
#define PTP_OC_CANON_InitiateDirectTansferEx 0x9026
233
#define PTP_OC_CANON_GetAncillaryObjectHandles 0x9027
234
#define PTP_OC_CANON_GetTreeInfo 0x9028
235
#define PTP_OC_CANON_GetTreeSize 0x9029
235
236
#define PTP_OC_CANON_NotifyProgress 0x902A
236
237
#define PTP_OC_CANON_NotifyCancelAccepted 0x902B
237
238
/* 902c: no parms, read 3 uint32 in data, no response parms */
247
248
#define PTP_OC_CANON_PairingComplete 0x9035
248
249
#define PTP_OC_CANON_GetWirelessMAXChannel 0x9036
251
/* 9101: no args, 8 byte data (01 00 00 00 00 00 00 00), no resp data. */
252
#define PTP_OC_CANON_EOS_GetStorageIDs 0x9101
254
* 0x28 bytes of data:
255
00000000: 34 00 00 00 02 00 02 91 0a 00 00 00 04 00 03 00
256
00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
257
00000020: 00 00 ff ff ff ff 03 43 00 46 00 00 00 03 41 00
258
00000030: 3a 00 00 00
261
#define PTP_OC_CANON_EOS_GetStorageInfo 0x9102
262
#define PTP_OC_CANON_EOS_GetObjectInfo 0x9103
263
#define PTP_OC_CANON_EOS_GetObject 0x9104
264
#define PTP_OC_CANON_EOS_DeleteObject 0x9105
265
#define PTP_OC_CANON_EOS_FormatStore 0x9106
266
#define PTP_OC_CANON_EOS_GetPartialObject 0x9107
267
#define PTP_OC_CANON_EOS_GetDeviceInfoEx 0x9108
270
* 3 cmdargs: 1,0xffffffff,00 00 10 00;
272
00000000: 48 00 00 00 02 00 09 91 12 00 00 00 01 00 00 00
273
00000010: 38 00 00 00 00 00 00 30 01 00 00 00 01 30 00 00
274
00000020: 01 00 00 00 10 00 00 00 00 00 00 00 00 00 00 20
275
00000030: 00 00 00 30 44 43 49 4d 00 00 00 00 00 00 00 00 DCIM
276
00000040: 00 00 00 00 cc c3 01 46
277
* 2 respargs: 0x0, 0x3c
281
00000000: 18 00 00 00 01 00 09 91 15 00 00 00 01 00 00 00
282
00000010: 00 00 00 30 00 00 10 00
284
00000000: 48 00 00 00 02 00 09 91 15 00 00 00 01 00 00 00
285
00000010: 38 00 00 00 00 00 9c 33 01 00 00 00 01 30 00 00
286
00000020: 01 00 00 00 10 00 00 00 00 00 00 00 00 00 00 30
287
00000030: 00 00 9c 33 32 33 31 43 41 4e 4f 4e 00 00 00 00 231CANON
288
00000040: 00 00 00 00 cc c3 01 46
291
#define PTP_OC_CANON_EOS_GetObjectInfoEx 0x9109
292
#define PTP_OC_CANON_EOS_GetThumbEx 0x910A
293
#define PTP_OC_CANON_EOS_SetObjectAttributes 0x910C
295
/* 910f: no args, no data, 1 response arg (0). */
296
#define PTP_OC_CANON_EOS_RemoteRelease 0x910F
297
/* Marcus: looks more like "Set DeviceProperty" in the trace.
300
* data phase (0xc, 0xd11c, 0x1)
303
#define PTP_OC_CANON_EOS_SetDevicePropValueEx 0x9110
304
#define PTP_OC_CANON_EOS_GetRemoteMode 0x9113
305
/* 9114: 1 arg (0x1), no data, no resp data. */
306
#define PTP_OC_CANON_EOS_SetRemoteMode 0x9114
307
/* 9115: 1 arg (0x1), no data, no resp data. */
308
#define PTP_OC_CANON_EOS_SetEventMode 0x9115
309
/* 9116: no args, data phase, no resp data. */
310
#define PTP_OC_CANON_EOS_GetEvent 0x9116
311
#define PTP_OC_CANON_EOS_TransferComplete 0x9117
312
#define PTP_OC_CANON_EOS_CancelTransfer 0x9118
313
#define PTP_OC_CANON_EOS_ResetTransfer 0x9119
315
/* 911a: 3 args (0xfffffff7, 0x00001000, 0x00000001), no data, no resp data. */
316
/* 911a: 3 args (0x001dfc60, 0x00001000, 0x00000001), no data, no resp data. */
317
#define PTP_OC_CANON_EOS_PCHDDCapacity 0x911A
319
/* 911b: no cmd args, no data, no resp args */
320
#define PTP_OC_CANON_EOS_SetUILock 0x911B
321
/* 911c: no cmd args, no data, no resp args */
322
#define PTP_OC_CANON_EOS_ResetUILock 0x911C
323
#define PTP_OC_CANON_EOS_KeepDeviceOn 0x911D
324
#define PTP_OC_CANON_EOS_SetNullPacketMode 0x911E
250
326
/* Nikon extension Operation Codes */
251
327
#define PTP_OC_NIKON_GetProfileAllData 0x9006
252
328
#define PTP_OC_NIKON_SendProfileData 0x9007
915
1023
#define PTP_DPC_EK_VideoOut 0xD004
916
1024
#define PTP_DPC_EK_PowerSaving 0xD005
917
1025
#define PTP_DPC_EK_UI_Language 0xD006
918
1027
/* Canon extension device property codes */
919
1028
#define PTP_DPC_CANON_BeepMode 0xD001
920
#define PTP_DPC_CANON_ViewfinderMode 0xD003
1029
#define PTP_DPC_CANON_BatteryKind 0xD002
1030
#define PTP_DPC_CANON_BatteryStatus 0xD003
1031
#define PTP_DPC_CANON_UILockType 0xD004
1032
#define PTP_DPC_CANON_CameraMode 0xD005
921
1033
#define PTP_DPC_CANON_ImageQuality 0xD006
922
#define PTP_DPC_CANON_D007 0xD007
1034
#define PTP_DPC_CANON_FullViewFileFormat 0xD007
923
1035
#define PTP_DPC_CANON_ImageSize 0xD008
1036
#define PTP_DPC_CANON_SelfTime 0xD009
924
1037
#define PTP_DPC_CANON_FlashMode 0xD00A
1038
#define PTP_DPC_CANON_Beep 0xD00B
925
1039
#define PTP_DPC_CANON_ShootingMode 0xD00C
1040
#define PTP_DPC_CANON_ImageMode 0xD00D
926
1041
#define PTP_DPC_CANON_DriveMode 0xD00E
1042
#define PTP_DPC_CANON_EZoom 0xD00F
927
1043
#define PTP_DPC_CANON_MeteringMode 0xD010
928
1044
#define PTP_DPC_CANON_AFDistance 0xD011
929
1045
#define PTP_DPC_CANON_FocusingPoint 0xD012
930
1046
#define PTP_DPC_CANON_WhiteBalance 0xD013
1047
#define PTP_DPC_CANON_SlowShutterSetting 0xD014
1048
#define PTP_DPC_CANON_AFMode 0xD015
1049
#define PTP_DPC_CANON_ImageStabilization 0xD016
1050
#define PTP_DPC_CANON_Contrast 0xD017
1051
#define PTP_DPC_CANON_ColorGain 0xD018
1052
#define PTP_DPC_CANON_Sharpness 0xD019
1053
#define PTP_DPC_CANON_Sensitivity 0xD01A
1054
#define PTP_DPC_CANON_ParameterSet 0xD01B
931
1055
#define PTP_DPC_CANON_ISOSpeed 0xD01C
932
1056
#define PTP_DPC_CANON_Aperture 0xD01D
933
1057
#define PTP_DPC_CANON_ShutterSpeed 0xD01E
934
1058
#define PTP_DPC_CANON_ExpCompensation 0xD01F
936
/* capture data type (?) */
937
#define PTP_DPC_CANON_D029 0xD029
1059
#define PTP_DPC_CANON_FlashCompensation 0xD020
1060
#define PTP_DPC_CANON_AEBExposureCompensation 0xD021
1061
#define PTP_DPC_CANON_AvOpen 0xD023
1062
#define PTP_DPC_CANON_AvMax 0xD024
1063
#define PTP_DPC_CANON_FocalLength 0xD025
1064
#define PTP_DPC_CANON_FocalLengthTele 0xD026
1065
#define PTP_DPC_CANON_FocalLengthWide 0xD027
1066
#define PTP_DPC_CANON_FocalLengthDenominator 0xD028
1067
#define PTP_DPC_CANON_CaptureTransferMode 0xD029
938
1068
#define PTP_DPC_CANON_Zoom 0xD02A
1069
#define PTP_DPC_CANON_NamePrefix 0xD02B
939
1070
#define PTP_DPC_CANON_SizeQualityMode 0xD02C
1071
#define PTP_DPC_CANON_SupportedThumbSize 0xD02D
1072
#define PTP_DPC_CANON_SizeOfOutputDataFromCamera 0xD02E
1073
#define PTP_DPC_CANON_SizeOfInputDataToCamera 0xD02F
1074
#define PTP_DPC_CANON_RemoteAPIVersion 0xD030
940
1075
#define PTP_DPC_CANON_FirmwareVersion 0xD031
941
1076
#define PTP_DPC_CANON_CameraModel 0xD032
942
1077
#define PTP_DPC_CANON_CameraOwner 0xD033
943
1078
#define PTP_DPC_CANON_UnixTime 0xD034
1079
#define PTP_DPC_CANON_CameraBodyID 0xD035
1080
#define PTP_DPC_CANON_CameraOutput 0xD036
1081
#define PTP_DPC_CANON_DispAv 0xD037
1082
#define PTP_DPC_CANON_AvOpenApex 0xD038
944
1083
#define PTP_DPC_CANON_DZoomMagnification 0xD039
1084
#define PTP_DPC_CANON_MlSpotPos 0xD03A
1085
#define PTP_DPC_CANON_DispAvMax 0xD03B
1086
#define PTP_DPC_CANON_AvMaxApex 0xD03C
1087
#define PTP_DPC_CANON_EZoomStartPosition 0xD03D
1088
#define PTP_DPC_CANON_FocalLengthOfTele 0xD03E
1089
#define PTP_DPC_CANON_EZoomSizeOfTele 0xD03F
945
1090
#define PTP_DPC_CANON_PhotoEffect 0xD040
946
1091
#define PTP_DPC_CANON_AssistLight 0xD041
947
#define PTP_DPC_CANON_D045 0xD045
1092
#define PTP_DPC_CANON_FlashQuantityCount 0xD042
1093
#define PTP_DPC_CANON_RotationAngle 0xD043
1094
#define PTP_DPC_CANON_RotationScene 0xD044
1095
#define PTP_DPC_CANON_EventEmulateMode 0xD045
1096
#define PTP_DPC_CANON_DPOFVersion 0xD046
1097
#define PTP_DPC_CANON_TypeOfSupportedSlideShow 0xD047
948
1098
#define PTP_DPC_CANON_AverageFilesizes 0xD048
1099
#define PTP_DPC_CANON_ModelID 0xD049
1101
/* From EOS 400D trace. */
1102
#define PTP_DPC_CANON_EOS_Aperture 0xD101
1103
#define PTP_DPC_CANON_EOS_ShutterSpeed 0xD102
1104
#define PTP_DPC_CANON_EOS_ISOSpeed 0xD103
1105
#define PTP_DPC_CANON_EOS_ExpCompensation 0xD104
1106
#define PTP_DPC_CANON_EOS_CameraMode 0xD105
1107
#define PTP_DPC_CANON_EOS_MeteringMode 0xD107
1108
#define PTP_DPC_CANON_EOS_Focus 0xD108
1109
#define PTP_DPC_CANON_EOS_WhiteBalance 0xD109
1110
#define PTP_DPC_CANON_EOS_WhiteBalanceAdjustA 0xD10B
1111
#define PTP_DPC_CANON_EOS_WhiteBalanceAdjustB 0xD10C
1112
#define PTP_DPC_CANON_EOS_ColorSpace 0xD10F
1113
#define PTP_DPC_CANON_EOS_PictureStyle 0xD110
1114
#define PTP_DPC_CANON_EOS_TransferOption 0xD111
1115
#define PTP_DPC_CANON_EOS_CameraTime 0xD113
1116
#define PTP_DPC_CANON_EOS_Owner 0xD115
1117
#define PTP_DPC_CANON_EOS_ImageFormat 0xD120
950
1119
/* Nikon extension device property codes */
951
1120
#define PTP_DPC_NIKON_ShootingBank 0xD010
1517
1697
uint16_t ptp_canon_setobjectarchive (PTPParams* params, uint32_t oid, uint32_t flags);
1518
1698
uint16_t ptp_canon_get_customize_data (PTPParams* params, uint32_t themenr,
1519
1699
unsigned char **data, unsigned int *size);
1700
uint16_t ptp_canon_getpairinginfo (PTPParams* params, uint32_t nr, unsigned char**, unsigned int*);
1702
uint16_t ptp_canon_eos_getstorageids (PTPParams* params);
1703
uint16_t ptp_canon_eos_getstorageinfo (PTPParams* params, uint32_t p1);
1704
uint16_t ptp_canon_eos_getpartialobject (PTPParams* params, uint32_t oid, uint32_t off, uint32_t xsize, unsigned char**data);
1705
uint16_t ptp_canon_eos_setdevicepropvalueex (PTPParams* params, unsigned char* data, unsigned int size);
1706
uint16_t ptp_canon_eos_setremotemode (PTPParams* params, uint32_t p1);
1707
uint16_t ptp_canon_eos_seteventmode (PTPParams* params, uint32_t p1);
1708
uint16_t ptp_canon_eos_transfercomplete (PTPParams* params, uint32_t oid);
1709
uint16_t ptp_canon_eos_pchddcapacity (PTPParams* params, uint32_t p1, uint32_t p2, uint32_t p3);
1710
uint16_t ptp_canon_eos_getdevicepropdesc (PTPParams* params, uint16_t propcode,
1711
PTPDevicePropDesc *devicepropertydesc);
1712
uint16_t ptp_canon_eos_setdevicepropvalue (PTPParams* params, uint16_t propcode,
1713
PTPPropertyValue* value, uint16_t datatype);
1522
1715
uint16_t ptp_nikon_curve_download (PTPParams* params,
1523
1716
unsigned char **data, unsigned int *size);