2 * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
28 * @brief This file contains the MTP API
30 #ifndef TIZEN_ERROR_MTP
31 #define TIZEN_ERROR_MTP -0x01CC0000
35 * @addtogroup CAPI_NETWORK_MTP_MANAGER_MODULE
40 * @brief The handle to the mtp device
43 typedef int mtp_device_h;
46 * @brief The handle to the mtp storage
49 typedef int mtp_storage_h;
52 * @brief The handle to the mtp object
55 typedef int mtp_object_h;
58 * @brief Error codes reported by the MTP API.
62 MTP_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
63 MTP_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
64 MTP_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
65 MTP_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
66 MTP_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
67 MTP_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported */
68 MTP_ERROR_COMM_ERROR = TIZEN_ERROR_MTP | 0x01, /**< MTP communication error */
69 MTP_ERROR_CONTROLLER = TIZEN_ERROR_MTP | 0x02, /**< MTP controller error */
70 MTP_ERROR_NO_DEVICE = TIZEN_ERROR_MTP | 0x03, /**< MTP have not any device */
71 MTP_ERROR_NOT_INITIALIZED = TIZEN_ERROR_MTP | 0x04, /**< MTP is not initialized */
72 MTP_ERROR_NOT_ACTIVATED = TIZEN_ERROR_MTP | 0x05, /**< MTP is not activated */
73 MTP_ERROR_NOT_COMM_INITIALIZED = TIZEN_ERROR_MTP | 0x06, /**< MTP communication is not initialized */
74 MTP_ERROR_PLUGIN_FAIL = TIZEN_ERROR_MTP | 0x07, /**< MTP Plugin failed */
78 * @brief Enumerations for MTP Storage type
82 MTP_STORAGE_TYPE_UNDEFINED, /**< Storage type is undefined */
83 MTP_STORAGE_TYPE_FIXED_ROM, /**< Storage type is fixed ROM */
84 MTP_STORAGE_TYPE_REMOVABLE_ROM, /**< Storage type is removable ROM */
85 MTP_STORAGE_TYPE_FIXED_RAM, /**< Storage type is fixed RAM */
86 MTP_STORAGE_TYPE_REMOVABLE_RAM /**< Storage type is Removable RAM */
90 * @brief Enumerations for MTP file type
94 MTP_FILETYPE_FOLDER, /**< FOLDER file type */
95 MTP_FILETYPE_WAV, /**< WAV file type */
96 MTP_FILETYPE_MP3, /**< MP3 file type */
97 MTP_FILETYPE_WMA, /**< WMA file type */
98 MTP_FILETYPE_OGG, /**< OGG file type */
99 MTP_FILETYPE_AUDIBLE, /**< AUDIBLE file type */
100 MTP_FILETYPE_MP4, /**< MP4 file type */
101 MTP_FILETYPE_UNDEF_AUDIO, /**< UNDEF_AUDIO file type */
102 MTP_FILETYPE_WMV, /**< WMV file type */
103 MTP_FILETYPE_AVI, /**< AVI file type */
104 MTP_FILETYPE_MPEG, /**< MPEG file type */
105 MTP_FILETYPE_ASF, /**< ASF file type */
106 MTP_FILETYPE_QT, /**< QT file type */
107 MTP_FILETYPE_UNDEF_VIDEO, /**< UNDEF_VIDEO file type */
108 MTP_FILETYPE_JPEG, /**< JPEG file type */
109 MTP_FILETYPE_JFIF, /**< JFIF file type */
110 MTP_FILETYPE_TIFF, /**< TIFF file type */
111 MTP_FILETYPE_BMP, /**< BMP file type */
112 MTP_FILETYPE_GIF, /**< GIF file type */
113 MTP_FILETYPE_PICT, /**< PICT file type */
114 MTP_FILETYPE_PNG, /**< PNG file type */
115 MTP_FILETYPE_VCALENDAR1, /**< VCALENDAR1 file type */
116 MTP_FILETYPE_VCALENDAR2, /**< VCALENDAR2 file type */
117 MTP_FILETYPE_VCARD2, /**< VCARD2 file type */
118 MTP_FILETYPE_VCARD3, /**< VCARD3 file type */
119 MTP_FILETYPE_WINDOWSIMAGEFORMAT, /**< WINDOWSIMAGEFORMAT file type */
120 MTP_FILETYPE_WINEXEC, /**< WINEXEC file type */
121 MTP_FILETYPE_TEXT, /**< TEXT file type */
122 MTP_FILETYPE_HTML, /**< HTML file type */
123 MTP_FILETYPE_FIRMWARE, /**< FIRMWARE file type */
124 MTP_FILETYPE_AAC, /**< AAC file type */
125 MTP_FILETYPE_MEDIACARD, /**< MEDIACARD file type */
126 MTP_FILETYPE_FLAC, /**< FLAC file type */
127 MTP_FILETYPE_MP2, /**< MP2 file type */
128 MTP_FILETYPE_M4A, /**< M4A file type */
129 MTP_FILETYPE_DOC, /**< DOC file type */
130 MTP_FILETYPE_XML, /**< XML file type */
131 MTP_FILETYPE_XLS, /**< XLS file type */
132 MTP_FILETYPE_PPT, /**< PPT file type */
133 MTP_FILETYPE_MHT, /**< MHT file type */
134 MTP_FILETYPE_JP2, /**< JP2 file type */
135 MTP_FILETYPE_JPX, /**< JPX file type */
136 MTP_FILETYPE_ALBUM, /**< ALBUM file type */
137 MTP_FILETYPE_PLAYLIST, /**< PLAYLIST file type */
138 MTP_FILETYPE_UNKNOWN, /**< Unknown file type */
140 MTP_FILETYPE_ALL, /**< Helper enum value for certain function */
141 MTP_FILETYPE_ALL_IMAGE /**< Helper enum value for certain function */
145 * @brief Enumerations for MTP event type
149 MTP_EVENT_UNKNOWN, /**< Unknown event type */
150 MTP_EVENT_STORAGE_ADDED, /**< Storage is added */
151 MTP_EVENT_STORAGE_REMOVED, /**< Storage is removed */
152 MTP_EVENT_OBJECT_ADDED, /**< Object is added */
153 MTP_EVENT_OBJECT_REMOVED, /**< Object is removed */
154 MTP_EVENT_DEVICE_ADDED, /**< Device is added */
155 MTP_EVENT_DEVICE_REMOVED, /**< Device is removed */
156 MTP_EVENT_TURNED_OFF /**< MTP is turned off */
160 * @brief Called when mtp event is occured.
162 * @remarks Depending on the type of event, the meaning of event parameter is different.
163 * - If event is device event, then event_parameter type is mtp_device_h.
164 * - If event is storage event, then event_parameter type is mtp_storage_h.
165 * - If event is object event, then event_parameter type is mtp_object_h.
166 * - If event is MTP_EVENT_TURNED_OFF, then event_parameter is 0.
168 * @param [in] event The event
169 * @param [in] event_parameter The event parameter
170 * @param [in] user_data The user data passed from the callback registration function
172 * @see mtp_set_mtp_event_cb()
173 * @see mtp_unset_mtp_event_cb()
175 typedef void (* mtp_event_cb)(mtp_event_e event, int event_parameter, void *user_data);
178 * @brief Initializes for using MTP.
180 * @remarks This function must be called before proceeding any other mtp functions.
181 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
182 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
184 * @return 0 on success, otherwise a negative error value.
185 * @retval #MTP_ERROR_NONE Successful
186 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
187 * @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied
188 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
190 * @see mtp_deinitialize()
192 int mtp_initialize(void);
195 * @brief Gets the mtp devices.
197 * @param [out] mtp_devices The MTP device list
198 * @param [out] device_count Length of device list
200 * @return 0 on success, otherwise a negative error value.
201 * @retval #MTP_ERROR_NONE Successful
202 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
203 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
204 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
205 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
206 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
207 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
209 * @see mtp_initialize()
211 int mtp_get_devices(mtp_device_h **mtp_devices, int *device_count);
214 * @brief Gets mtp storages from the given device.
216 * @remarks The @a mtp_storages should be freed using free().
218 * @param [in] mtp_device The MTP device
219 * @param [out] mtp_storages Current mtp storage list
220 * @param [out] storage_count Length of storage list
222 * @return 0 on success, otherwise a negative error value.
223 * @retval #MTP_ERROR_NONE Successful
224 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
225 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
226 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
227 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
228 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
229 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
231 * @see mtp_get_devices()
233 int mtp_get_storages(mtp_device_h mtp_device, mtp_storage_h **mtp_storages, int* storage_count);
236 * @brief Gets object handles from the given device and storage.
238 * @remarks The @a object_handles should be freed using free().
239 * @remarks If the @a parent is 0, it means "root folder" of mtp storage.
241 * @param [in] mtp_device The MTP device
242 * @param [in] mtp_storage The MTP storage
243 * @param [in] file_type The file type what you want
244 * @param [in] parent The parent object handle
245 * @param [out] object_handles The object handle list
246 * @param [out] object_count Length of object handle list
248 * @return 0 on success, otherwise a negative error value.
249 * @retval #MTP_ERROR_NONE Successful
250 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
251 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
252 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
253 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
254 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
255 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
257 * @see mtp_get_devices()
258 * @see mtp_get_storages()
260 int mtp_get_object_handles(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_filetype_e file_type,
261 mtp_object_h parent, mtp_object_h **object_handles, int* object_count);
264 * @brief Gets object for a given path from object handle.
266 * @remarks The @a dest_path is host storage path.
267 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
268 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
270 * @param [in] mtp_device The MTP device
271 * @param [in] object_handle The object handle
272 * @param [in] dest_path The dest path
274 * @return 0 on success, otherwise a negative error value.
275 * @retval #MTP_ERROR_NONE Successful
276 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
277 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
278 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
279 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
280 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
281 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
282 * @retval #MTP_ERROR_IO_ERROR I/O error
283 * @retval #MTP_ERROR_PERMISSION_DENIED Permission denied
285 * @see mtp_get_devices()
286 * @see mtp_get_object_handles()
288 int mtp_get_object(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
291 * @brief Gets thumbnail from the given object handle.
293 * @remarks The @a dest_path is host storage path.
294 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
295 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.
297 * @param [in] mtp_device The MTP device
298 * @param [in] object_handle The object handle
299 * @param [in] dest_path The dest path
301 * @return 0 on success, otherwise a negative error value.
302 * @retval #MTP_ERROR_NONE Successful
303 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
304 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
305 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
306 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
307 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
308 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
309 * @retval #MTP_ERROR_IO_ERROR I/O error
310 * @retval #MTP_ERROR_PERMISSION_DENIED Permission denied
312 * @see mtp_get_devices()
313 * @see mtp_get_object_handles()
315 int mtp_get_thumbnail(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
318 * @brief Adds a callback function for receiving MTP event.
320 * @remarks You can register multiple callback. \n
321 * If you don't want to receive the event, then using the mtp_remove_mtp_event_cb() function to unregister a callback.
322 * @remarks If device state is changed, #MTP_EVENT_DEVICE_ADDED or #MTP_EVENT_DEVICE_REMOVED event is occur. \n
323 * If storage state is changed, #MTP_EVENT_STORAGE_ADDED or #MTP_EVENT_STORAGE_REMOVED event is occur. \n
324 * If object state is changed, #MTP_EVENT_OBJECT_ADDED or #MTP_EVENT_OBJECT_REMOVED event is occur. \n
325 * If mtp service is turned off, #MTP_EVENT_TURNED_OFF event is occur. \n
327 * @param [in] event_cb The callback
328 * @param [in] user_data The user data
330 * @return 0 on success, otherwise a negative error value.
331 * @retval #MTP_ERROR_NONE Successful
332 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
333 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
334 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
336 * @see mtp_remove_mtp_event_cb()
338 int mtp_add_mtp_event_cb(mtp_event_cb event_cb, void *user_data);
341 * @brief Removes the callback function.
344 * @param [in] event_cb The callback
346 * @return 0 on success, otherwise a negative error value.
347 * @retval #MTP_ERROR_NONE Successful
348 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
349 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
350 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
352 * @see mtp_add_mtp_event_cb()
354 int mtp_remove_mtp_event_cb(mtp_event_cb event_cb);
357 * @brief Deinitializes MTP operation.
359 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
360 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
362 * @return 0 on success, otherwise a negative error value.
363 * @retval #MTP_ERROR_NONE Successful
364 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
365 * @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied
367 * @see mtp_initialize()
369 int mtp_deinitialize(void);
376 * @addtogroup CAPI_NETWORK_MTP_DEVICEINFO_MODULE
381 * @brief Gets the manufacturer name of the device information.
383 * @remarks The @a manufacturer_name should be freed using free().
385 * @param [in] mtp_device The MTP device
386 * @param [out] manufacturer_name The manufacturer name of Device information
388 * @return 0 on success, otherwise a negative error value.
389 * @retval #MTP_ERROR_NONE Successful
390 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
391 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
392 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
393 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
394 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
395 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
396 * @retval #MTP_ERROR_CONTROLLER MTP controller error
397 * @retval #MTP_ERROR_OUT_OF_MEMORY Memory Allocation failed
398 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
400 * @see mtp_get_devices()
402 int mtp_deviceinfo_get_manufacturer_name(mtp_device_h mtp_device, char **manufacturer_name);
405 * @brief Gets the model name of the device information.
407 * @remarks The @a model_name should be freed using free().
409 * @param [in] mtp_device The MTP device
410 * @param [out] model_name The model name of Device information
412 * @return 0 on success, otherwise a negative error value.
413 * @retval #MTP_ERROR_NONE Successful
414 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
415 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
416 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
417 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
418 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
419 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
420 * @retval #MTP_ERROR_CONTROLLER MTP controller error
421 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
422 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
424 * @see mtp_get_devices()
426 int mtp_deviceinfo_get_model_name(mtp_device_h mtp_device, char **model_name);
429 * @brief Gets the serial number of the device information.
431 * @remarks The @a serial_number should be freed using free().
433 * @param [in] mtp_device The MTP device
434 * @param [out] serial_number The serial number of Device information
436 * @return 0 on success, otherwise a negative error value.
437 * @retval #MTP_ERROR_NONE Successful
438 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
439 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
440 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
441 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
442 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
443 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
444 * @retval #MTP_ERROR_CONTROLLER MTP controller error
445 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
446 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
448 * @see mtp_get_devices()
450 int mtp_deviceinfo_get_serial_number(mtp_device_h mtp_device, char **serial_number);
453 * @brief Gets the device version of the device information.
455 * @remarks The @a device_version should be freed using free().
457 * @param [in] mtp_device The MTP device
458 * @param [out] device_version The device version of Device information
460 * @return 0 on success, otherwise a negative error value.
461 * @retval #MTP_ERROR_NONE Successful
462 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
463 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
464 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
465 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
466 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
467 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
468 * @retval #MTP_ERROR_CONTROLLER MTP controller error
469 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
470 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
472 * @see mtp_get_devices()
474 int mtp_deviceinfo_get_device_version(mtp_device_h mtp_device, char **device_version);
481 * @addtogroup CAPI_NETWORK_MTP_STORAGEINFO_MODULE
486 * @brief Gets the description of the storage information.
488 * @remarks The @a description should be freed using free().
490 * @param [in] mtp_device The MTP device
491 * @param [in] mtp_storage The MTP storage
492 * @param [out] description The description of Storage information
494 * @return 0 on success, otherwise a negative error value.
495 * @retval #MTP_ERROR_NONE Successful
496 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
497 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
498 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
499 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
500 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
501 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
502 * @retval #MTP_ERROR_CONTROLLER MTP controller error
503 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
504 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
506 * @see mtp_get_storages()
508 int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description);
511 * @brief Gets the free space of the storage information.
514 * @param [in] mtp_device The MTP device
515 * @param [in] mtp_storage The MTP storage
516 * @param [out] free_space The free space of Storage information
518 * @return 0 on success, otherwise a negative error value.
519 * @retval #MTP_ERROR_NONE Successful
520 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
521 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
522 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
523 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
524 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
525 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
526 * @retval #MTP_ERROR_CONTROLLER MTP controller error
527 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
528 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
530 * @see mtp_get_storages()
532 int mtp_storageinfo_get_free_space(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space);
535 * @brief Gets the max capacity of the storage information.
538 * @param [in] mtp_device The MTP device
539 * @param [in] mtp_storage The MTP storage
540 * @param [out] max_capacity The max capacity of Storage information
542 * @return 0 on success, otherwise a negative error value.
543 * @retval #MTP_ERROR_NONE Successful
544 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
545 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
546 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
547 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
548 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
549 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
550 * @retval #MTP_ERROR_CONTROLLER MTP controller error
551 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
552 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
554 * @see mtp_get_storages()
556 int mtp_storageinfo_get_max_capacity(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *max_capacity);
559 * @brief Gets the storage type of the storage information.
562 * @param [in] mtp_device The MTP device
563 * @param [in] mtp_storage The MTP storage
564 * @param [out] storage_type The storage type of Storage information
566 * @return 0 on success, otherwise a negative error value.
567 * @retval #MTP_ERROR_NONE Successful
568 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
569 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
570 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
571 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
572 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
573 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
574 * @retval #MTP_ERROR_CONTROLLER MTP controller error
575 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
576 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
578 * @see mtp_get_storages()
580 int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type);
583 * @brief Gets the volume identifier of the storage information.
585 * @remarks The @a volume_identifier should be freed using free().
587 * @param [in] mtp_device The MTP device
588 * @param [in] mtp_storage The MTP storage
589 * @param [out] volume_identifier The volume identifier of Storage information
591 * @return 0 on success, otherwise a negative error value.
592 * @retval #MTP_ERROR_NONE Successful
593 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
594 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
595 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
596 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
597 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
598 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
599 * @retval #MTP_ERROR_CONTROLLER MTP controller error
600 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
601 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
603 * @see mtp_get_object_handles()
605 int mtp_storageinfo_get_volume_identifier(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **volume_identifier);
612 * @addtogroup CAPI_NETWORK_MTP_OBJECTINFO_MODULE
617 * @brief Gets the filename of the object information.
619 * @remarks The @a file_name should be freed using free().
621 * @param [in] mtp_device The MTP device
622 * @param [in] object_handle The object handle
623 * @param [out] file_name The file name of Object information
625 * @return 0 on success, otherwise a negative error value.
626 * @retval #MTP_ERROR_NONE Successful
627 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
628 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
629 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
630 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
631 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
632 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
633 * @retval #MTP_ERROR_CONTROLLER MTP controller error
634 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
635 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
636 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
638 * @see mtp_get_object_handles()
640 int mtp_objectinfo_get_file_name(mtp_device_h mtp_device, mtp_object_h object_handle, char **file_name);
643 * @brief Gets the keywords of the object information.
645 * @remarks The @a keywords should be freed using free().
646 * @remarks The keywords are separated by comma.
648 * @param [in] mtp_device The MTP device
649 * @param [in] object_handle The object handle
650 * @param [out] keywords The keywords of Object information
652 * @return 0 on success, otherwise a negative error value.
653 * @retval #MTP_ERROR_NONE Successful
654 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
655 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
656 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
657 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
658 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
659 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
660 * @retval #MTP_ERROR_CONTROLLER MTP controller error
661 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
662 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
663 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
665 * @see mtp_get_object_handles()
667 int mtp_objectinfo_get_keywords(mtp_device_h mtp_device, mtp_object_h object_handle, char **keywords);
670 * @brief Gets the association desc of the object information.
673 * @param [in] mtp_device The MTP device
674 * @param [in] object_handle The object handle
675 * @param [out] asso_desc The association description of Object information
677 * @return 0 on success, otherwise a negative error value.
678 * @retval #MTP_ERROR_NONE Successful
679 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
680 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
681 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
682 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
683 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
684 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
685 * @retval #MTP_ERROR_CONTROLLER MTP controller error
686 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
687 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
688 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
690 * @see mtp_get_object_handles()
692 int mtp_objectinfo_get_association_desc(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_desc);
695 * @brief Gets the association type of the object information.
698 * @param [in] mtp_device The MTP device
699 * @param [in] object_handle The object handle
700 * @param [out] asso_type The association type of Object information
702 * @return 0 on success, otherwise a negative error value.
703 * @retval #MTP_ERROR_NONE Successful
704 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
705 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
706 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
707 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
708 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
709 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
710 * @retval #MTP_ERROR_CONTROLLER MTP controller error
711 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
712 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
713 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
715 * @see mtp_get_object_handles()
717 int mtp_objectinfo_get_association_type(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_type);
720 * @brief Gets the size of the object information.
723 * @param [in] mtp_device The MTP device
724 * @param [in] object_handle The object handle
725 * @param [out] size The size of Object information
727 * @return 0 on success, otherwise a negative error value.
728 * @retval #MTP_ERROR_NONE Successful
729 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
730 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
731 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
732 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
733 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
734 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
735 * @retval #MTP_ERROR_CONTROLLER MTP controller error
736 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
737 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
738 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
740 * @see mtp_get_object_handles()
742 int mtp_objectinfo_get_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
745 * @brief Gets the parent object handle of the object information.
748 * @param [in] mtp_device The MTP device
749 * @param [in] object_handle The object handle
750 * @param [out] parent_object_handle The parent of Object information
752 * @return 0 on success, otherwise a negative error value.
753 * @retval #MTP_ERROR_NONE Successful
754 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
755 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
756 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
757 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
758 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
759 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
760 * @retval #MTP_ERROR_CONTROLLER MTP controller error
761 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
762 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
763 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
765 * @see mtp_get_object_handles()
767 int mtp_objectinfo_get_parent_object_handle(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_object_h *parent_object_handle);
770 * @brief Gets the mtp storage of the object information.
773 * @param [in] mtp_device The MTP device
774 * @param [in] object_handle The object handle
775 * @param [out] mtp_storage The MTP storage of Object information
777 * @return 0 on success, otherwise a negative error value.
778 * @retval #MTP_ERROR_NONE Successful
779 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
780 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
781 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
782 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
783 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
784 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
785 * @retval #MTP_ERROR_CONTROLLER MTP controller error
786 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
787 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
788 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
790 * @see mtp_get_object_handles()
792 int mtp_objectinfo_get_storage(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_storage_h* mtp_storage);
795 * @brief Gets the object created time of the object information.
797 * @remarks When interpreted as an absolute time value, \n
798 * @a data_created represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
800 * @param [in] mtp_device The MTP device
801 * @param [in] object_handle The object handle
802 * @param [out] date_created The object created time of Object information
804 * @return 0 on success, otherwise a negative error value.
805 * @retval #MTP_ERROR_NONE Successful
806 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
807 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
808 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
809 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
810 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
811 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
812 * @retval #MTP_ERROR_CONTROLLER MTP controller error
813 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
814 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
815 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
817 * @see mtp_get_object_handles()
819 int mtp_objectinfo_get_date_created(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_created);
822 * @brief Gets the object modified time of the object information.
824 * @remarks When interpreted as an absolute time value, \n
825 * @a data_modified represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
827 * @param [in] mtp_device The MTP device
828 * @param [in] object_handle The object handle
829 * @param [out] date_modified The object modified time of Object information
831 * @return 0 on success, otherwise a negative error value.
832 * @retval #MTP_ERROR_NONE Successful
833 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
834 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
835 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
836 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
837 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
838 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
839 * @retval #MTP_ERROR_CONTROLLER MTP controller error
840 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
841 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
842 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
844 * @see mtp_get_object_handles()
846 int mtp_objectinfo_get_date_modified(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_modified);
849 * @brief Gets the file type of the object information.
852 * @param [in] mtp_device The MTP device
853 * @param [in] object_handle The object handle
854 * @param [out] file_type The file type of Object information
856 * @return 0 on success, otherwise a negative error value.
857 * @retval #MTP_ERROR_NONE Successful
858 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
859 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
860 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
861 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
862 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
863 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
864 * @retval #MTP_ERROR_CONTROLLER MTP controller error
865 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
866 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
867 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
869 * @see mtp_get_object_handles()
871 int mtp_objectinfo_get_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
874 * @brief Gets the image bit depth of the object information.
877 * @param [in] mtp_device The MTP device
878 * @param [in] object_handle The object handle
879 * @param [out] depth The image bit depth of Object information
881 * @return 0 on success, otherwise a negative error value.
882 * @retval #MTP_ERROR_NONE Successful
883 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
884 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
885 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
886 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
887 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
888 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
889 * @retval #MTP_ERROR_CONTROLLER MTP controller error
890 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
891 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
892 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
894 * @see mtp_get_object_handles()
896 int mtp_objectinfo_get_image_bit_depth(mtp_device_h mtp_device, mtp_object_h object_handle, int *depth);
899 * @brief Gets the image pixel width of the object information.
902 * @param [in] mtp_device The MTP device
903 * @param [in] object_handle The object handle
904 * @param [out] width The image pixel width of Object information
906 * @return 0 on success, otherwise a negative error value.
907 * @retval #MTP_ERROR_NONE Successful
908 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
909 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
910 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
911 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
912 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
913 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
914 * @retval #MTP_ERROR_CONTROLLER MTP controller error
915 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
916 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
917 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
919 * @see mtp_get_object_handles()
921 int mtp_objectinfo_get_image_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
924 * @brief Gets the image pixel height of the object information.
927 * @param [in] mtp_device The MTP device
928 * @param [in] object_handle The object handle
929 * @param [out] height The image pixel height of Object information
931 * @return 0 on success, otherwise a negative error value.
932 * @retval #MTP_ERROR_NONE Successful
933 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
934 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
935 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
936 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
937 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
938 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
939 * @retval #MTP_ERROR_CONTROLLER MTP controller error
940 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
941 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
942 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
944 * @see mtp_get_object_handles()
946 int mtp_objectinfo_get_image_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
949 * @brief Gets the thumbnail size of the object information.
952 * @param [in] mtp_device The MTP device
953 * @param [in] object_handle The object handle
954 * @param [out] size The thumbnail size of Object information
956 * @return 0 on success, otherwise a negative error value.
957 * @retval #MTP_ERROR_NONE Successful
958 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
959 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
960 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
961 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
962 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
963 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
964 * @retval #MTP_ERROR_CONTROLLER MTP controller error
965 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
966 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
967 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
969 * @see mtp_get_object_handles()
971 int mtp_objectinfo_get_thumbnail_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
974 * @brief Gets the thumbnail file type of the object information.
977 * @param [in] mtp_device The MTP device
978 * @param [in] object_handle The object handle
979 * @param [out] file_type The file type of Object information
981 * @return 0 on success, otherwise a negative error value.
982 * @retval #MTP_ERROR_NONE Successful
983 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
984 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
985 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
986 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
987 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
988 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
989 * @retval #MTP_ERROR_CONTROLLER MTP controller error
990 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
991 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
992 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
994 * @see mtp_get_object_handles()
996 int mtp_objectinfo_get_thumbnail_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
999 * @brief Gets the thumbnail pixel height of the object information.
1002 * @param [in] mtp_device The MTP device
1003 * @param [in] object_handle The object handle
1004 * @param [out] height The thumbnail pixel height of Object information
1006 * @return 0 on success, otherwise a negative error value.
1007 * @retval #MTP_ERROR_NONE Successful
1008 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1009 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1010 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1011 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1012 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1013 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1014 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1015 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1016 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1017 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1019 * @see mtp_get_object_handles()
1021 int mtp_objectinfo_get_thumbnail_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1024 * @brief Gets the thumbnail pixel width of the object information.
1027 * @param [in] mtp_device The MTP device
1028 * @param [in] object_handle The object handle
1029 * @param [out] width The thumbnail pixel width of Object information
1031 * @return 0 on success, otherwise a negative error value.
1032 * @retval #MTP_ERROR_NONE Successful
1033 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1034 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1035 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1036 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1037 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1038 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1039 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1040 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1041 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1042 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1044 * @see mtp_get_object_handles()
1046 int mtp_objectinfo_get_thumbnail_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);