27 #include "gphoto2-endian.h"
31 #define PTP_DL_BE 0xF0
32 #define PTP_DL_LE 0x0F
39 uint32_t Transaction_ID;
64 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE 512
65 #define PTP_USB_BULK_HS_MAX_PACKET_LEN_READ 512
66 #define PTP_USB_BULK_HDR_LEN (2*sizeof(uint32_t)+2*sizeof(uint16_t))
67 #define PTP_USB_BULK_PAYLOAD_LEN_WRITE (PTP_USB_BULK_HS_MAX_PACKET_LEN_WRITE-PTP_USB_BULK_HDR_LEN)
68 #define PTP_USB_BULK_PAYLOAD_LEN_READ (PTP_USB_BULK_HS_MAX_PACKET_LEN_READ-PTP_USB_BULK_HDR_LEN)
69 #define PTP_USB_BULK_REQ_LEN (PTP_USB_BULK_HDR_LEN+5*sizeof(uint32_t))
86 unsigned char data[PTP_USB_BULK_PAYLOAD_LEN_READ];
111 #define PTP_USB_CONTAINER_UNDEFINED 0x0000
112 #define PTP_USB_CONTAINER_COMMAND 0x0001
113 #define PTP_USB_CONTAINER_DATA 0x0002
114 #define PTP_USB_CONTAINER_RESPONSE 0x0003
115 #define PTP_USB_CONTAINER_EVENT 0x0004
118 #define PTPIP_INIT_COMMAND_REQUEST 1
119 #define PTPIP_INIT_COMMAND_ACK 2
120 #define PTPIP_INIT_EVENT_REQUEST 3
121 #define PTPIP_INIT_EVENT_ACK 4
122 #define PTPIP_INIT_FAIL 5
123 #define PTPIP_CMD_REQUEST 6
124 #define PTPIP_CMD_RESPONSE 7
125 #define PTPIP_EVENT 8
126 #define PTPIP_START_DATA_PACKET 9
127 #define PTPIP_DATA_PACKET 10
128 #define PTPIP_CANCEL_TRANSACTION 11
129 #define PTPIP_END_DATA_PACKET 12
130 #define PTPIP_PING 13
131 #define PTPIP_PONG 14
140 #define PTP_VENDOR_EASTMAN_KODAK 0x00000001
141 #define PTP_VENDOR_SEIKO_EPSON 0x00000002
142 #define PTP_VENDOR_AGILENT 0x00000003
143 #define PTP_VENDOR_POLAROID 0x00000004
144 #define PTP_VENDOR_AGFA_GEVAERT 0x00000005
145 #define PTP_VENDOR_MICROSOFT 0x00000006
146 #define PTP_VENDOR_EQUINOX 0x00000007
147 #define PTP_VENDOR_VIEWQUEST 0x00000008
148 #define PTP_VENDOR_STMICROELECTRONICS 0x00000009
149 #define PTP_VENDOR_NIKON 0x0000000A
150 #define PTP_VENDOR_CANON 0x0000000B
154 #define PTP_OC_Undefined 0x1000
155 #define PTP_OC_GetDeviceInfo 0x1001
156 #define PTP_OC_OpenSession 0x1002
157 #define PTP_OC_CloseSession 0x1003
158 #define PTP_OC_GetStorageIDs 0x1004
159 #define PTP_OC_GetStorageInfo 0x1005
160 #define PTP_OC_GetNumObjects 0x1006
161 #define PTP_OC_GetObjectHandles 0x1007
162 #define PTP_OC_GetObjectInfo 0x1008
163 #define PTP_OC_GetObject 0x1009
164 #define PTP_OC_GetThumb 0x100A
165 #define PTP_OC_DeleteObject 0x100B
166 #define PTP_OC_SendObjectInfo 0x100C
167 #define PTP_OC_SendObject 0x100D
168 #define PTP_OC_InitiateCapture 0x100E
169 #define PTP_OC_FormatStore 0x100F
170 #define PTP_OC_ResetDevice 0x1010
171 #define PTP_OC_SelfTest 0x1011
172 #define PTP_OC_SetObjectProtection 0x1012
173 #define PTP_OC_PowerDown 0x1013
174 #define PTP_OC_GetDevicePropDesc 0x1014
175 #define PTP_OC_GetDevicePropValue 0x1015
176 #define PTP_OC_SetDevicePropValue 0x1016
177 #define PTP_OC_ResetDevicePropValue 0x1017
178 #define PTP_OC_TerminateOpenCapture 0x1018
179 #define PTP_OC_MoveObject 0x1019
180 #define PTP_OC_CopyObject 0x101A
181 #define PTP_OC_GetPartialObject 0x101B
182 #define PTP_OC_InitiateOpenCapture 0x101C
185 #define PTP_OC_EK_GetSerial 0x9003
186 #define PTP_OC_EK_SetSerial 0x9004
187 #define PTP_OC_EK_SendFileObjectInfo 0x9005
188 #define PTP_OC_EK_SendFileObject 0x9006
189 #define PTP_OC_EK_SetText 0x9008
192 #define PTP_OC_CANON_GetPartialObjectInfo 0x9001
193 #define PTP_OC_CANON_SetObjectArchive 0x9002
195 #define PTP_OC_CANON_9003 0x9003
199 #define PTP_OC_CANON_GetObjectHandleByName 0x9006
201 #define PTP_OC_CANON_StartShootingMode 0x9008
202 #define PTP_OC_CANON_EndShootingMode 0x9009
204 #define PTP_OC_CANON_900a 0x900A
205 #define PTP_OC_CANON_ViewfinderOn 0x900B
206 #define PTP_OC_CANON_ViewfinderOff 0x900C
207 #define PTP_OC_CANON_DoAeAfAwb 0x900D
210 #define PTP_OC_CANON_GetCustomizeSpec 0x900E
211 #define PTP_OC_CANON_GetCustomizeItemInfo 0x900F
212 #define PTP_OC_CANON_GetCustomizeData 0x9010
213 #define PTP_OC_CANON_SetCustomizeData 0x9011
220 #define PTP_OC_CANON_CheckEvent 0x9013
221 #define PTP_OC_CANON_FocusLock 0x9014
222 #define PTP_OC_CANON_FocusUnlock 0x9015
223 #define PTP_OC_CANON_InitiateCaptureInMemory 0x901A
224 #define PTP_OC_CANON_GetPartialObjectEx 0x901B
225 #define PTP_OC_CANON_SetObjectTime 0x901C
226 #define PTP_OC_CANON_GetViewfinderImage 0x901D
227 #define PTP_OC_CANON_ChangeUSBProtocol 0x901F
228 #define PTP_OC_CANON_GetChanges 0x9020
229 #define PTP_OC_CANON_GetObjectInfoEx 0x9021
231 #define PTP_OC_CANON_TerminateDirectTransfer 0x9023
233 #define PTP_OC_CANON_InitiateDirectTransferEx2 0x9028
234 #define PTP_OC_CANON_GetTargetHandles 0x9029
235 #define PTP_OC_CANON_NotifyProgress 0x902A
236 #define PTP_OC_CANON_NotifyCancelAccepted 0x902B
238 #define PTP_OC_CANON_902C 0x902C
239 #define PTP_OC_CANON_GetDirectory 0x902D
241 #define PTP_OC_CANON_SetPairingInfo 0x9030
242 #define PTP_OC_CANON_GetPairingInfo 0x9031
243 #define PTP_OC_CANON_DeletePairingInfo 0x9032
244 #define PTP_OC_CANON_GetMACAddress 0x9033
246 #define PTP_OC_CANON_SetDisplayMonitor 0x9034
247 #define PTP_OC_CANON_PairingComplete 0x9035
248 #define PTP_OC_CANON_GetWirelessMAXChannel 0x9036
251 #define PTP_OC_NIKON_GetProfileAllData 0x9006
252 #define PTP_OC_NIKON_SendProfileData 0x9007
253 #define PTP_OC_NIKON_DeleteProfile 0x9008
254 #define PTP_OC_NIKON_SetProfileData 0x9009
255 #define PTP_OC_NIKON_AdvancedTransfer 0x9010
256 #define PTP_OC_NIKON_GetFileInfoInBlock 0x9011
257 #define PTP_OC_NIKON_Capture 0x90C0
258 #define PTP_OC_NIKON_SetControlMode 0x90C2
259 #define PTP_OC_NIKON_CurveDownload 0x90C5
260 #define PTP_OC_NIKON_CurveUpload 0x90C6
261 #define PTP_OC_NIKON_CheckEvent 0x90C7
262 #define PTP_OC_NIKON_DeviceReady 0x90C8
263 #define PTP_OC_NIKON_GetDevicePTPIPInfo 0x90E0
267 #define PTP_OC_MTP_GetObjectPropsSupported 0x9801
268 #define PTP_OC_MTP_GetObjectPropDesc 0x9802
269 #define PTP_OC_MTP_GetObjectPropValue 0x9803
270 #define PTP_OC_MTP_SetObjectPropValue 0x9804
271 #define PTP_OC_MTP_GetObjPropList 0x9805
272 #define PTP_OC_MTP_SetObjPropList 0x9806
273 #define PTP_OC_MTP_GetInterdependendPropdesc 0x9807
274 #define PTP_OC_MTP_SendObjectPropList 0x9808
275 #define PTP_OC_MTP_GetObjectReferences 0x9810
276 #define PTP_OC_MTP_SetObjectReferences 0x9811
277 #define PTP_OC_MTP_UpdateDeviceFirmware 0x9812
278 #define PTP_OC_MTP_Skip 0x9820
284 #define PTP_OC_MTP_WMDRMPD_GetSecureTimeChallenge 0x9101
285 #define PTP_OC_MTP_WMDRMPD_GetSecureTimeResponse 0x9102
286 #define PTP_OC_MTP_WMDRMPD_SetLicenseResponse 0x9103
287 #define PTP_OC_MTP_WMDRMPD_GetSyncList 0x9104
288 #define PTP_OC_MTP_WMDRMPD_SendMeterChallengeQuery 0x9105
289 #define PTP_OC_MTP_WMDRMPD_GetMeterChallenge 0x9106
290 #define PTP_OC_MTP_WMDRMPD_SetMeterResponse 0x9107
291 #define PTP_OC_MTP_WMDRMPD_CleanDataStore 0x9108
292 #define PTP_OC_MTP_WMDRMPD_GetLicenseState 0x9109
293 #define PTP_OC_MTP_WMDRMPD_SendWMDRMPDCommand 0x910A
294 #define PTP_OC_MTP_WMDRMPD_SendWMDRMPDRequest 0x910B
302 #define PTP_OC_MTP_WMDRMPD_SendWMDRMPDAppRequest 0x9212
303 #define PTP_OC_MTP_WMDRMPD_GetWMDRMPDAppResponse 0x9213
304 #define PTP_OC_MTP_WMDRMPD_EnableTrustedFilesOperations 0x9214
305 #define PTP_OC_MTP_WMDRMPD_DisableTrustedFilesOperations 0x9215
306 #define PTP_OC_MTP_WMDRMPD_EndTrustedAppSession 0x9216
313 #define PTP_OC_MTP_AAVT_OpenMediaSession 0x9170
314 #define PTP_OC_MTP_AAVT_CloseMediaSession 0x9171
315 #define PTP_OC_MTP_AAVT_GetNextDataBlock 0x9172
316 #define PTP_OC_MTP_AAVT_SetCurrentTimePosition 0x9173
322 #define PTP_OC_MTP_WMDRMND_SendRegistrationRequest 0x9180
323 #define PTP_OC_MTP_WMDRMND_GetRegistrationResponse 0x9181
324 #define PTP_OC_MTP_WMDRMND_GetProximityChallenge 0x9182
325 #define PTP_OC_MTP_WMDRMND_SendProximityResponse 0x9183
326 #define PTP_OC_MTP_WMDRMND_SendWMDRMNDLicenseRequest 0x9184
327 #define PTP_OC_MTP_WMDRMND_GetWMDRMNDLicenseResponse 0x9185
333 #define PTP_OC_MTP_WMPPD_ReportAddedDeletedItems 0x9201
334 #define PTP_OC_MTP_WMPPD_ReportAcquiredItems 0x9202
335 #define PTP_OC_MTP_WMPPD_PlaylistObjectPref 0x9203
341 #define PTP_OC_MTP_ZUNE_GETUNDEFINED001 0x9204
344 #define PTP_OC_MTP_WPDWCN_ProcessWFCObject 0x9122
347 #define PTP_OC_EXTENSION_MASK 0xF000
348 #define PTP_OC_EXTENSION 0x9000
352 #define PTP_RC_Undefined 0x2000
353 #define PTP_RC_OK 0x2001
354 #define PTP_RC_GeneralError 0x2002
355 #define PTP_RC_SessionNotOpen 0x2003
356 #define PTP_RC_InvalidTransactionID 0x2004
357 #define PTP_RC_OperationNotSupported 0x2005
358 #define PTP_RC_ParameterNotSupported 0x2006
359 #define PTP_RC_IncompleteTransfer 0x2007
360 #define PTP_RC_InvalidStorageId 0x2008
361 #define PTP_RC_InvalidObjectHandle 0x2009
362 #define PTP_RC_DevicePropNotSupported 0x200A
363 #define PTP_RC_InvalidObjectFormatCode 0x200B
364 #define PTP_RC_StoreFull 0x200C
365 #define PTP_RC_ObjectWriteProtected 0x200D
366 #define PTP_RC_StoreReadOnly 0x200E
367 #define PTP_RC_AccessDenied 0x200F
368 #define PTP_RC_NoThumbnailPresent 0x2010
369 #define PTP_RC_SelfTestFailed 0x2011
370 #define PTP_RC_PartialDeletion 0x2012
371 #define PTP_RC_StoreNotAvailable 0x2013
372 #define PTP_RC_SpecificationByFormatUnsupported 0x2014
373 #define PTP_RC_NoValidObjectInfo 0x2015
374 #define PTP_RC_InvalidCodeFormat 0x2016
375 #define PTP_RC_UnknownVendorCode 0x2017
376 #define PTP_RC_CaptureAlreadyTerminated 0x2018
377 #define PTP_RC_DeviceBusy 0x2019
378 #define PTP_RC_InvalidParentObject 0x201A
379 #define PTP_RC_InvalidDevicePropFormat 0x201B
380 #define PTP_RC_InvalidDevicePropValue 0x201C
381 #define PTP_RC_InvalidParameter 0x201D
382 #define PTP_RC_SessionAlreadyOpened 0x201E
383 #define PTP_RC_TransactionCanceled 0x201F
384 #define PTP_RC_SpecificationOfDestinationUnsupported 0x2020
387 #define PTP_RC_EK_FilenameRequired 0xA001
388 #define PTP_RC_EK_FilenameConflicts 0xA002
389 #define PTP_RC_EK_FilenameInvalid 0xA003
392 #define PTP_RC_NIKON_AdvancedTransferCancel 0xA022
395 #define PTP_RC_MTP_Undefined 0xA800
396 #define PTP_RC_MTP_Invalid_ObjectPropCode 0xA801
397 #define PTP_RC_MTP_Invalid_ObjectProp_Format 0xA802
398 #define PTP_RC_MTP_Invalid_ObjectProp_Value 0xA803
399 #define PTP_RC_MTP_Invalid_ObjectReference 0xA804
400 #define PTP_RC_MTP_Invalid_Dataset 0xA806
401 #define PTP_RC_MTP_Specification_By_Group_Unsupported 0xA808
402 #define PTP_RC_MTP_Object_Too_Large 0xA809
406 #define PTP_RC_MTP_Invalid_Media_Session_ID 0xA170
407 #define PTP_RC_MTP_Media_Session_Limit_Reached 0xA171
408 #define PTP_RC_MTP_No_More_Data 0xA172
411 #define PTP_RC_MTP_Invalid_WFC_Syntax 0xA121
412 #define PTP_RC_MTP_WFC_Version_Not_Supported 0xA122
415 #define PTP_ERROR_IO 0x02FF
416 #define PTP_ERROR_DATA_EXPECTED 0x02FE
417 #define PTP_ERROR_RESP_EXPECTED 0x02FD
418 #define PTP_ERROR_BADPARAM 0x02FC
422 #define PTP_EC_Undefined 0x4000
423 #define PTP_EC_CancelTransaction 0x4001
424 #define PTP_EC_ObjectAdded 0x4002
425 #define PTP_EC_ObjectRemoved 0x4003
426 #define PTP_EC_StoreAdded 0x4004
427 #define PTP_EC_StoreRemoved 0x4005
428 #define PTP_EC_DevicePropChanged 0x4006
429 #define PTP_EC_ObjectInfoChanged 0x4007
430 #define PTP_EC_DeviceInfoChanged 0x4008
431 #define PTP_EC_RequestObjectTransfer 0x4009
432 #define PTP_EC_StoreFull 0x400A
433 #define PTP_EC_DeviceReset 0x400B
434 #define PTP_EC_StorageInfoChanged 0x400C
435 #define PTP_EC_CaptureComplete 0x400D
436 #define PTP_EC_UnreportedStatus 0x400E
439 #define PTP_EC_CANON_ExtendedErrorcode 0xC005
440 #define PTP_EC_CANON_ObjectInfoChanged 0xC008
441 #define PTP_EC_CANON_RequestObjectTransfer 0xC009
442 #define PTP_EC_CANON_CameraModeChanged 0xC00C
444 #define PTP_EC_CANON_StartDirectTransfer 0xC011
445 #define PTP_EC_CANON_StopDirectTransfer 0xC013
448 #define PTP_EC_Nikon_ObjectAddedInSDRAM 0xC101
449 #define PTP_EC_Nikon_CaptureOverflow 0xC102
451 #define PTP_EC_Nikon_AdvancedTransfer 0xC103
454 #define PTP_GOH_ALL_STORAGE 0xffffffff
455 #define PTP_GOH_ALL_FORMATS 0x00000000
456 #define PTP_GOH_ALL_ASSOCS 0x00000000
461 uint16_t StandardVersion;
462 uint32_t VendorExtensionID;
463 uint16_t VendorExtensionVersion;
464 char *VendorExtensionDesc;
465 uint16_t FunctionalMode;
466 uint32_t OperationsSupported_len;
467 uint16_t *OperationsSupported;
468 uint32_t EventsSupported_len;
469 uint16_t *EventsSupported;
470 uint32_t DevicePropertiesSupported_len;
471 uint16_t *DevicePropertiesSupported;
472 uint32_t CaptureFormats_len;
473 uint16_t *CaptureFormats;
474 uint32_t ImageFormats_len;
475 uint16_t *ImageFormats;
493 uint16_t StorageType;
494 uint16_t FilesystemType;
495 uint16_t AccessCapability;
496 uint64_t MaxCapability;
497 uint64_t FreeSpaceInBytes;
498 uint32_t FreeSpaceInImages;
499 char *StorageDescription;
512 #define PTP_HANDLER_SPECIAL 0xffffffff
513 #define PTP_HANDLER_ROOT 0x00000000
520 uint16_t ObjectFormat;
521 uint16_t ProtectionStatus;
522 uint32_t ObjectCompressedSize;
523 uint16_t ThumbFormat;
524 uint32_t ThumbCompressedSize;
525 uint32_t ThumbPixWidth;
526 uint32_t ThumbPixHeight;
527 uint32_t ImagePixWidth;
528 uint32_t ImagePixHeight;
529 uint32_t ImageBitDepth;
530 uint32_t ParentObject;
531 uint16_t AssociationType;
532 uint32_t AssociationDesc;
533 uint32_t SequenceNumber;
536 time_t ModificationDate;
543 #define PTP_MAXSTRLEN 255
548 #define PTP_OFC_Undefined 0x3000
549 #define PTP_OFC_Defined 0x3800
550 #define PTP_OFC_Association 0x3001
551 #define PTP_OFC_Script 0x3002
552 #define PTP_OFC_Executable 0x3003
553 #define PTP_OFC_Text 0x3004
554 #define PTP_OFC_HTML 0x3005
555 #define PTP_OFC_DPOF 0x3006
556 #define PTP_OFC_AIFF 0x3007
557 #define PTP_OFC_WAV 0x3008
558 #define PTP_OFC_MP3 0x3009
559 #define PTP_OFC_AVI 0x300A
560 #define PTP_OFC_MPEG 0x300B
561 #define PTP_OFC_ASF 0x300C
562 #define PTP_OFC_QT 0x300D
564 #define PTP_OFC_EXIF_JPEG 0x3801
565 #define PTP_OFC_TIFF_EP 0x3802
566 #define PTP_OFC_FlashPix 0x3803
567 #define PTP_OFC_BMP 0x3804
568 #define PTP_OFC_CIFF 0x3805
569 #define PTP_OFC_Undefined_0x3806 0x3806
570 #define PTP_OFC_GIF 0x3807
571 #define PTP_OFC_JFIF 0x3808
572 #define PTP_OFC_PCD 0x3809
573 #define PTP_OFC_PICT 0x380A
574 #define PTP_OFC_PNG 0x380B
575 #define PTP_OFC_Undefined_0x380C 0x380C
576 #define PTP_OFC_TIFF 0x380D
577 #define PTP_OFC_TIFF_IT 0x380E
578 #define PTP_OFC_JP2 0x380F
579 #define PTP_OFC_JPX 0x3810
581 #define PTP_OFC_EK_M3U 0xb002
583 #define PTP_OFC_MTP_MediaCard 0xb211
584 #define PTP_OFC_MTP_MediaCardGroup 0xb212
585 #define PTP_OFC_MTP_Encounter 0xb213
586 #define PTP_OFC_MTP_EncounterBox 0xb214
587 #define PTP_OFC_MTP_M4A 0xb215
588 #define PTP_OFC_MTP_ZUNEUNDEFINED 0xb217
589 #define PTP_OFC_MTP_Firmware 0xb802
590 #define PTP_OFC_MTP_WindowsImageFormat 0xb881
591 #define PTP_OFC_MTP_UndefinedAudio 0xb900
592 #define PTP_OFC_MTP_WMA 0xb901
593 #define PTP_OFC_MTP_OGG 0xb902
594 #define PTP_OFC_MTP_AAC 0xb903
595 #define PTP_OFC_MTP_AudibleCodec 0xb904
596 #define PTP_OFC_MTP_FLAC 0xb906
597 #define PTP_OFC_MTP_UndefinedVideo 0xb980
598 #define PTP_OFC_MTP_WMV 0xb981
599 #define PTP_OFC_MTP_MP4 0xb982
600 #define PTP_OFC_MTP_MP2 0xb983
601 #define PTP_OFC_MTP_3GP 0xb984
602 #define PTP_OFC_MTP_UndefinedCollection 0xba00
603 #define PTP_OFC_MTP_AbstractMultimediaAlbum 0xba01
604 #define PTP_OFC_MTP_AbstractImageAlbum 0xba02
605 #define PTP_OFC_MTP_AbstractAudioAlbum 0xba03
606 #define PTP_OFC_MTP_AbstractVideoAlbum 0xba04
607 #define PTP_OFC_MTP_AbstractAudioVideoPlaylist 0xba05
608 #define PTP_OFC_MTP_AbstractContactGroup 0xba06
609 #define PTP_OFC_MTP_AbstractMessageFolder 0xba07
610 #define PTP_OFC_MTP_AbstractChapteredProduction 0xba08
611 #define PTP_OFC_MTP_AbstractAudioPlaylist 0xba09
612 #define PTP_OFC_MTP_AbstractVideoPlaylist 0xba0a
613 #define PTP_OFC_MTP_AbstractMediacast 0xba0b
614 #define PTP_OFC_MTP_WPLPlaylist 0xba10
615 #define PTP_OFC_MTP_M3UPlaylist 0xba11
616 #define PTP_OFC_MTP_MPLPlaylist 0xba12
617 #define PTP_OFC_MTP_ASXPlaylist 0xba13
618 #define PTP_OFC_MTP_PLSPlaylist 0xba14
619 #define PTP_OFC_MTP_UndefinedDocument 0xba80
620 #define PTP_OFC_MTP_AbstractDocument 0xba81
621 #define PTP_OFC_MTP_XMLDocument 0xba82
622 #define PTP_OFC_MTP_MSWordDocument 0xba83
623 #define PTP_OFC_MTP_MHTCompiledHTMLDocument 0xba84
624 #define PTP_OFC_MTP_MSExcelSpreadsheetXLS 0xba85
625 #define PTP_OFC_MTP_MSPowerpointPresentationPPT 0xba86
626 #define PTP_OFC_MTP_UndefinedMessage 0xbb00
627 #define PTP_OFC_MTP_AbstractMessage 0xbb01
628 #define PTP_OFC_MTP_UndefinedContact 0xbb80
629 #define PTP_OFC_MTP_AbstractContact 0xbb81
630 #define PTP_OFC_MTP_vCard2 0xbb82
631 #define PTP_OFC_MTP_vCard3 0xbb83
632 #define PTP_OFC_MTP_UndefinedCalendarItem 0xbe00
633 #define PTP_OFC_MTP_AbstractCalendarItem 0xbe01
634 #define PTP_OFC_MTP_vCalendar1 0xbe02
635 #define PTP_OFC_MTP_vCalendar2 0xbe03
636 #define PTP_OFC_MTP_UndefinedWindowsExecutable 0xbe80
640 #define PTP_AT_Undefined 0x0000
641 #define PTP_AT_GenericFolder 0x0001
642 #define PTP_AT_Album 0x0002
643 #define PTP_AT_TimeSequence 0x0003
644 #define PTP_AT_HorizontalPanoramic 0x0004
645 #define PTP_AT_VerticalPanoramic 0x0005
646 #define PTP_AT_2DPanoramic 0x0006
647 #define PTP_AT_AncillaryData 0x0007
651 #define PTP_PS_NoProtection 0x0000
652 #define PTP_PS_ReadOnly 0x0001
656 #define PTP_ST_Undefined 0x0000
657 #define PTP_ST_FixedROM 0x0001
658 #define PTP_ST_RemovableROM 0x0002
659 #define PTP_ST_FixedRAM 0x0003
660 #define PTP_ST_RemovableRAM 0x0004
664 #define PTP_FST_Undefined 0x0000
665 #define PTP_FST_GenericFlat 0x0001
666 #define PTP_FST_GenericHierarchical 0x0002
667 #define PTP_FST_DCF 0x0003
671 #define PTP_AC_ReadWrite 0x0000
672 #define PTP_AC_ReadOnly 0x0001
673 #define PTP_AC_ReadOnly_with_Object_Deletion 0x0002
698 uint32_t ObjectHandle;
714 uint16_t NumberOfValues;
722 uint16_t DevicePropertyCode;
738 uint16_t ObjectPropertyCode;
753 #define PTP_CANON_FilenameBufferLen 13
754 #define PTP_CANON_FolderEntryLen 28
757 uint32_t ObjectHandle;
758 uint16_t ObjectFormatCode;
762 char Filename[PTP_CANON_FilenameBufferLen];
768 #define PTP_NIKON_MaxCurvePoints 19
785 char static_preamble[6];
786 uint8_t XAxisStartPoint;
787 uint8_t XAxisEndPoint;
788 uint8_t YAxisStartPoint;
789 uint8_t YAxisEndPoint;
790 uint8_t MidPointIntegerPart;
791 uint8_t MidPointDecimalPart;
792 uint8_t NCoordinates;
808 char profile_name[17];
817 uint8_t display_order;
818 char creation_date[16];
819 char lastusage_date[16];
824 uint32_t gateway_address;
825 uint8_t address_mode;
827 uint8_t wifi_channel;
828 uint8_t authentification;
839 #define PTP_DTC_UNDEF 0x0000
840 #define PTP_DTC_INT8 0x0001
841 #define PTP_DTC_UINT8 0x0002
842 #define PTP_DTC_INT16 0x0003
843 #define PTP_DTC_UINT16 0x0004
844 #define PTP_DTC_INT32 0x0005
845 #define PTP_DTC_UINT32 0x0006
846 #define PTP_DTC_INT64 0x0007
847 #define PTP_DTC_UINT64 0x0008
848 #define PTP_DTC_INT128 0x0009
849 #define PTP_DTC_UINT128 0x000A
851 #define PTP_DTC_ARRAY_MASK 0x4000
853 #define PTP_DTC_AINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT8)
854 #define PTP_DTC_AUINT8 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT8)
855 #define PTP_DTC_AINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT16)
856 #define PTP_DTC_AUINT16 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT16)
857 #define PTP_DTC_AINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT32)
858 #define PTP_DTC_AUINT32 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT32)
859 #define PTP_DTC_AINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT64)
860 #define PTP_DTC_AUINT64 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT64)
861 #define PTP_DTC_AINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_INT128)
862 #define PTP_DTC_AUINT128 (PTP_DTC_ARRAY_MASK | PTP_DTC_UINT128)
864 #define PTP_DTC_STR 0xFFFF
868 #define PTP_DPC_Undefined 0x5000
869 #define PTP_DPC_BatteryLevel 0x5001
870 #define PTP_DPC_FunctionalMode 0x5002
871 #define PTP_DPC_ImageSize 0x5003
872 #define PTP_DPC_CompressionSetting 0x5004
873 #define PTP_DPC_WhiteBalance 0x5005
874 #define PTP_DPC_RGBGain 0x5006
875 #define PTP_DPC_FNumber 0x5007
876 #define PTP_DPC_FocalLength 0x5008
877 #define PTP_DPC_FocusDistance 0x5009
878 #define PTP_DPC_FocusMode 0x500A
879 #define PTP_DPC_ExposureMeteringMode 0x500B
880 #define PTP_DPC_FlashMode 0x500C
881 #define PTP_DPC_ExposureTime 0x500D
882 #define PTP_DPC_ExposureProgramMode 0x500E
883 #define PTP_DPC_ExposureIndex 0x500F
884 #define PTP_DPC_ExposureBiasCompensation 0x5010
885 #define PTP_DPC_DateTime 0x5011
886 #define PTP_DPC_CaptureDelay 0x5012
887 #define PTP_DPC_StillCaptureMode 0x5013
888 #define PTP_DPC_Contrast 0x5014
889 #define PTP_DPC_Sharpness 0x5015
890 #define PTP_DPC_DigitalZoom 0x5016
891 #define PTP_DPC_EffectMode 0x5017
892 #define PTP_DPC_BurstNumber 0x5018
893 #define PTP_DPC_BurstInterval 0x5019
894 #define PTP_DPC_TimelapseNumber 0x501A
895 #define PTP_DPC_TimelapseInterval 0x501B
896 #define PTP_DPC_FocusMeteringMode 0x501C
897 #define PTP_DPC_UploadURL 0x501D
898 #define PTP_DPC_Artist 0x501E
899 #define PTP_DPC_CopyrightInfo 0x501F
902 #define PTP_DPC_EXTENSION_MASK 0xF000
903 #define PTP_DPC_EXTENSION 0xD000
906 #define PTP_DPC_MTP_ZUNE_UNKNOWN1 0xD181
907 #define PTP_DPC_MTP_ZUNE_UNKNOWN2 0xD132
908 #define PTP_DPC_MTP_ZUNE_UNKNOWN3 0xD215
909 #define PTP_DPC_MTP_ZUNE_UNKNOWN4 0xD216
912 #define PTP_DPC_EK_ColorTemperature 0xD001
913 #define PTP_DPC_EK_DateTimeStampFormat 0xD002
914 #define PTP_DPC_EK_BeepMode 0xD003
915 #define PTP_DPC_EK_VideoOut 0xD004
916 #define PTP_DPC_EK_PowerSaving 0xD005
917 #define PTP_DPC_EK_UI_Language 0xD006
919 #define PTP_DPC_CANON_BeepMode 0xD001
920 #define PTP_DPC_CANON_ViewfinderMode 0xD003
921 #define PTP_DPC_CANON_ImageQuality 0xD006
922 #define PTP_DPC_CANON_D007 0xD007
923 #define PTP_DPC_CANON_ImageSize 0xD008
924 #define PTP_DPC_CANON_FlashMode 0xD00A
925 #define PTP_DPC_CANON_ShootingMode 0xD00C
926 #define PTP_DPC_CANON_DriveMode 0xD00E
927 #define PTP_DPC_CANON_MeteringMode 0xD010
928 #define PTP_DPC_CANON_AFDistance 0xD011
929 #define PTP_DPC_CANON_FocusingPoint 0xD012
930 #define PTP_DPC_CANON_WhiteBalance 0xD013
931 #define PTP_DPC_CANON_ISOSpeed 0xD01C
932 #define PTP_DPC_CANON_Aperture 0xD01D
933 #define PTP_DPC_CANON_ShutterSpeed 0xD01E
934 #define PTP_DPC_CANON_ExpCompensation 0xD01F
937 #define PTP_DPC_CANON_D029 0xD029
938 #define PTP_DPC_CANON_Zoom 0xD02A
939 #define PTP_DPC_CANON_SizeQualityMode 0xD02C
940 #define PTP_DPC_CANON_FirmwareVersion 0xD031
941 #define PTP_DPC_CANON_CameraModel 0xD032
942 #define PTP_DPC_CANON_CameraOwner 0xD033
943 #define PTP_DPC_CANON_UnixTime 0xD034
944 #define PTP_DPC_CANON_DZoomMagnification 0xD039
945 #define PTP_DPC_CANON_PhotoEffect 0xD040
946 #define PTP_DPC_CANON_AssistLight 0xD041
947 #define PTP_DPC_CANON_D045 0xD045
948 #define PTP_DPC_CANON_AverageFilesizes 0xD048
951 #define PTP_DPC_NIKON_ShootingBank 0xD010
952 #define PTP_DPC_NIKON_ShootingBankNameA 0xD011
953 #define PTP_DPC_NIKON_ShootingBankNameB 0xD012
954 #define PTP_DPC_NIKON_ShootingBankNameC 0xD013
955 #define PTP_DPC_NIKON_ShootingBankNameD 0xD014
956 #define PTP_DPC_NIKON_RawCompression 0xD016
957 #define PTP_DPC_NIKON_WhiteBalanceAutoBias 0xD017
958 #define PTP_DPC_NIKON_WhiteBalanceTungstenBias 0xD018
959 #define PTP_DPC_NIKON_WhiteBalanceFluorescentBias 0xD019
960 #define PTP_DPC_NIKON_WhiteBalanceDaylightBias 0xD01A
961 #define PTP_DPC_NIKON_WhiteBalanceFlashBias 0xD01B
962 #define PTP_DPC_NIKON_WhiteBalanceCloudyBias 0xD01C
963 #define PTP_DPC_NIKON_WhiteBalanceShadeBias 0xD01D
964 #define PTP_DPC_NIKON_WhiteBalanceColorTemperature 0xD01E
965 #define PTP_DPC_NIKON_ImageSharpening 0xD02A
966 #define PTP_DPC_NIKON_ToneCompensation 0xD02B
967 #define PTP_DPC_NIKON_ColorModel 0xD02C
968 #define PTP_DPC_NIKON_HueAdjustment 0xD02D
969 #define PTP_DPC_NIKON_NonCPULensDataFocalLength 0xD02E
970 #define PTP_DPC_NIKON_NonCPULensDataMaximumAperture 0xD02F
971 #define PTP_DPC_NIKON_CSMMenuBankSelect 0xD040
972 #define PTP_DPC_NIKON_MenuBankNameA 0xD041
973 #define PTP_DPC_NIKON_MenuBankNameB 0xD042
974 #define PTP_DPC_NIKON_MenuBankNameC 0xD043
975 #define PTP_DPC_NIKON_MenuBankNameD 0xD044
976 #define PTP_DPC_NIKON_A1AFCModePriority 0xD048
977 #define PTP_DPC_NIKON_A2AFSModePriority 0xD049
978 #define PTP_DPC_NIKON_A3GroupDynamicAF 0xD04A
979 #define PTP_DPC_NIKON_A4AFActivation 0xD04B
980 #define PTP_DPC_NIKON_A5FocusAreaIllumManualFocus 0xD04C
981 #define PTP_DPC_NIKON_FocusAreaIllumContinuous 0xD04D
982 #define PTP_DPC_NIKON_FocusAreaIllumWhenSelected 0xD04E
983 #define PTP_DPC_NIKON_FocusAreaWrap 0xD04F
984 #define PTP_DPC_NIKON_A7VerticalAFON 0xD050
985 #define PTP_DPC_NIKON_ISOAuto 0xD054
986 #define PTP_DPC_NIKON_B2ISOStep 0xD055
987 #define PTP_DPC_NIKON_EVStep 0xD056
988 #define PTP_DPC_NIKON_B4ExposureCompEv 0xD057
989 #define PTP_DPC_NIKON_ExposureCompensation 0xD058
990 #define PTP_DPC_NIKON_CenterWeightArea 0xD059
991 #define PTP_DPC_NIKON_AELockMode 0xD05E
992 #define PTP_DPC_NIKON_AELAFLMode 0xD05F
993 #define PTP_DPC_NIKON_MeterOff 0xD062
994 #define PTP_DPC_NIKON_SelfTimer 0xD063
995 #define PTP_DPC_NIKON_MonitorOff 0xD064
996 #define PTP_DPC_NIKON_D1ShootingSpeed 0xD068
997 #define PTP_DPC_NIKON_D2MaximumShots 0xD069
998 #define PTP_DPC_NIKON_D3ExpDelayMode 0xD06A
999 #define PTP_DPC_NIKON_LongExposureNoiseReduction 0xD06B
1000 #define PTP_DPC_NIKON_FileNumberSequence 0xD06C
1001 #define PTP_DPC_NIKON_D6ControlPanelFinderRearControl 0xD06D
1002 #define PTP_DPC_NIKON_ControlPanelFinderViewfinder 0xD06E
1003 #define PTP_DPC_NIKON_D7Illumination 0xD06F
1004 #define PTP_DPC_NIKON_E1FlashSyncSpeed 0xD074
1005 #define PTP_DPC_NIKON_FlashShutterSpeed 0xD075
1006 #define PTP_DPC_NIKON_E3AAFlashMode 0xD076
1007 #define PTP_DPC_NIKON_E4ModelingFlash 0xD077
1008 #define PTP_DPC_NIKON_BracketSet 0xD078
1009 #define PTP_DPC_NIKON_E6ManualModeBracketing 0xD079
1010 #define PTP_DPC_NIKON_BracketOrder 0xD07A
1011 #define PTP_DPC_NIKON_E8AutoBracketSelection 0xD07B
1012 #define PTP_DPC_NIKON_BracketingSet 0xD07C
1013 #define PTP_DPC_NIKON_F1CenterButtonShootingMode 0xD080
1014 #define PTP_DPC_NIKON_CenterButtonPlaybackMode 0xD081
1015 #define PTP_DPC_NIKON_F2Multiselector 0xD082
1016 #define PTP_DPC_NIKON_F3PhotoInfoPlayback 0xD083
1017 #define PTP_DPC_NIKON_F4AssignFuncButton 0xD084
1018 #define PTP_DPC_NIKON_F5CustomizeCommDials 0xD085
1019 #define PTP_DPC_NIKON_ReverseCommandDial 0xD086
1020 #define PTP_DPC_NIKON_ApertureSetting 0xD087
1021 #define PTP_DPC_NIKON_MenusAndPlayback 0xD088
1022 #define PTP_DPC_NIKON_F6ButtonsAndDials 0xD089
1023 #define PTP_DPC_NIKON_NoCFCard 0xD08A
1024 #define PTP_DPC_NIKON_ImageCommentString 0xD090
1025 #define PTP_DPC_NIKON_ImageCommentAttach 0xD091
1026 #define PTP_DPC_NIKON_ImageRotation 0xD092
1027 #define PTP_DPC_NIKON_Bracketing 0xD0C0
1028 #define PTP_DPC_NIKON_ExposureBracketingIntervalDist 0xD0C1
1029 #define PTP_DPC_NIKON_BracketingProgram 0xD0C2
1030 #define PTP_DPC_NIKON_WhiteBalanceBracketStep 0xD0C4
1031 #define PTP_DPC_NIKON_LensID 0xD0E0
1032 #define PTP_DPC_NIKON_FocalLengthMin 0xD0E3
1033 #define PTP_DPC_NIKON_FocalLengthMax 0xD0E4
1034 #define PTP_DPC_NIKON_MaxApAtMinFocalLength 0xD0E5
1035 #define PTP_DPC_NIKON_MaxApAtMaxFocalLength 0xD0E6
1036 #define PTP_DPC_NIKON_ExposureTime 0xD100
1037 #define PTP_DPC_NIKON_ACPower 0xD101
1038 #define PTP_DPC_NIKON_MaximumShots 0xD103
1039 #define PTP_DPC_NIKON_AFLLock 0xD104
1040 #define PTP_DPC_NIKON_AutoExposureLock 0xD105
1041 #define PTP_DPC_NIKON_AutoFocusLock 0xD106
1042 #define PTP_DPC_NIKON_AutofocusLCDTopMode2 0xD107
1043 #define PTP_DPC_NIKON_AutofocusArea 0xD108
1044 #define PTP_DPC_NIKON_LightMeter 0xD10A
1045 #define PTP_DPC_NIKON_CameraOrientation 0xD10E
1046 #define PTP_DPC_NIKON_ExposureApertureLock 0xD111
1047 #define PTP_DPC_NIKON_FlashExposureCompensation 0xD126
1048 #define PTP_DPC_NIKON_OptimizeImage 0xD140
1049 #define PTP_DPC_NIKON_Saturation 0xD142
1050 #define PTP_DPC_NIKON_BeepOff 0xD160
1051 #define PTP_DPC_NIKON_AutofocusMode 0xD161
1052 #define PTP_DPC_NIKON_AFAssist 0xD163
1053 #define PTP_DPC_NIKON_PADVPMode 0xD164
1054 #define PTP_DPC_NIKON_ImageReview 0xD165
1055 #define PTP_DPC_NIKON_AFAreaIllumination 0xD166
1056 #define PTP_DPC_NIKON_FlashMode 0xD167
1057 #define PTP_DPC_NIKON_FlashCommanderMode 0xD168
1058 #define PTP_DPC_NIKON_FlashSign 0xD169
1059 #define PTP_DPC_NIKON_RemoteTimeout 0xD16B
1060 #define PTP_DPC_NIKON_GridDisplay 0xD16C
1061 #define PTP_DPC_NIKON_FlashModeManualPower 0xD16D
1062 #define PTP_DPC_NIKON_FlashModeCommanderPower 0xD16E
1063 #define PTP_DPC_NIKON_CSMMenu 0xD180
1064 #define PTP_DPC_NIKON_BracketingFramesAndSteps 0xD190
1065 #define PTP_DPC_NIKON_LowLight 0xD1B0
1066 #define PTP_DPC_NIKON_FlashOpen 0xD1C0
1067 #define PTP_DPC_NIKON_FlashCharged 0xD1C1
1070 #define PTP_DPC_MTP_SecureTime 0xD101
1071 #define PTP_DPC_MTP_DeviceCertificate 0xD102
1072 #define PTP_DPC_MTP_RevocationInfo 0xD103
1073 #define PTP_DPC_MTP_SynchronizationPartner 0xD401
1074 #define PTP_DPC_MTP_DeviceFriendlyName 0xD402
1075 #define PTP_DPC_MTP_VolumeLevel 0xD403
1076 #define PTP_DPC_MTP_DeviceIcon 0xD405
1077 #define PTP_DPC_MTP_PlaybackRate 0xD410
1078 #define PTP_DPC_MTP_PlaybackObject 0xD411
1079 #define PTP_DPC_MTP_PlaybackContainerIndex 0xD412
1080 #define PTP_DPC_MTP_PlaybackPosition 0xD413
1081 #define PTP_DPC_MTP_PlaysForSureID 0xD131
1084 #define PTP_DPC_MTP_Zune_UnknownVersion 0xD181
1087 #define PTP_OPC_StorageID 0xDC01
1088 #define PTP_OPC_ObjectFormat 0xDC02
1089 #define PTP_OPC_ProtectionStatus 0xDC03
1090 #define PTP_OPC_ObjectSize 0xDC04
1091 #define PTP_OPC_AssociationType 0xDC05
1092 #define PTP_OPC_AssociationDesc 0xDC06
1093 #define PTP_OPC_ObjectFileName 0xDC07
1094 #define PTP_OPC_DateCreated 0xDC08
1095 #define PTP_OPC_DateModified 0xDC09
1096 #define PTP_OPC_Keywords 0xDC0A
1097 #define PTP_OPC_ParentObject 0xDC0B
1098 #define PTP_OPC_AllowedFolderContents 0xDC0C
1099 #define PTP_OPC_Hidden 0xDC0D
1100 #define PTP_OPC_SystemObject 0xDC0E
1101 #define PTP_OPC_PersistantUniqueObjectIdentifier 0xDC41
1102 #define PTP_OPC_SyncID 0xDC42
1103 #define PTP_OPC_PropertyBag 0xDC43
1104 #define PTP_OPC_Name 0xDC44
1105 #define PTP_OPC_CreatedBy 0xDC45
1106 #define PTP_OPC_Artist 0xDC46
1107 #define PTP_OPC_DateAuthored 0xDC47
1108 #define PTP_OPC_Description 0xDC48
1109 #define PTP_OPC_URLReference 0xDC49
1110 #define PTP_OPC_LanguageLocale 0xDC4A
1111 #define PTP_OPC_CopyrightInformation 0xDC4B
1112 #define PTP_OPC_Source 0xDC4C
1113 #define PTP_OPC_OriginLocation 0xDC4D
1114 #define PTP_OPC_DateAdded 0xDC4E
1115 #define PTP_OPC_NonConsumable 0xDC4F
1116 #define PTP_OPC_CorruptOrUnplayable 0xDC50
1117 #define PTP_OPC_ProducerSerialNumber 0xDC51
1118 #define PTP_OPC_RepresentativeSampleFormat 0xDC81
1119 #define PTP_OPC_RepresentativeSampleSize 0xDC82
1120 #define PTP_OPC_RepresentativeSampleHeight 0xDC83
1121 #define PTP_OPC_RepresentativeSampleWidth 0xDC84
1122 #define PTP_OPC_RepresentativeSampleDuration 0xDC85
1123 #define PTP_OPC_RepresentativeSampleData 0xDC86
1124 #define PTP_OPC_Width 0xDC87
1125 #define PTP_OPC_Height 0xDC88
1126 #define PTP_OPC_Duration 0xDC89
1127 #define PTP_OPC_Rating 0xDC8A
1128 #define PTP_OPC_Track 0xDC8B
1129 #define PTP_OPC_Genre 0xDC8C
1130 #define PTP_OPC_Credits 0xDC8D
1131 #define PTP_OPC_Lyrics 0xDC8E
1132 #define PTP_OPC_SubscriptionContentID 0xDC8F
1133 #define PTP_OPC_ProducedBy 0xDC90
1134 #define PTP_OPC_UseCount 0xDC91
1135 #define PTP_OPC_SkipCount 0xDC92
1136 #define PTP_OPC_LastAccessed 0xDC93
1137 #define PTP_OPC_ParentalRating 0xDC94
1138 #define PTP_OPC_MetaGenre 0xDC95
1139 #define PTP_OPC_Composer 0xDC96
1140 #define PTP_OPC_EffectiveRating 0xDC97
1141 #define PTP_OPC_Subtitle 0xDC98
1142 #define PTP_OPC_OriginalReleaseDate 0xDC99
1143 #define PTP_OPC_AlbumName 0xDC9A
1144 #define PTP_OPC_AlbumArtist 0xDC9B
1145 #define PTP_OPC_Mood 0xDC9C
1146 #define PTP_OPC_DRMStatus 0xDC9D
1147 #define PTP_OPC_SubDescription 0xDC9E
1148 #define PTP_OPC_IsCropped 0xDCD1
1149 #define PTP_OPC_IsColorCorrected 0xDCD2
1150 #define PTP_OPC_ImageBitDepth 0xDCD3
1151 #define PTP_OPC_Fnumber 0xDCD4
1152 #define PTP_OPC_ExposureTime 0xDCD5
1153 #define PTP_OPC_ExposureIndex 0xDCD6
1154 #define PTP_OPC_DisplayName 0xDCE0
1155 #define PTP_OPC_BodyText 0xDCE1
1156 #define PTP_OPC_Subject 0xDCE2
1157 #define PTP_OPC_Prority 0xDCE3
1158 #define PTP_OPC_GivenName 0xDD00
1159 #define PTP_OPC_MiddleNames 0xDD01
1160 #define PTP_OPC_FamilyName 0xDD02
1161 #define PTP_OPC_Prefix 0xDD03
1162 #define PTP_OPC_Suffix 0xDD04
1163 #define PTP_OPC_PhoneticGivenName 0xDD05
1164 #define PTP_OPC_PhoneticFamilyName 0xDD06
1165 #define PTP_OPC_EmailPrimary 0xDD07
1166 #define PTP_OPC_EmailPersonal1 0xDD08
1167 #define PTP_OPC_EmailPersonal2 0xDD09
1168 #define PTP_OPC_EmailBusiness1 0xDD0A
1169 #define PTP_OPC_EmailBusiness2 0xDD0B
1170 #define PTP_OPC_EmailOthers 0xDD0C
1171 #define PTP_OPC_PhoneNumberPrimary 0xDD0D
1172 #define PTP_OPC_PhoneNumberPersonal 0xDD0E
1173 #define PTP_OPC_PhoneNumberPersonal2 0xDD0F
1174 #define PTP_OPC_PhoneNumberBusiness 0xDD10
1175 #define PTP_OPC_PhoneNumberBusiness2 0xDD11
1176 #define PTP_OPC_PhoneNumberMobile 0xDD12
1177 #define PTP_OPC_PhoneNumberMobile2 0xDD13
1178 #define PTP_OPC_FaxNumberPrimary 0xDD14
1179 #define PTP_OPC_FaxNumberPersonal 0xDD15
1180 #define PTP_OPC_FaxNumberBusiness 0xDD16
1181 #define PTP_OPC_PagerNumber 0xDD17
1182 #define PTP_OPC_PhoneNumberOthers 0xDD18
1183 #define PTP_OPC_PrimaryWebAddress 0xDD19
1184 #define PTP_OPC_PersonalWebAddress 0xDD1A
1185 #define PTP_OPC_BusinessWebAddress 0xDD1B
1186 #define PTP_OPC_InstantMessengerAddress 0xDD1C
1187 #define PTP_OPC_InstantMessengerAddress2 0xDD1D
1188 #define PTP_OPC_InstantMessengerAddress3 0xDD1E
1189 #define PTP_OPC_PostalAddressPersonalFull 0xDD1F
1190 #define PTP_OPC_PostalAddressPersonalFullLine1 0xDD20
1191 #define PTP_OPC_PostalAddressPersonalFullLine2 0xDD21
1192 #define PTP_OPC_PostalAddressPersonalFullCity 0xDD22
1193 #define PTP_OPC_PostalAddressPersonalFullRegion 0xDD23
1194 #define PTP_OPC_PostalAddressPersonalFullPostalCode 0xDD24
1195 #define PTP_OPC_PostalAddressPersonalFullCountry 0xDD25
1196 #define PTP_OPC_PostalAddressBusinessFull 0xDD26
1197 #define PTP_OPC_PostalAddressBusinessLine1 0xDD27
1198 #define PTP_OPC_PostalAddressBusinessLine2 0xDD28
1199 #define PTP_OPC_PostalAddressBusinessCity 0xDD29
1200 #define PTP_OPC_PostalAddressBusinessRegion 0xDD2A
1201 #define PTP_OPC_PostalAddressBusinessPostalCode 0xDD2B
1202 #define PTP_OPC_PostalAddressBusinessCountry 0xDD2C
1203 #define PTP_OPC_PostalAddressOtherFull 0xDD2D
1204 #define PTP_OPC_PostalAddressOtherLine1 0xDD2E
1205 #define PTP_OPC_PostalAddressOtherLine2 0xDD2F
1206 #define PTP_OPC_PostalAddressOtherCity 0xDD30
1207 #define PTP_OPC_PostalAddressOtherRegion 0xDD31
1208 #define PTP_OPC_PostalAddressOtherPostalCode 0xDD32
1209 #define PTP_OPC_PostalAddressOtherCountry 0xDD33
1210 #define PTP_OPC_OrganizationName 0xDD34
1211 #define PTP_OPC_PhoneticOrganizationName 0xDD35
1212 #define PTP_OPC_Role 0xDD36
1213 #define PTP_OPC_Birthdate 0xDD37
1214 #define PTP_OPC_MessageTo 0xDD40
1215 #define PTP_OPC_MessageCC 0xDD41
1216 #define PTP_OPC_MessageBCC 0xDD42
1217 #define PTP_OPC_MessageRead 0xDD43
1218 #define PTP_OPC_MessageReceivedTime 0xDD44
1219 #define PTP_OPC_MessageSender 0xDD45
1220 #define PTP_OPC_ActivityBeginTime 0xDD50
1221 #define PTP_OPC_ActivityEndTime 0xDD51
1222 #define PTP_OPC_ActivityLocation 0xDD52
1223 #define PTP_OPC_ActivityRequiredAttendees 0xDD54
1224 #define PTP_OPC_ActivityOptionalAttendees 0xDD55
1225 #define PTP_OPC_ActivityResources 0xDD56
1226 #define PTP_OPC_ActivityAccepted 0xDD57
1227 #define PTP_OPC_Owner 0xDD5D
1228 #define PTP_OPC_Editor 0xDD5E
1229 #define PTP_OPC_Webmaster 0xDD5F
1230 #define PTP_OPC_URLSource 0xDD60
1231 #define PTP_OPC_URLDestination 0xDD61
1232 #define PTP_OPC_TimeBookmark 0xDD62
1233 #define PTP_OPC_ObjectBookmark 0xDD63
1234 #define PTP_OPC_ByteBookmark 0xDD64
1235 #define PTP_OPC_LastBuildDate 0xDD70
1236 #define PTP_OPC_TimetoLive 0xDD71
1237 #define PTP_OPC_MediaGUID 0xDD72
1238 #define PTP_OPC_TotalBitRate 0xDE91
1239 #define PTP_OPC_BitRateType 0xDE92
1240 #define PTP_OPC_SampleRate 0xDE93
1241 #define PTP_OPC_NumberOfChannels 0xDE94
1242 #define PTP_OPC_AudioBitDepth 0xDE95
1243 #define PTP_OPC_ScanDepth 0xDE97
1244 #define PTP_OPC_AudioWAVECodec 0xDE99
1245 #define PTP_OPC_AudioBitRate 0xDE9A
1246 #define PTP_OPC_VideoFourCCCodec 0xDE9B
1247 #define PTP_OPC_VideoBitRate 0xDE9C
1248 #define PTP_OPC_FramesPerThousandSeconds 0xDE9D
1249 #define PTP_OPC_KeyFrameDistance 0xDE9E
1250 #define PTP_OPC_BufferSize 0xDE9F
1251 #define PTP_OPC_EncodingQuality 0xDEA0
1252 #define PTP_OPC_EncodingProfile 0xDEA1
1253 #define PTP_OPC_BuyFlag 0xD901
1256 #define PTP_OPC_WirelessConfigurationFile 0xB104
1260 #define PTP_DPFF_None 0x00
1261 #define PTP_DPFF_Range 0x01
1262 #define PTP_DPFF_Enumeration 0x02
1265 #define PTP_OPFF_None 0x00
1266 #define PTP_OPFF_Range 0x01
1267 #define PTP_OPFF_Enumeration 0x02
1268 #define PTP_OPFF_DateTime 0x03
1269 #define PTP_OPFF_FixedLengthArray 0x04
1270 #define PTP_OPFF_RegularExpression 0x05
1271 #define PTP_OPFF_ByteArray 0x06
1272 #define PTP_OPFF_LongString 0xFF
1275 #define PTP_DPGS_Get 0x00
1276 #define PTP_DPGS_GetSet 0x01
1283 typedef uint16_t (* PTPDataGetFunc) (
PTPParams* params,
void*
private,
1284 unsigned long wantlen,
1285 unsigned char *data,
unsigned long *gotlen);
1287 typedef uint16_t (* PTPDataPutFunc) (
PTPParams* params,
void*
private,
1288 unsigned long sendlen,
1289 unsigned char *data,
unsigned long *putlen);
1291 PTPDataGetFunc getfunc;
1292 PTPDataPutFunc putfunc;
1308 typedef void (* PTPErrorFunc) (
void *data,
const char *format, va_list args)
1310 __attribute__((__format__(printf,2,0)))
1313 typedef void (* PTPDebugFunc) (
void *data,
const char *format, va_list args)
1315 __attribute__((__format__(printf,2,0)))
1322 uint16_t maxpacketsize;
1325 PTPIOSendReq sendreq_func;
1326 PTPIOSendData senddata_func;
1327 PTPIOGetResp getresp_func;
1328 PTPIOGetData getdata_func;
1329 PTPIOGetResp event_check;
1330 PTPIOGetResp event_wait;
1333 PTPErrorFunc error_func;
1334 PTPDebugFunc debug_func;
1340 uint32_t transaction_id;
1342 uint32_t session_id;
1345 int split_header_data;
1356 uint32_t *canon_flags;
1359 uint8_t wifi_profiles_version;
1360 uint8_t wifi_profiles_number;
1365 uint8_t cameraguid[16];
1366 uint32_t eventpipeid;
1370 iconv_t cd_locale_to_ucs2;
1371 iconv_t cd_ucs2_to_locale;
1376 uint8_t *response_packet;
1377 uint16_t response_packet_size;
1390 int ptp_ptpip_connect (
PTPParams* params,
const char *port);
1402 uint16_t ptp_opensession (
PTPParams *params, uint32_t session);
1403 uint16_t ptp_closesession (
PTPParams *params);
1406 uint16_t ptp_getstorageinfo (
PTPParams* params, uint32_t storageid,
1408 uint16_t ptp_formatstore (
PTPParams* params, uint32_t storageid);
1410 uint16_t ptp_getobjecthandles (
PTPParams* params, uint32_t storage,
1411 uint32_t objectformatcode,
1412 uint32_t associationOH,
1415 uint16_t ptp_getnumobjects (
PTPParams* params, uint32_t storage,
1416 uint32_t objectformatcode,
1417 uint32_t associationOH,
1420 uint16_t ptp_getobjectinfo (
PTPParams *params, uint32_t handle,
1423 uint16_t ptp_getobject (
PTPParams *params, uint32_t handle,
1424 unsigned char**
object);
1425 uint16_t ptp_getobject_tofd (
PTPParams* params, uint32_t handle,
int fd);
1427 uint16_t ptp_getpartialobject (
PTPParams* params, uint32_t handle, uint32_t offset,
1428 uint32_t maxbytes,
unsigned char**
object);
1429 uint16_t ptp_getthumb (
PTPParams *params, uint32_t handle,
1430 unsigned char**
object);
1432 uint16_t ptp_deleteobject (
PTPParams* params, uint32_t handle,
1435 uint16_t ptp_sendobjectinfo (
PTPParams* params, uint32_t* store,
1436 uint32_t* parenthandle, uint32_t* handle,
1438 uint16_t ptp_sendobject (
PTPParams* params,
unsigned char*
object,
1440 uint16_t ptp_sendobject_fromfd (
PTPParams* params,
int fd, uint32_t size);
1443 uint16_t ptp_initiatecapture (
PTPParams* params, uint32_t storageid,
1446 uint16_t ptp_getdevicepropdesc (
PTPParams* params, uint16_t propcode,
1448 uint16_t ptp_getdevicepropvalue (
PTPParams* params, uint16_t propcode,
1450 uint16_t ptp_setdevicepropvalue (
PTPParams* params, uint16_t propcode,
1454 uint16_t ptp_mtp_getobjectpropdesc (
PTPParams* params, uint16_t opc, uint16_t ofc,
1456 uint16_t ptp_mtp_getobjectpropvalue (
PTPParams* params, uint32_t oid, uint16_t opc,
1458 uint16_t ptp_mtp_setobjectpropvalue (
PTPParams* params, uint32_t oid, uint16_t opc,
1460 uint16_t ptp_mtp_getobjectreferences (
PTPParams* params, uint32_t handle, uint32_t** ohArray, uint32_t* arraylen);
1461 uint16_t ptp_mtp_setobjectreferences (
PTPParams* params, uint32_t handle, uint32_t* ohArray, uint32_t arraylen);
1462 uint16_t ptp_mtp_getobjectproplist (
PTPParams* params, uint32_t handle,
MTPPropList **proplist);
1463 uint16_t ptp_mtp_sendobjectproplist (
PTPParams* params, uint32_t* store, uint32_t* parenthandle, uint32_t* handle,
1464 uint16_t objecttype, uint64_t objectsize,
MTPPropList *proplist);
1467 uint16_t ptp_ek_9007 (
PTPParams* params,
unsigned char **serial,
unsigned int *size);
1468 uint16_t ptp_ek_9009 (
PTPParams* params, uint32_t*, uint32_t*);
1469 uint16_t ptp_ek_900c (
PTPParams* params,
unsigned char **serial,
unsigned int *size);
1470 uint16_t ptp_ek_getserial (
PTPParams* params,
unsigned char **serial,
unsigned int *size);
1471 uint16_t ptp_ek_setserial (
PTPParams* params,
unsigned char *serial, uint32_t size);
1473 uint16_t ptp_ek_sendfileobjectinfo (
PTPParams* params, uint32_t* store,
1474 uint32_t* parenthandle, uint32_t* handle,
1476 uint16_t ptp_ek_sendfileobject (
PTPParams* params,
unsigned char*
object,
1482 uint16_t ptp_canon_9012 (
PTPParams* params);
1483 uint16_t ptp_canon_initiate_direct_transfer (
PTPParams* params, uint32_t* out);
1485 uint16_t ptp_canon_getpartialobjectinfo (
PTPParams* params, uint32_t handle,
1486 uint32_t p2, uint32_t* size, uint32_t* rp2);
1488 uint16_t ptp_canon_get_mac_address (
PTPParams* params,
unsigned char **mac);
1489 uint16_t ptp_canon_startshootingmode (
PTPParams* params);
1490 uint16_t ptp_canon_endshootingmode (
PTPParams* params);
1492 uint16_t ptp_canon_viewfinderon (
PTPParams* params);
1493 uint16_t ptp_canon_viewfinderoff (
PTPParams* params);
1495 uint16_t ptp_canon_aeafawb (
PTPParams* params, uint32_t p1);
1496 uint16_t ptp_canon_checkevent (
PTPParams* params,
1498 uint16_t ptp_canon_focuslock (
PTPParams* params);
1499 uint16_t ptp_canon_focusunlock (
PTPParams* params);
1500 uint16_t ptp_canon_initiatecaptureinmemory (
PTPParams* params);
1501 uint16_t ptp_canon_getpartialobject (
PTPParams* params, uint32_t handle,
1502 uint32_t offset, uint32_t size,
1503 uint32_t pos,
unsigned char** block,
1505 uint16_t ptp_canon_getviewfinderimage (
PTPParams* params,
unsigned char** image,
1507 uint16_t ptp_canon_getchanges (
PTPParams* params, uint16_t** props,
1509 uint16_t ptp_canon_getobjectinfo (
PTPParams* params, uint32_t store,
1510 uint32_t p2, uint32_t parenthandle,
1514 uint16_t ptp_canon_get_objecthandle_by_name (
PTPParams* params,
char* name, uint32_t* objectid);
1516 uint16_t ptp_canon_setobjectarchive (
PTPParams* params, uint32_t oid, uint32_t flags);
1517 uint16_t ptp_canon_get_customize_data (
PTPParams* params, uint32_t themenr,
1518 unsigned char **data,
unsigned int *size);
1521 uint16_t ptp_nikon_curve_download (
PTPParams* params,
1522 unsigned char **data,
unsigned int *size);
1523 uint16_t ptp_nikon_getptpipinfo (
PTPParams* params,
unsigned char **data,
unsigned int *size);
1524 uint16_t ptp_nikon_getwifiprofilelist (
PTPParams* params);
1526 uint16_t ptp_nikon_deletewifiprofile (
PTPParams* params, uint32_t profilenr);
1527 uint16_t ptp_nikon_setcontrolmode (
PTPParams* params, uint32_t mode);
1528 uint16_t ptp_nikon_capture (
PTPParams* params, uint32_t x);
1530 uint16_t ptp_nikon_getfileinfoinblock (
PTPParams* params, uint32_t p1, uint32_t p2, uint32_t p3,
1531 unsigned char **data,
unsigned int *size);
1532 uint16_t ptp_nikon_device_ready (
PTPParams* params);
1533 uint16_t ptp_mtp_getobjectpropssupported (
PTPParams* params, uint16_t ofc, uint32_t *propnum, uint16_t **props);
1536 int ptp_operation_issupported (
PTPParams* params, uint16_t operation);
1537 int ptp_event_issupported (
PTPParams* params, uint16_t event);
1538 int ptp_property_issupported (
PTPParams* params, uint16_t property);
1543 void ptp_free_params (
PTPParams *params);
1545 void ptp_perror (
PTPParams* params, uint16_t error);
1548 ptp_get_property_description(
PTPParams* params, uint16_t dpc);
1551 ptp_render_property_value(
PTPParams* params, uint16_t dpc,
1553 int ptp_render_ofc(
PTPParams* params, uint16_t ofc,
int spaceleft,
char *txt);
1554 int ptp_render_opcode(
PTPParams* params, uint16_t opcode,
int spaceleft,
char *txt);
1555 int ptp_render_mtp_propname(uint16_t propid,
int spaceleft,
char *txt);
void ptp_nikon_getptpipguid(unsigned char *guid)
Definition: libmtp.c:4821