blob: c3293319f7759585662ad399532b22cae486f305 [file] [log] [blame]
bigbiff bigbiffc7eee6f2014-09-02 18:59:01 -04001/*
2 * Copyright (C) 2010 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *
16 * Copyright (C) 2014 TeamWin - bigbiff and Dees_Troy mtp database conversion to C++
17 */
18
19#ifndef _MTP_H
20#define _MTP_H
21
22#include <stdint.h>
23#include <stdlib.h>
24
25#define MTP_STANDARD_VERSION 100
26
27// Container Types
28#define MTP_CONTAINER_TYPE_UNDEFINED 0
29#define MTP_CONTAINER_TYPE_COMMAND 1
30#define MTP_CONTAINER_TYPE_DATA 2
31#define MTP_CONTAINER_TYPE_RESPONSE 3
32#define MTP_CONTAINER_TYPE_EVENT 4
33
34// Container Offsets
35#define MTP_CONTAINER_LENGTH_OFFSET 0
36#define MTP_CONTAINER_TYPE_OFFSET 4
37#define MTP_CONTAINER_CODE_OFFSET 6
38#define MTP_CONTAINER_TRANSACTION_ID_OFFSET 8
39#define MTP_CONTAINER_PARAMETER_OFFSET 12
40#define MTP_CONTAINER_HEADER_SIZE 12
41
42// MTP Data Types
43#define MTP_TYPE_UNDEFINED 0x0000 // Undefined
44#define MTP_TYPE_INT8 0x0001 // Signed 8-bit integer
45#define MTP_TYPE_UINT8 0x0002 // Unsigned 8-bit integer
46#define MTP_TYPE_INT16 0x0003 // Signed 16-bit integer
47#define MTP_TYPE_UINT16 0x0004 // Unsigned 16-bit integer
48#define MTP_TYPE_INT32 0x0005 // Signed 32-bit integer
49#define MTP_TYPE_UINT32 0x0006 // Unsigned 32-bit integer
50#define MTP_TYPE_INT64 0x0007 // Signed 64-bit integer
51#define MTP_TYPE_UINT64 0x0008 // Unsigned 64-bit integer
52#define MTP_TYPE_INT128 0x0009 // Signed 128-bit integer
53#define MTP_TYPE_UINT128 0x000A // Unsigned 128-bit integer
54#define MTP_TYPE_AINT8 0x4001 // Array of signed 8-bit integers
55#define MTP_TYPE_AUINT8 0x4002 // Array of unsigned 8-bit integers
56#define MTP_TYPE_AINT16 0x4003 // Array of signed 16-bit integers
57#define MTP_TYPE_AUINT16 0x4004 // Array of unsigned 16-bit integers
58#define MTP_TYPE_AINT32 0x4005 // Array of signed 32-bit integers
59#define MTP_TYPE_AUINT32 0x4006 // Array of unsigned 32-bit integers
60#define MTP_TYPE_AINT64 0x4007 // Array of signed 64-bit integers
61#define MTP_TYPE_AUINT64 0x4008 // Array of unsigned 64-bit integers
62#define MTP_TYPE_AINT128 0x4009 // Array of signed 128-bit integers
63#define MTP_TYPE_AUINT128 0x400A // Array of unsigned 128-bit integers
64#define MTP_TYPE_STR 0xFFFF // Variable-length Unicode string
65
66// MTP Format Codes
67#define MTP_FORMAT_UNDEFINED 0x3000 // Undefined object
68#define MTP_FORMAT_ASSOCIATION 0x3001 // Association (for example, a folder)
69#define MTP_FORMAT_SCRIPT 0x3002 // Device model-specific script
70#define MTP_FORMAT_EXECUTABLE 0x3003 // Device model-specific binary executable
71#define MTP_FORMAT_TEXT 0x3004 // Text file
72#define MTP_FORMAT_HTML 0x3005 // Hypertext Markup Language file (text)
73#define MTP_FORMAT_DPOF 0x3006 // Digital Print Order Format file (text)
74#define MTP_FORMAT_AIFF 0x3007 // Audio clip
75#define MTP_FORMAT_WAV 0x3008 // Audio clip
76#define MTP_FORMAT_MP3 0x3009 // Audio clip
77#define MTP_FORMAT_AVI 0x300A // Video clip
78#define MTP_FORMAT_MPEG 0x300B // Video clip
79#define MTP_FORMAT_ASF 0x300C // Microsoft Advanced Streaming Format (video)
80#define MTP_FORMAT_DEFINED 0x3800 // Unknown image object
81#define MTP_FORMAT_EXIF_JPEG 0x3801 // Exchangeable File Format, JEIDA standard
82#define MTP_FORMAT_TIFF_EP 0x3802 // Tag Image File Format for Electronic Photography
83#define MTP_FORMAT_FLASHPIX 0x3803 // Structured Storage Image Format
84#define MTP_FORMAT_BMP 0x3804 // Microsoft Windows Bitmap file
85#define MTP_FORMAT_CIFF 0x3805 // Canon Camera Image File Format
86#define MTP_FORMAT_GIF 0x3807 // Graphics Interchange Format
87#define MTP_FORMAT_JFIF 0x3808 // JPEG File Interchange Format
88#define MTP_FORMAT_CD 0x3809 // PhotoCD Image Pac
89#define MTP_FORMAT_PICT 0x380A // Quickdraw Image Format
90#define MTP_FORMAT_PNG 0x380B // Portable Network Graphics
91#define MTP_FORMAT_TIFF 0x380D // Tag Image File Format
92#define MTP_FORMAT_TIFF_IT 0x380E // Tag Image File Format for Information Technology (graphic arts)
93#define MTP_FORMAT_JP2 0x380F // JPEG2000 Baseline File Format
94#define MTP_FORMAT_JPX 0x3810 // JPEG2000 Extended File Format
95#define MTP_FORMAT_UNDEFINED_FIRMWARE 0xB802
96#define MTP_FORMAT_WINDOWS_IMAGE_FORMAT 0xB881
97#define MTP_FORMAT_UNDEFINED_AUDIO 0xB900
98#define MTP_FORMAT_WMA 0xB901
99#define MTP_FORMAT_OGG 0xB902
100#define MTP_FORMAT_AAC 0xB903
101#define MTP_FORMAT_AUDIBLE 0xB904
102#define MTP_FORMAT_FLAC 0xB906
103#define MTP_FORMAT_UNDEFINED_VIDEO 0xB980
104#define MTP_FORMAT_WMV 0xB981
105#define MTP_FORMAT_MP4_CONTAINER 0xB982 // ISO 14496-1
106#define MTP_FORMAT_MP2 0xB983
107#define MTP_FORMAT_3GP_CONTAINER 0xB984 // 3GPP file format. Details: http://www.3gpp.org/ftp/Specs/html-info/26244.htm (page title - \u201cTransparent end-to-end packet switched streaming service, 3GPP file format\u201d).
108#define MTP_FORMAT_UNDEFINED_COLLECTION 0xBA00
109#define MTP_FORMAT_ABSTRACT_MULTIMEDIA_ALBUM 0xBA01
110#define MTP_FORMAT_ABSTRACT_IMAGE_ALBUM 0xBA02
111#define MTP_FORMAT_ABSTRACT_AUDIO_ALBUM 0xBA03
112#define MTP_FORMAT_ABSTRACT_VIDEO_ALBUM 0xBA04
113#define MTP_FORMAT_ABSTRACT_AV_PLAYLIST 0xBA05
114#define MTP_FORMAT_ABSTRACT_CONTACT_GROUP 0xBA06
115#define MTP_FORMAT_ABSTRACT_MESSAGE_FOLDER 0xBA07
116#define MTP_FORMAT_ABSTRACT_CHAPTERED_PRODUCTION 0xBA08
117#define MTP_FORMAT_ABSTRACT_AUDIO_PLAYLIST 0xBA09
118#define MTP_FORMAT_ABSTRACT_VIDEO_PLAYLIST 0xBA0A
119#define MTP_FORMAT_ABSTRACT_MEDIACAST 0xBA0B // For use with mediacasts; references multimedia enclosures of RSS feeds or episodic content
120#define MTP_FORMAT_WPL_PLAYLIST 0xBA10
121#define MTP_FORMAT_M3U_PLAYLIST 0xBA11
122#define MTP_FORMAT_MPL_PLAYLIST 0xBA12
123#define MTP_FORMAT_ASX_PLAYLIST 0xBA13
124#define MTP_FORMAT_PLS_PLAYLIST 0xBA14
125#define MTP_FORMAT_UNDEFINED_DOCUMENT 0xBA80
126#define MTP_FORMAT_ABSTRACT_DOCUMENT 0xBA81
127#define MTP_FORMAT_XML_DOCUMENT 0xBA82
128#define MTP_FORMAT_MS_WORD_DOCUMENT 0xBA83
129#define MTP_FORMAT_MHT_COMPILED_HTML_DOCUMENT 0xBA84
130#define MTP_FORMAT_MS_EXCEL_SPREADSHEET 0xBA85
131#define MTP_FORMAT_MS_POWERPOINT_PRESENTATION 0xBA86
132#define MTP_FORMAT_UNDEFINED_MESSAGE 0xBB00
133#define MTP_FORMAT_ABSTRACT_MESSSAGE 0xBB01
134#define MTP_FORMAT_UNDEFINED_CONTACT 0xBB80
135#define MTP_FORMAT_ABSTRACT_CONTACT 0xBB81
136#define MTP_FORMAT_VCARD_2 0xBB82
137
138// MTP Object Property Codes
139#define MTP_PROPERTY_STORAGE_ID 0xDC01
140#define MTP_PROPERTY_OBJECT_FORMAT 0xDC02
141#define MTP_PROPERTY_PROTECTION_STATUS 0xDC03
142#define MTP_PROPERTY_OBJECT_SIZE 0xDC04
143#define MTP_PROPERTY_ASSOCIATION_TYPE 0xDC05
144#define MTP_PROPERTY_ASSOCIATION_DESC 0xDC06
145#define MTP_PROPERTY_OBJECT_FILE_NAME 0xDC07
146#define MTP_PROPERTY_DATE_CREATED 0xDC08
147#define MTP_PROPERTY_DATE_MODIFIED 0xDC09
148#define MTP_PROPERTY_KEYWORDS 0xDC0A
149#define MTP_PROPERTY_PARENT_OBJECT 0xDC0B
150#define MTP_PROPERTY_ALLOWED_FOLDER_CONTENTS 0xDC0C
151#define MTP_PROPERTY_HIDDEN 0xDC0D
152#define MTP_PROPERTY_SYSTEM_OBJECT 0xDC0E
153#define MTP_PROPERTY_PERSISTENT_UID 0xDC41
154#define MTP_PROPERTY_SYNC_ID 0xDC42
155#define MTP_PROPERTY_PROPERTY_BAG 0xDC43
156#define MTP_PROPERTY_NAME 0xDC44
157#define MTP_PROPERTY_CREATED_BY 0xDC45
158#define MTP_PROPERTY_ARTIST 0xDC46
159#define MTP_PROPERTY_DATE_AUTHORED 0xDC47
160#define MTP_PROPERTY_DESCRIPTION 0xDC48
161#define MTP_PROPERTY_URL_REFERENCE 0xDC49
162#define MTP_PROPERTY_LANGUAGE_LOCALE 0xDC4A
163#define MTP_PROPERTY_COPYRIGHT_INFORMATION 0xDC4B
164#define MTP_PROPERTY_SOURCE 0xDC4C
165#define MTP_PROPERTY_ORIGIN_LOCATION 0xDC4D
166#define MTP_PROPERTY_DATE_ADDED 0xDC4E
167#define MTP_PROPERTY_NON_CONSUMABLE 0xDC4F
168#define MTP_PROPERTY_CORRUPT_UNPLAYABLE 0xDC50
169#define MTP_PROPERTY_PRODUCER_SERIAL_NUMBER 0xDC51
170#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_FORMAT 0xDC81
171#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_SIZE 0xDC82
172#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_HEIGHT 0xDC83
173#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_WIDTH 0xDC84
174#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_DURATION 0xDC85
175#define MTP_PROPERTY_REPRESENTATIVE_SAMPLE_DATA 0xDC86
176#define MTP_PROPERTY_WIDTH 0xDC87
177#define MTP_PROPERTY_HEIGHT 0xDC88
178#define MTP_PROPERTY_DURATION 0xDC89
179#define MTP_PROPERTY_RATING 0xDC8A
180#define MTP_PROPERTY_TRACK 0xDC8B
181#define MTP_PROPERTY_GENRE 0xDC8C
182#define MTP_PROPERTY_CREDITS 0xDC8D
183#define MTP_PROPERTY_LYRICS 0xDC8E
184#define MTP_PROPERTY_SUBSCRIPTION_CONTENT_ID 0xDC8F
185#define MTP_PROPERTY_PRODUCED_BY 0xDC90
186#define MTP_PROPERTY_USE_COUNT 0xDC91
187#define MTP_PROPERTY_SKIP_COUNT 0xDC92
188#define MTP_PROPERTY_LAST_ACCESSED 0xDC93
189#define MTP_PROPERTY_PARENTAL_RATING 0xDC94
190#define MTP_PROPERTY_META_GENRE 0xDC95
191#define MTP_PROPERTY_COMPOSER 0xDC96
192#define MTP_PROPERTY_EFFECTIVE_RATING 0xDC97
193#define MTP_PROPERTY_SUBTITLE 0xDC98
194#define MTP_PROPERTY_ORIGINAL_RELEASE_DATE 0xDC99
195#define MTP_PROPERTY_ALBUM_NAME 0xDC9A
196#define MTP_PROPERTY_ALBUM_ARTIST 0xDC9B
197#define MTP_PROPERTY_MOOD 0xDC9C
198#define MTP_PROPERTY_DRM_STATUS 0xDC9D
199#define MTP_PROPERTY_SUB_DESCRIPTION 0xDC9E
200#define MTP_PROPERTY_IS_CROPPED 0xDCD1
201#define MTP_PROPERTY_IS_COLOUR_CORRECTED 0xDCD2
202#define MTP_PROPERTY_IMAGE_BIT_DEPTH 0xDCD3
203#define MTP_PROPERTY_F_NUMBER 0xDCD4
204#define MTP_PROPERTY_EXPOSURE_TIME 0xDCD5
205#define MTP_PROPERTY_EXPOSURE_INDEX 0xDCD6
206#define MTP_PROPERTY_TOTAL_BITRATE 0xDE91
207#define MTP_PROPERTY_BITRATE_TYPE 0xDE92
208#define MTP_PROPERTY_SAMPLE_RATE 0xDE93
209#define MTP_PROPERTY_NUMBER_OF_CHANNELS 0xDE94
210#define MTP_PROPERTY_AUDIO_BIT_DEPTH 0xDE95
211#define MTP_PROPERTY_SCAN_TYPE 0xDE97
212#define MTP_PROPERTY_AUDIO_WAVE_CODEC 0xDE99
213#define MTP_PROPERTY_AUDIO_BITRATE 0xDE9A
214#define MTP_PROPERTY_VIDEO_FOURCC_CODEC 0xDE9B
215#define MTP_PROPERTY_VIDEO_BITRATE 0xDE9C
216#define MTP_PROPERTY_FRAMES_PER_THOUSAND_SECONDS 0xDE9D
217#define MTP_PROPERTY_KEYFRAME_DISTANCE 0xDE9E
218#define MTP_PROPERTY_BUFFER_SIZE 0xDE9F
219#define MTP_PROPERTY_ENCODING_QUALITY 0xDEA0
220#define MTP_PROPERTY_ENCODING_PROFILE 0xDEA1
221#define MTP_PROPERTY_DISPLAY_NAME 0xDCE0
222#define MTP_PROPERTY_BODY_TEXT 0xDCE1
223#define MTP_PROPERTY_SUBJECT 0xDCE2
224#define MTP_PROPERTY_PRIORITY 0xDCE3
225#define MTP_PROPERTY_GIVEN_NAME 0xDD00
226#define MTP_PROPERTY_MIDDLE_NAMES 0xDD01
227#define MTP_PROPERTY_FAMILY_NAME 0xDD02
228#define MTP_PROPERTY_PREFIX 0xDD03
229#define MTP_PROPERTY_SUFFIX 0xDD04
230#define MTP_PROPERTY_PHONETIC_GIVEN_NAME 0xDD05
231#define MTP_PROPERTY_PHONETIC_FAMILY_NAME 0xDD06
232#define MTP_PROPERTY_EMAIL_PRIMARY 0xDD07
233#define MTP_PROPERTY_EMAIL_PERSONAL_1 0xDD08
234#define MTP_PROPERTY_EMAIL_PERSONAL_2 0xDD09
235#define MTP_PROPERTY_EMAIL_BUSINESS_1 0xDD0A
236#define MTP_PROPERTY_EMAIL_BUSINESS_2 0xDD0B
237#define MTP_PROPERTY_EMAIL_OTHERS 0xDD0C
238#define MTP_PROPERTY_PHONE_NUMBER_PRIMARY 0xDD0D
239#define MTP_PROPERTY_PHONE_NUMBER_PERSONAL 0xDD0E
240#define MTP_PROPERTY_PHONE_NUMBER_PERSONAL_2 0xDD0F
241#define MTP_PROPERTY_PHONE_NUMBER_BUSINESS 0xDD10
242#define MTP_PROPERTY_PHONE_NUMBER_BUSINESS_2 0xDD11
243#define MTP_PROPERTY_PHONE_NUMBER_MOBILE 0xDD12
244#define MTP_PROPERTY_PHONE_NUMBER_MOBILE_2 0xDD13
245#define MTP_PROPERTY_FAX_NUMBER_PRIMARY 0xDD14
246#define MTP_PROPERTY_FAX_NUMBER_PERSONAL 0xDD15
247#define MTP_PROPERTY_FAX_NUMBER_BUSINESS 0xDD16
248#define MTP_PROPERTY_PAGER_NUMBER 0xDD17
249#define MTP_PROPERTY_PHONE_NUMBER_OTHERS 0xDD18
250#define MTP_PROPERTY_PRIMARY_WEB_ADDRESS 0xDD19
251#define MTP_PROPERTY_PERSONAL_WEB_ADDRESS 0xDD1A
252#define MTP_PROPERTY_BUSINESS_WEB_ADDRESS 0xDD1B
253#define MTP_PROPERTY_INSTANT_MESSANGER_ADDRESS 0xDD1C
254#define MTP_PROPERTY_INSTANT_MESSANGER_ADDRESS_2 0xDD1D
255#define MTP_PROPERTY_INSTANT_MESSANGER_ADDRESS_3 0xDD1E
256#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_FULL 0xDD1F
257#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_LINE_1 0xDD20
258#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_LINE_2 0xDD21
259#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_CITY 0xDD22
260#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_REGION 0xDD23
261#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_POSTAL_CODE 0xDD24
262#define MTP_PROPERTY_POSTAL_ADDRESS_PERSONAL_COUNTRY 0xDD25
263#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_FULL 0xDD26
264#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_LINE_1 0xDD27
265#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_LINE_2 0xDD28
266#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_CITY 0xDD29
267#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_REGION 0xDD2A
268#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_POSTAL_CODE 0xDD2B
269#define MTP_PROPERTY_POSTAL_ADDRESS_BUSINESS_COUNTRY 0xDD2C
270#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_FULL 0xDD2D
271#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_LINE_1 0xDD2E
272#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_LINE_2 0xDD2F
273#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_CITY 0xDD30
274#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_REGION 0xDD31
275#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_POSTAL_CODE 0xDD32
276#define MTP_PROPERTY_POSTAL_ADDRESS_OTHER_COUNTRY 0xDD33
277#define MTP_PROPERTY_ORGANIZATION_NAME 0xDD34
278#define MTP_PROPERTY_PHONETIC_ORGANIZATION_NAME 0xDD35
279#define MTP_PROPERTY_ROLE 0xDD36
280#define MTP_PROPERTY_BIRTHDATE 0xDD37
281#define MTP_PROPERTY_MESSAGE_TO 0xDD40
282#define MTP_PROPERTY_MESSAGE_CC 0xDD41
283#define MTP_PROPERTY_MESSAGE_BCC 0xDD42
284#define MTP_PROPERTY_MESSAGE_READ 0xDD43
285#define MTP_PROPERTY_MESSAGE_RECEIVED_TIME 0xDD44
286#define MTP_PROPERTY_MESSAGE_SENDER 0xDD45
287#define MTP_PROPERTY_ACTIVITY_BEGIN_TIME 0xDD50
288#define MTP_PROPERTY_ACTIVITY_END_TIME 0xDD51
289#define MTP_PROPERTY_ACTIVITY_LOCATION 0xDD52
290#define MTP_PROPERTY_ACTIVITY_REQUIRED_ATTENDEES 0xDD54
291#define MTP_PROPERTY_ACTIVITY_OPTIONAL_ATTENDEES 0xDD55
292#define MTP_PROPERTY_ACTIVITY_RESOURCES 0xDD56
293#define MTP_PROPERTY_ACTIVITY_ACCEPTED 0xDD57
294#define MTP_PROPERTY_ACTIVITY_TENTATIVE 0xDD58
295#define MTP_PROPERTY_ACTIVITY_DECLINED 0xDD59
296#define MTP_PROPERTY_ACTIVITY_REMAINDER_TIME 0xDD5A
297#define MTP_PROPERTY_ACTIVITY_OWNER 0xDD5B
298#define MTP_PROPERTY_ACTIVITY_STATUS 0xDD5C
299#define MTP_PROPERTY_OWNER 0xDD5D
300#define MTP_PROPERTY_EDITOR 0xDD5E
301#define MTP_PROPERTY_WEBMASTER 0xDD5F
302#define MTP_PROPERTY_URL_SOURCE 0xDD60
303#define MTP_PROPERTY_URL_DESTINATION 0xDD61
304#define MTP_PROPERTY_TIME_BOOKMARK 0xDD62
305#define MTP_PROPERTY_OBJECT_BOOKMARK 0xDD63
306#define MTP_PROPERTY_BYTE_BOOKMARK 0xDD64
307#define MTP_PROPERTY_LAST_BUILD_DATE 0xDD70
308#define MTP_PROPERTY_TIME_TO_LIVE 0xDD71
309#define MTP_PROPERTY_MEDIA_GUID 0xDD72
310
311// MTP Device Property Codes
312#define MTP_DEVICE_PROPERTY_UNDEFINED 0x5000
313#define MTP_DEVICE_PROPERTY_BATTERY_LEVEL 0x5001
314#define MTP_DEVICE_PROPERTY_FUNCTIONAL_MODE 0x5002
315#define MTP_DEVICE_PROPERTY_IMAGE_SIZE 0x5003
316#define MTP_DEVICE_PROPERTY_COMPRESSION_SETTING 0x5004
317#define MTP_DEVICE_PROPERTY_WHITE_BALANCE 0x5005
318#define MTP_DEVICE_PROPERTY_RGB_GAIN 0x5006
319#define MTP_DEVICE_PROPERTY_F_NUMBER 0x5007
320#define MTP_DEVICE_PROPERTY_FOCAL_LENGTH 0x5008
321#define MTP_DEVICE_PROPERTY_FOCUS_DISTANCE 0x5009
322#define MTP_DEVICE_PROPERTY_FOCUS_MODE 0x500A
323#define MTP_DEVICE_PROPERTY_EXPOSURE_METERING_MODE 0x500B
324#define MTP_DEVICE_PROPERTY_FLASH_MODE 0x500C
325#define MTP_DEVICE_PROPERTY_EXPOSURE_TIME 0x500D
326#define MTP_DEVICE_PROPERTY_EXPOSURE_PROGRAM_MODE 0x500E
327#define MTP_DEVICE_PROPERTY_EXPOSURE_INDEX 0x500F
328#define MTP_DEVICE_PROPERTY_EXPOSURE_BIAS_COMPENSATION 0x5010
329#define MTP_DEVICE_PROPERTY_DATETIME 0x5011
330#define MTP_DEVICE_PROPERTY_CAPTURE_DELAY 0x5012
331#define MTP_DEVICE_PROPERTY_STILL_CAPTURE_MODE 0x5013
332#define MTP_DEVICE_PROPERTY_CONTRAST 0x5014
333#define MTP_DEVICE_PROPERTY_SHARPNESS 0x5015
334#define MTP_DEVICE_PROPERTY_DIGITAL_ZOOM 0x5016
335#define MTP_DEVICE_PROPERTY_EFFECT_MODE 0x5017
336#define MTP_DEVICE_PROPERTY_BURST_NUMBER 0x5018
337#define MTP_DEVICE_PROPERTY_BURST_INTERVAL 0x5019
338#define MTP_DEVICE_PROPERTY_TIMELAPSE_NUMBER 0x501A
339#define MTP_DEVICE_PROPERTY_TIMELAPSE_INTERVAL 0x501B
340#define MTP_DEVICE_PROPERTY_FOCUS_METERING_MODE 0x501C
341#define MTP_DEVICE_PROPERTY_UPLOAD_URL 0x501D
342#define MTP_DEVICE_PROPERTY_ARTIST 0x501E
343#define MTP_DEVICE_PROPERTY_COPYRIGHT_INFO 0x501F
344#define MTP_DEVICE_PROPERTY_SYNCHRONIZATION_PARTNER 0xD401
345#define MTP_DEVICE_PROPERTY_DEVICE_FRIENDLY_NAME 0xD402
346#define MTP_DEVICE_PROPERTY_VOLUME 0xD403
347#define MTP_DEVICE_PROPERTY_SUPPORTED_FORMATS_ORDERED 0xD404
348#define MTP_DEVICE_PROPERTY_DEVICE_ICON 0xD405
349#define MTP_DEVICE_PROPERTY_PLAYBACK_RATE 0xD410
350#define MTP_DEVICE_PROPERTY_PLAYBACK_OBJECT 0xD411
351#define MTP_DEVICE_PROPERTY_PLAYBACK_CONTAINER_INDEX 0xD412
352#define MTP_DEVICE_PROPERTY_SESSION_INITIATOR_VERSION_INFO 0xD406
353#define MTP_DEVICE_PROPERTY_PERCEIVED_DEVICE_TYPE 0xD407
354
355// MTP Operation Codes
356#define MTP_OPERATION_GET_DEVICE_INFO 0x1001
357#define MTP_OPERATION_OPEN_SESSION 0x1002
358#define MTP_OPERATION_CLOSE_SESSION 0x1003
359#define MTP_OPERATION_GET_STORAGE_IDS 0x1004
360#define MTP_OPERATION_GET_STORAGE_INFO 0x1005
361#define MTP_OPERATION_GET_NUM_OBJECTS 0x1006
362#define MTP_OPERATION_GET_OBJECT_HANDLES 0x1007
363#define MTP_OPERATION_GET_OBJECT_INFO 0x1008
364#define MTP_OPERATION_GET_OBJECT 0x1009
365#define MTP_OPERATION_GET_THUMB 0x100A
366#define MTP_OPERATION_DELETE_OBJECT 0x100B
367#define MTP_OPERATION_SEND_OBJECT_INFO 0x100C
368#define MTP_OPERATION_SEND_OBJECT 0x100D
369#define MTP_OPERATION_INITIATE_CAPTURE 0x100E
370#define MTP_OPERATION_FORMAT_STORE 0x100F
371#define MTP_OPERATION_RESET_DEVICE 0x1010
372#define MTP_OPERATION_SELF_TEST 0x1011
373#define MTP_OPERATION_SET_OBJECT_PROTECTION 0x1012
374#define MTP_OPERATION_POWER_DOWN 0x1013
375#define MTP_OPERATION_GET_DEVICE_PROP_DESC 0x1014
376#define MTP_OPERATION_GET_DEVICE_PROP_VALUE 0x1015
377#define MTP_OPERATION_SET_DEVICE_PROP_VALUE 0x1016
378#define MTP_OPERATION_RESET_DEVICE_PROP_VALUE 0x1017
379#define MTP_OPERATION_TERMINATE_OPEN_CAPTURE 0x1018
380#define MTP_OPERATION_MOVE_OBJECT 0x1019
381#define MTP_OPERATION_COPY_OBJECT 0x101A
382#define MTP_OPERATION_GET_PARTIAL_OBJECT 0x101B
383#define MTP_OPERATION_INITIATE_OPEN_CAPTURE 0x101C
384#define MTP_OPERATION_GET_OBJECT_PROPS_SUPPORTED 0x9801
385#define MTP_OPERATION_GET_OBJECT_PROP_DESC 0x9802
386#define MTP_OPERATION_GET_OBJECT_PROP_VALUE 0x9803
387#define MTP_OPERATION_SET_OBJECT_PROP_VALUE 0x9804
388#define MTP_OPERATION_GET_OBJECT_PROP_LIST 0x9805
389#define MTP_OPERATION_SET_OBJECT_PROP_LIST 0x9806
390#define MTP_OPERATION_GET_INTERDEPENDENT_PROP_DESC 0x9807
391#define MTP_OPERATION_SEND_OBJECT_PROP_LIST 0x9808
392#define MTP_OPERATION_GET_OBJECT_REFERENCES 0x9810
393#define MTP_OPERATION_SET_OBJECT_REFERENCES 0x9811
394#define MTP_OPERATION_SKIP 0x9820
395
396// Android extensions for direct file IO
397
398// Same as GetPartialObject, but with 64 bit offset
399#define MTP_OPERATION_GET_PARTIAL_OBJECT_64 0x95C1
400// Same as GetPartialObject64, but copying host to device
401#define MTP_OPERATION_SEND_PARTIAL_OBJECT 0x95C2
402// Truncates file to 64 bit length
403#define MTP_OPERATION_TRUNCATE_OBJECT 0x95C3
404// Must be called before using SendPartialObject and TruncateObject
405#define MTP_OPERATION_BEGIN_EDIT_OBJECT 0x95C4
406// Called to commit changes made by SendPartialObject and TruncateObject
407#define MTP_OPERATION_END_EDIT_OBJECT 0x95C5
408
409// MTP Response Codes
410#define MTP_RESPONSE_UNDEFINED 0x2000
411#define MTP_RESPONSE_OK 0x2001
412#define MTP_RESPONSE_GENERAL_ERROR 0x2002
413#define MTP_RESPONSE_SESSION_NOT_OPEN 0x2003
414#define MTP_RESPONSE_INVALID_TRANSACTION_ID 0x2004
415#define MTP_RESPONSE_OPERATION_NOT_SUPPORTED 0x2005
416#define MTP_RESPONSE_PARAMETER_NOT_SUPPORTED 0x2006
417#define MTP_RESPONSE_INCOMPLETE_TRANSFER 0x2007
418#define MTP_RESPONSE_INVALID_STORAGE_ID 0x2008
419#define MTP_RESPONSE_INVALID_OBJECT_HANDLE 0x2009
420#define MTP_RESPONSE_DEVICE_PROP_NOT_SUPPORTED 0x200A
421#define MTP_RESPONSE_INVALID_OBJECT_FORMAT_CODE 0x200B
422#define MTP_RESPONSE_STORAGE_FULL 0x200C
423#define MTP_RESPONSE_OBJECT_WRITE_PROTECTED 0x200D
424#define MTP_RESPONSE_STORE_READ_ONLY 0x200E
425#define MTP_RESPONSE_ACCESS_DENIED 0x200F
426#define MTP_RESPONSE_NO_THUMBNAIL_PRESENT 0x2010
427#define MTP_RESPONSE_SELF_TEST_FAILED 0x2011
428#define MTP_RESPONSE_PARTIAL_DELETION 0x2012
429#define MTP_RESPONSE_STORE_NOT_AVAILABLE 0x2013
430#define MTP_RESPONSE_SPECIFICATION_BY_FORMAT_UNSUPPORTED 0x2014
431#define MTP_RESPONSE_NO_VALID_OBJECT_INFO 0x2015
432#define MTP_RESPONSE_INVALID_CODE_FORMAT 0x2016
433#define MTP_RESPONSE_UNKNOWN_VENDOR_CODE 0x2017
434#define MTP_RESPONSE_CAPTURE_ALREADY_TERMINATED 0x2018
435#define MTP_RESPONSE_DEVICE_BUSY 0x2019
436#define MTP_RESPONSE_INVALID_PARENT_OBJECT 0x201A
437#define MTP_RESPONSE_INVALID_DEVICE_PROP_FORMAT 0x201B
438#define MTP_RESPONSE_INVALID_DEVICE_PROP_VALUE 0x201C
439#define MTP_RESPONSE_INVALID_PARAMETER 0x201D
440#define MTP_RESPONSE_SESSION_ALREADY_OPEN 0x201E
441#define MTP_RESPONSE_TRANSACTION_CANCELLED 0x201F
442#define MTP_RESPONSE_SPECIFICATION_OF_DESTINATION_UNSUPPORTED 0x2020
443#define MTP_RESPONSE_INVALID_OBJECT_PROP_CODE 0xA801
444#define MTP_RESPONSE_INVALID_OBJECT_PROP_FORMAT 0xA802
445#define MTP_RESPONSE_INVALID_OBJECT_PROP_VALUE 0xA803
446#define MTP_RESPONSE_INVALID_OBJECT_REFERENCE 0xA804
447#define MTP_RESPONSE_GROUP_NOT_SUPPORTED 0xA805
448#define MTP_RESPONSE_INVALID_DATASET 0xA806
449#define MTP_RESPONSE_SPECIFICATION_BY_GROUP_UNSUPPORTED 0xA807
450#define MTP_RESPONSE_SPECIFICATION_BY_DEPTH_UNSUPPORTED 0xA808
451#define MTP_RESPONSE_OBJECT_TOO_LARGE 0xA809
452#define MTP_RESPONSE_OBJECT_PROP_NOT_SUPPORTED 0xA80A
453
454// MTP Event Codes
455#define MTP_EVENT_UNDEFINED 0x4000
456#define MTP_EVENT_CANCEL_TRANSACTION 0x4001
457#define MTP_EVENT_OBJECT_ADDED 0x4002
458#define MTP_EVENT_OBJECT_REMOVED 0x4003
459#define MTP_EVENT_STORE_ADDED 0x4004
460#define MTP_EVENT_STORE_REMOVED 0x4005
461#define MTP_EVENT_DEVICE_PROP_CHANGED 0x4006
462#define MTP_EVENT_OBJECT_INFO_CHANGED 0x4007
463#define MTP_EVENT_DEVICE_INFO_CHANGED 0x4008
464#define MTP_EVENT_REQUEST_OBJECT_TRANSFER 0x4009
465#define MTP_EVENT_STORE_FULL 0x400A
466#define MTP_EVENT_DEVICE_RESET 0x400B
467#define MTP_EVENT_STORAGE_INFO_CHANGED 0x400C
468#define MTP_EVENT_CAPTURE_COMPLETE 0x400D
469#define MTP_EVENT_UNREPORTED_STATUS 0x400E
470#define MTP_EVENT_OBJECT_PROP_CHANGED 0xC801
471#define MTP_EVENT_OBJECT_PROP_DESC_CHANGED 0xC802
472#define MTP_EVENT_OBJECT_REFERENCES_CHANGED 0xC803
473
474// Storage Type
475#define MTP_STORAGE_FIXED_ROM 0x0001
476#define MTP_STORAGE_REMOVABLE_ROM 0x0002
477#define MTP_STORAGE_FIXED_RAM 0x0003
478#define MTP_STORAGE_REMOVABLE_RAM 0x0004
479
480// Storage File System
481#define MTP_STORAGE_FILESYSTEM_FLAT 0x0001
482#define MTP_STORAGE_FILESYSTEM_HIERARCHICAL 0x0002
483#define MTP_STORAGE_FILESYSTEM_DCF 0x0003
484
485// Storage Access Capability
486#define MTP_STORAGE_READ_WRITE 0x0000
487#define MTP_STORAGE_READ_ONLY_WITHOUT_DELETE 0x0001
488#define MTP_STORAGE_READ_ONLY_WITH_DELETE 0x0002
489
490// Association Type
491#define MTP_ASSOCIATION_TYPE_UNDEFINED 0x0000
492#define MTP_ASSOCIATION_TYPE_GENERIC_FOLDER 0x0001
493
494// Supported Playback Formats
495#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED 0x3000
496/** Format code for associations (folders and directories) */
497#define SUPPORTED_PLAYBACK_FORMAT_ASSOCIATION 0x3001
498/** Format code for script files */
499#define SUPPORTED_PLAYBACK_FORMAT_SCRIPT 0x3002
500/** Format code for executable files */
501#define SUPPORTED_PLAYBACK_FORMAT_EXECUTABLE 0x3003
502/** Format code for text files */
503#define SUPPORTED_PLAYBACK_FORMAT_TEXT 0x3004
504/** Format code for HTML files */
505#define SUPPORTED_PLAYBACK_FORMAT_HTML 0x3005
506/** Format code for DPOF files */
507#define SUPPORTED_PLAYBACK_FORMAT_DPOF 0x3006
508/** Format code for AIFF audio files */
509#define SUPPORTED_PLAYBACK_FORMAT_AIFF 0x3007
510/** Format code for WAV audio files */
511#define SUPPORTED_PLAYBACK_FORMAT_WAV 0x3008
512/** Format code for MP3 audio files */
513#define SUPPORTED_PLAYBACK_FORMAT_MP3 0x3009
514/** Format code for AVI video files */
515#define SUPPORTED_PLAYBACK_FORMAT_AVI 0x300A
516/** Format code for MPEG video files */
517#define SUPPORTED_PLAYBACK_FORMAT_MPEG 0x300B
518/** Format code for ASF files */
519#define SUPPORTED_PLAYBACK_FORMAT_ASF 0x300C
520/** Format code for JPEG image files */
521#define SUPPORTED_PLAYBACK_FORMAT_EXIF_JPEG 0x3801
522/** Format code for TIFF EP image files */
523#define SUPPORTED_PLAYBACK_FORMAT_TIFF_EP 0x3802
524/** Format code for BMP image files */
525#define SUPPORTED_PLAYBACK_FORMAT_BMP 0x3804
526/** Format code for GIF image files */
527#define SUPPORTED_PLAYBACK_FORMAT_GIF 0x3807
528/** Format code for JFIF image files */
529#define SUPPORTED_PLAYBACK_FORMAT_JFIF 0x3808
530/** Format code for PICT image files */
531#define SUPPORTED_PLAYBACK_FORMAT_PICT 0x380A
532/** Format code for PNG image files */
533#define SUPPORTED_PLAYBACK_FORMAT_PNG 0x380B
534/** Format code for TIFF image files */
535#define SUPPORTED_PLAYBACK_FORMAT_TIFF 0x380D
536/** Format code for JP2 files */
537#define SUPPORTED_PLAYBACK_FORMAT_JP2 0x380F
538/** Format code for JPX files */
539#define SUPPORTED_PLAYBACK_FORMAT_JPX 0x3810
540/** Format code for firmware files */
541#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED_FIRMWARE 0xB802
542/** Format code for Windows image files */
543#define SUPPORTED_PLAYBACK_FORMAT_WINDOWS_IMAGE_FORMAT 0xB881
544/** Format code for undefined audio files files */
545#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED_AUDIO 0xB900
546/** Format code for WMA audio files */
547#define SUPPORTED_PLAYBACK_FORMAT_WMA 0xB901
548/** Format code for OGG audio files */
549#define SUPPORTED_PLAYBACK_FORMAT_OGG 0xB902
550/** Format code for AAC audio files */
551#define SUPPORTED_PLAYBACK_FORMAT_AAC 0xB903
552/** Format code for Audible audio files */
553#define SUPPORTED_PLAYBACK_FORMAT_AUDIBLE 0xB904
554/** Format code for FLAC audio files */
555#define SUPPORTED_PLAYBACK_FORMAT_FLAC 0xB906
556/** Format code for undefined video files */
557#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED_VIDEO 0xB980
558/** Format code for WMV video files */
559#define SUPPORTED_PLAYBACK_FORMAT_WMV 0xB981
560/** Format code for MP4 files */
561#define SUPPORTED_PLAYBACK_FORMAT_MP4_CONTAINER 0xB982
562/** Format code for MP2 files */
563#define SUPPORTED_PLAYBACK_FORMAT_MP2 0xB983
564/** Format code for 3GP files */
565#define SUPPORTED_PLAYBACK_FORMAT_3GP_CONTAINER 0xB984
566/** Format code for undefined collections */
567#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED_COLLECTION 0xBA00
568/** Format code for multimedia albums */
569#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_MULTIMEDIA_ALBUM 0xBA01
570/** Format code for image albums */
571#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_IMAGE_ALBUM 0xBA02
572/** Format code for audio albums */
573#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_AUDIO_ALBUM 0xBA03
574/** Format code for video albums */
575#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_VIDEO_ALBUM 0xBA04
576/** Format code for abstract AV playlists */
577#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_AV_PLAYLIST 0xBA05
578/** Format code for abstract audio playlists */
579#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_AUDIO_PLAYLIST 0xBA09
580/** Format code for abstract video playlists */
581#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_VIDEO_PLAYLIST 0xBA0A
582/** Format code for abstract mediacasts */
583#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_MEDIACAST 0xBA0B
584/** Format code for WPL playlist files */
585#define SUPPORTED_PLAYBACK_FORMAT_WPL_PLAYLIST 0xBA10
586/** Format code for M3u playlist files */
587#define SUPPORTED_PLAYBACK_FORMAT_M3U_PLAYLIST 0xBA11
588/** Format code for MPL playlist files */
589#define SUPPORTED_PLAYBACK_FORMAT_MPL_PLAYLIST 0xBA12
590/** Format code for ASX playlist files */
591#define SUPPORTED_PLAYBACK_FORMAT_ASX_PLAYLIST 0xBA13
592/** Format code for PLS playlist files */
593#define SUPPORTED_PLAYBACK_FORMAT_PLS_PLAYLIST 0xBA14
594/** Format code for undefined document files */
595#define SUPPORTED_PLAYBACK_FORMAT_UNDEFINED_DOCUMENT 0xBA80
596/** Format code for abstract documents */
597#define SUPPORTED_PLAYBACK_FORMAT_ABSTRACT_DOCUMENT 0xBA81
598/** Format code for XML documents */
599#define SUPPORTED_PLAYBACK_FORMAT_XML_DOCUMENT 0xBA82
600/** Format code for MS Word documents */
601#define SUPPORTED_PLAYBACK_FORMAT_MS_WORD_DOCUMENT 0xBA83
602/** Format code for MS Excel spreadsheets */
603#define SUPPORTED_PLAYBACK_FORMAT_MS_EXCEL_SPREADSHEET 0xBA85
604/** Format code for MS PowerPoint presentatiosn */
605#define SUPPORTED_PLAYBACK_FORMAT_MS_POWERPOINT_PRESENTATION 0xBA86
606
607#endif // _MTP_H