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 -0x03000000
35 * @addtogroup CAPI_NETWORK_MTP_MANAGER_MODULE
40 * @brief The handle to the mtp raw device
43 typedef struct mtp_raw_device *mtp_raw_device_h;
46 * @brief The handle to the mtp device
49 typedef int mtp_device_h;
52 * @brief The handle to the mtp storage
55 typedef int mtp_storage_h;
58 * @brief The handle to the mtp object
61 typedef int mtp_object_h;
64 * @brief Error codes reported by the MTP API.
68 MTP_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
69 MTP_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */
70 MTP_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
71 MTP_ERROR_NO_DEVICE = TIZEN_ERROR_MTP | 0x01, /**< MTP have not any device */
72 MTP_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
73 MTP_ERROR_PLUGIN_FAIL = TIZEN_ERROR_MTP | 0x02, /**< Plugin failed */
74 MTP_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
75 MTP_ERROR_COMM_ERROR = TIZEN_ERROR_MTP | 0x03, /**< MTP communication error */
76 MTP_ERROR_CONTROLLER = TIZEN_ERROR_MTP | 0x04, /**< MTP controller error */
77 MTP_ERROR_NOT_INITIALIZED = TIZEN_ERROR_MTP | 0x05, /**< MTP is not initialized */
78 MTP_ERROR_NOT_ACTIVATED = TIZEN_ERROR_MTP | 0x06, /**< MTP is not activated */
79 MTP_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< MTP is not supported */
80 MTP_ERROR_NOT_COMM_INITIALIZED = TIZEN_ERROR_MTP | 0x07, /**< MTP communication is not initialized */
84 * @brief Enumerations for MTP Storage type
89 MTP_STORAGE_TYPE_UNDEFINED, /**< Storage type is undefined */
90 MTP_STORAGE_TYPE_FIXED_ROM, /**< Storage type is fixed ROM */
91 MTP_STORAGE_TYPE_REMOVABLE_ROM, /**< Storage type is removable ROM */
92 MTP_STORAGE_TYPE_FIXED_RAM, /**< Storage type is fixed RAM */
93 MTP_STORAGE_TYPE_REMOVABLE_RAM /**< Storage type is Removable RAM */
97 * @brief Enumerations for MTP file type
101 MTP_FILETYPE_FOLDER, /**< FOLDER file type */
102 MTP_FILETYPE_WAV, /**< WAV file type */
103 MTP_FILETYPE_MP3, /**< MP3 file type */
104 MTP_FILETYPE_WMA, /**< WMA file type */
105 MTP_FILETYPE_OGG, /**< OGG file type */
106 MTP_FILETYPE_AUDIBLE, /**< AUDIBLE file type */
107 MTP_FILETYPE_MP4, /**< MP4 file type */
108 MTP_FILETYPE_UNDEF_AUDIO, /**< UNDEF_AUDIO file type */
109 MTP_FILETYPE_WMV, /**< WMV file type */
110 MTP_FILETYPE_AVI, /**< AVI file type */
111 MTP_FILETYPE_MPEG, /**< MPEG file type */
112 MTP_FILETYPE_ASF, /**< ASF file type */
113 MTP_FILETYPE_QT, /**< QT file type */
114 MTP_FILETYPE_UNDEF_VIDEO, /**< UNDEF_VIDEO file type */
115 MTP_FILETYPE_JPEG, /**< JPEG file type */
116 MTP_FILETYPE_JFIF, /**< JFIF file type */
117 MTP_FILETYPE_TIFF, /**< TIFF file type */
118 MTP_FILETYPE_BMP, /**< BMP file type */
119 MTP_FILETYPE_GIF, /**< GIF file type */
120 MTP_FILETYPE_PICT, /**< PICT file type */
121 MTP_FILETYPE_PNG, /**< PNG file type */
122 MTP_FILETYPE_VCALENDAR1, /**< VCALENDAR1 file type */
123 MTP_FILETYPE_VCALENDAR2, /**< VCALENDAR2 file type */
124 MTP_FILETYPE_VCARD2, /**< VCARD2 file type */
125 MTP_FILETYPE_VCARD3, /**< VCARD3 file type */
126 MTP_FILETYPE_WINDOWSIMAGEFORMAT, /**< WINDOWSIMAGEFORMAT file type */
127 MTP_FILETYPE_WINEXEC, /**< WINEXEC file type */
128 MTP_FILETYPE_TEXT, /**< TEXT file type */
129 MTP_FILETYPE_HTML, /**< HTML file type */
130 MTP_FILETYPE_FIRMWARE, /**< FIRMWARE file type */
131 MTP_FILETYPE_AAC, /**< AAC file type */
132 MTP_FILETYPE_MEDIACARD, /**< MEDIACARD file type */
133 MTP_FILETYPE_FLAC, /**< FLAC file type */
134 MTP_FILETYPE_MP2, /**< MP2 file type */
135 MTP_FILETYPE_M4A, /**< M4A file type */
136 MTP_FILETYPE_DOC, /**< DOC file type */
137 MTP_FILETYPE_XML, /**< XML file type */
138 MTP_FILETYPE_XLS, /**< XLS file type */
139 MTP_FILETYPE_PPT, /**< PPT file type */
140 MTP_FILETYPE_MHT, /**< MHT file type */
141 MTP_FILETYPE_JP2, /**< JP2 file type */
142 MTP_FILETYPE_JPX, /**< JPX file type */
143 MTP_FILETYPE_ALBUM, /**< ALBUM file type */
144 MTP_FILETYPE_PLAYLIST, /**< PLAYLIST file type */
145 MTP_FILETYPE_UNKNOWN, /**< Unknown file type */
147 MTP_FILETYPE_ALL, /**< Helper enum value for certain function */
148 MTP_FILETYPE_ALL_IMAGE /**< Helper enum value for certain function */
152 * @brief Enumerations for MTP event type
156 MTP_EVENT_UNKNOWN, /**< Unknown event type */
157 MTP_EVENT_STORAGE_ADDED, /**< Storage is added */
158 MTP_EVENT_STORAGE_REMOVED, /**< Storage is removed */
159 MTP_EVENT_OBJECT_ADDED, /**< Object is added */
160 MTP_EVENT_OBJECT_REMOVED, /**< Object is removed */
161 MTP_EVENT_DEVICE_ADDED, /**< Device is added */
162 MTP_EVENT_DEVICE_REMOVED, /**< Device is removed */
163 MTP_EVENT_TURNED_OFF /**< MTP is turned off */
167 * @brief Called after mtp_set_mtp_event_cb() has completed.
169 * @remarks Depending on the type of event, the meaning of event parameter is different.
170 * - If event is device event, then event_parameter type is mtp_device_h.
171 * - If event is storage event, then event_parameter type is mtp_storage_h.
172 * - If event is object event, then event_parameter type is mtp_object_h.
173 * - If event is MTP_EVENT_TURNED_OFF, then event_parameter is 0.
175 * @param [in] event The event
176 * @param [in] event_parameter The event parameter
177 * @param [in] user_data The user data passed from the callback registration function
179 * @see mtp_set_mtp_event_cb()
180 * @see mtp_unset_mtp_event_cb()
182 typedef void (* mtp_event_cb)(mtp_event_e event, int event_parameter, void *user_data);
185 * @brief Initializes for using MTP.
187 * @remarks This function must be called before proceeding any other mtp functions.
188 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
189 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
191 * @return 0 on success, otherwise a negative error value.
192 * @retval #MTP_ERROR_NONE Successful
193 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
194 * @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied
195 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
197 * @see mtp_deinitialize()
199 int mtp_initialize(void);
202 * @brief Gets device list.
204 * @remarks The @a raw_devices should be freed using mtp_destroy_raw_devices().
205 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
206 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
208 * @param [out] raw_devices All current connected device list
209 * @param [out] device_count The count of device
211 * @return 0 on success, otherwise a negative error value.
212 * @retval #MTP_ERROR_NONE Successful
213 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
214 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
215 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
216 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
217 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
219 * @see mtp_destroy_raw_devices()
221 int mtp_get_raw_devices(mtp_raw_device_h **raw_devices, int *device_count);
224 * @brief Gets bus location from raw device.
226 * @remarks The @a raw_device can get using mtp_get_raw_devices().
227 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
228 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
230 * @param [in] raw_device The raw device
231 * @param [out] bus_location The bus location
233 * @return 0 on success, otherwise a negative error value.
234 * @retval #MTP_ERROR_NONE Successful
235 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
236 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
237 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
239 * @see mtp_get_raw_devices()
241 int mtp_get_bus_location(mtp_raw_device_h raw_device, int *bus_location);
244 * @brief Gets device number from raw device.
246 * @remarks The @a raw_device can get using mtp_get_raw_devices().
247 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
248 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
250 * @param [in] raw_device The raw device
251 * @param [out] device_number The device number
253 * @return 0 on success, otherwise a negative error value.
254 * @retval #MTP_ERROR_NONE Successful
255 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
256 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
257 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
259 * @see mtp_get_raw_devices()
261 int mtp_get_device_number(mtp_raw_device_h raw_device, int *device_number);
264 * @brief Gets device name from raw device.
266 * @remarks The @a raw_device can get using mtp_get_raw_devices().
267 * @remarks The @a model_name should be freed using free().
268 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
269 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
271 * @param [in] raw_device The raw device
272 * @param [out] model_name The model name
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_INVALID_PARAMETER Invalid parameter
280 * @see mtp_get_raw_devices()
282 int mtp_get_device_name(mtp_raw_device_h raw_device, char **model_name);
285 * @brief Destroys the raw devices handler.
287 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
288 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
290 * @param [in] raw_devices The raw devices handler
292 * @return 0 on success, otherwise a negative error value.
293 * @retval #MTP_ERROR_NONE Successful
294 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
295 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
297 * @see mtp_get_raw_devices()
299 int mtp_destroy_raw_devices(mtp_raw_device_h *raw_devices);
302 * @brief Gets device handler from bus location.
304 * @remarks For using this api, you should get bus location and device number from raw device.
305 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
306 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
308 * @param [in] bus_location The bus location
309 * @param [in] device_number The device number
310 * @param [out] mtp_device The MTP device
312 * @return 0 on success, otherwise a negative error value.
313 * @retval #MTP_ERROR_NONE Successful
314 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
315 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
316 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
317 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
318 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
319 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
321 * @pre mtp_get_bus_location(), mtp_get_device_number()
322 * @see mtp_initialize()
324 int mtp_get_device(int bus_location, int device_number, mtp_device_h *mtp_device);
327 * @brief Gets mtp storages from device.
329 * @remarks The @a mtp_storages should be freed using free().
330 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
331 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
333 * @param [in] mtp_device The MTP device
334 * @param [out] mtp_storages Current mtp storage list
335 * @param [out] storage_num Length of storage list
337 * @return 0 on success, otherwise a negative error value.
338 * @retval #MTP_ERROR_NONE Successful
339 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
340 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
341 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
342 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
343 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
344 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
346 * @see mtp_get_device()
348 int mtp_get_storages(mtp_device_h mtp_device, mtp_storage_h **mtp_storages, int* storage_num);
351 * @brief Gets object handles from the given device and storage.
353 * @remarks The @a object_handles should be freed using free().
354 * @remarks If the @a parent is 0, it means "root folder" of mtp storage.
355 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
356 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
358 * @param [in] mtp_device The MTP device
359 * @param [in] mtp_storage The MTP storage
360 * @param [in] file_type The file type what you want
361 * @param [in] parent The parent object handle
362 * @param [out] object_handles The object handle list
363 * @param [out] object_num Length of object handle list
365 * @return 0 on success, otherwise a negative error value.
366 * @retval #MTP_ERROR_NONE Successful
367 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
368 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
369 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
370 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
371 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
372 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
374 * @see mtp_get_device()
375 * @see mtp_get_storages()
377 int mtp_get_object_handles(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_filetype_e file_type,
378 mtp_object_h parent, mtp_object_h **object_handles, int* object_num);
381 * @brief Gets object for a given path from object handle.
383 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
384 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
386 * @param [in] mtp_device The MTP device
387 * @param [in] object_handle The object handle
388 * @param [in] dest_path The dest path
390 * @return 0 on success, otherwise a negative error value.
391 * @retval #MTP_ERROR_NONE Successful
392 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
393 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
394 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
395 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
396 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
397 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
398 * @retval #MTP_ERROR_IO_ERROR I/O error
400 * @see mtp_get_device()
401 * @see mtp_get_object_handles()
403 int mtp_get_object(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
406 * @brief Gets thumbnail from object handle.
408 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
409 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage.
411 * @param [in] mtp_device The MTP device
412 * @param [in] object_handle The object handle
413 * @param [in] dest_path The dest path
415 * @return 0 on success, otherwise a negative error value.
416 * @retval #MTP_ERROR_NONE Successful
417 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
418 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
419 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
420 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
421 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
422 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
423 * @retval #MTP_ERROR_IO_ERROR I/O error
425 * @see mtp_get_device()
426 * @see mtp_get_object_handles()
428 int mtp_get_thumbnail(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
431 * @brief Registers a callback function for receiving MTP event.
434 * @remarks If device state is changed, #MTP_EVENT_DEVICE_ADDED or #MTP_EVENT_DEVICE_REMOVED event is occur. \n
435 * If storage state is changed, #MTP_EVENT_STORAGE_ADDED or #MTP_EVENT_STORAGE_REMOVED event is occur. \n
436 * If object state is changed, #MTP_EVENT_OBJECT_ADDED or #MTP_EVENT_OBJECT_REMOVED event is occur. \n
437 * If mtp service is turned off, #MTP_EVENT_TURNED_OFF event is occur. \n
438 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
439 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
441 * @param [in] event_cb The callback
442 * @param [in] user_data The user data
444 * @return 0 on success, otherwise a negative error value.
445 * @retval #MTP_ERROR_NONE Successful
446 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
447 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
448 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
450 * @see mtp_unset_mtp_event_cb()
452 int mtp_set_mtp_event_cb(mtp_event_cb event_cb, void *user_data);
455 * @brief Unregisters the callback function.
457 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
458 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
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
465 * @see mtp_set_mtp_event_cb()
467 int mtp_unset_mtp_event_cb(void);
470 * @brief Deinitializes MTP operation.
472 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
473 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
475 * @return 0 on success, otherwise a negative error value.
476 * @retval #MTP_ERROR_NONE Successful
477 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
478 * @retval #MTP_ERROR_PERMISSION_DENIED Permission Denied
480 * @see mtp_initialize()
482 int mtp_deinitialize(void);
489 * @addtogroup CAPI_NETWORK_MTP_DEVICEINFO_MODULE
494 * @brief Gets the manufacturer name of the device information.
496 * @remarks The @a manufacturer_name should be freed using free().
497 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
498 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
500 * @param [in] mtp_device The MTP device
501 * @param [out] manufacturer_name The manufacturer name of Device information
503 * @return 0 on success, otherwise a negative error value.
504 * @retval #MTP_ERROR_NONE Successful
505 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
506 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
507 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
508 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
509 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
510 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
511 * @retval #MTP_ERROR_CONTROLLER MTP controller error
512 * @retval #MTP_ERROR_OUT_OF_MEMORY Memory Allocation failed
513 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
515 * @see mtp_get_device()
517 int mtp_deviceinfo_get_manufacturer_name(mtp_device_h mtp_device, char **manufacturer_name);
520 * @brief Gets the model name of the device information.
522 * @remarks The @a model_name should be freed using free().
523 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
524 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
526 * @param [in] mtp_device The MTP device
527 * @param [out] model_name The model name of Device information
529 * @return 0 on success, otherwise a negative error value.
530 * @retval #MTP_ERROR_NONE Successful
531 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
532 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
533 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
534 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
535 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
536 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
537 * @retval #MTP_ERROR_CONTROLLER MTP controller error
538 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
539 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
541 * @see mtp_get_device()
543 int mtp_deviceinfo_get_model_name(mtp_device_h mtp_device, char **model_name);
546 * @brief Gets the serial number of the device information.
548 * @remarks The @a serial_number should be freed using free().
549 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
550 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
552 * @param [in] mtp_device The MTP device
553 * @param [out] serial_number The serial number of Device information
555 * @return 0 on success, otherwise a negative error value.
556 * @retval #MTP_ERROR_NONE Successful
557 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
558 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
559 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
560 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
561 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
562 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
563 * @retval #MTP_ERROR_CONTROLLER MTP controller error
564 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
565 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
567 * @see mtp_get_device()
569 int mtp_deviceinfo_get_serial_number(mtp_device_h mtp_device, char **serial_number);
572 * @brief Gets the device version of the device information.
574 * @remarks The @a device_version should be freed using free().
575 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
576 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
578 * @param [in] mtp_device The MTP device
579 * @param [out] device_version The device version of Device information
581 * @return 0 on success, otherwise a negative error value.
582 * @retval #MTP_ERROR_NONE Successful
583 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
584 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
585 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
586 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
587 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
588 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
589 * @retval #MTP_ERROR_CONTROLLER MTP controller error
590 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
591 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
593 * @see mtp_get_device()
595 int mtp_deviceinfo_get_device_version(mtp_device_h mtp_device, char **device_version);
602 * @addtogroup CAPI_NETWORK_MTP_STORAGEINFO_MODULE
607 * @brief Gets the description of the storage information.
609 * @remarks The @a description should be freed using free().
610 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
611 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
613 * @param [in] mtp_device The MTP device
614 * @param [in] mtp_storage The MTP storage
615 * @param [out] description The description of Storage information
617 * @return 0 on success, otherwise a negative error value.
618 * @retval #MTP_ERROR_NONE Successful
619 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
620 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
621 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
622 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
623 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
624 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
625 * @retval #MTP_ERROR_CONTROLLER MTP controller error
626 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
627 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
629 * @see mtp_get_storages()
631 int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description);
634 * @brief Gets the free space of the storage information.
636 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
637 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
639 * @param [in] mtp_device The MTP device
640 * @param [in] mtp_storage The MTP storage
641 * @param [out] free_space The free space of Storage information
643 * @return 0 on success, otherwise a negative error value.
644 * @retval #MTP_ERROR_NONE Successful
645 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
646 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
647 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
648 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
649 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
650 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
651 * @retval #MTP_ERROR_CONTROLLER MTP controller error
652 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
653 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
655 * @see mtp_get_storages()
657 int mtp_storageinfo_get_free_space(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space);
660 * @brief Gets the max capacity of the storage information.
662 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
663 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
665 * @param [in] mtp_device The MTP device
666 * @param [in] mtp_storage The MTP storage
667 * @param [out] max_capacity The max capacity of Storage information
669 * @return 0 on success, otherwise a negative error value.
670 * @retval #MTP_ERROR_NONE Successful
671 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
672 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
673 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
674 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
675 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
676 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
677 * @retval #MTP_ERROR_CONTROLLER MTP controller error
678 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
679 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
681 * @see mtp_get_storages()
683 int mtp_storageinfo_get_max_capacity(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *max_capacity);
686 * @brief Gets the storage type of the storage information.
688 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
689 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
691 * @param [in] mtp_device The MTP device
692 * @param [in] mtp_storage The MTP storage
693 * @param [out] storage_type The storage type of Storage information
695 * @return 0 on success, otherwise a negative error value.
696 * @retval #MTP_ERROR_NONE Successful
697 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
698 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
699 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
700 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
701 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
702 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
703 * @retval #MTP_ERROR_CONTROLLER MTP controller error
704 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
705 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
707 * @see mtp_get_storages()
709 int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type);
712 * @brief Gets the volume identifier of the storage information.
714 * @remarks The @a volume_identifier should be freed using free().
715 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
716 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
718 * @param [in] mtp_device The MTP device
719 * @param [in] mtp_storage The MTP storage
720 * @param [out] volume_identifier The volume identifier of Storage information
722 * @return 0 on success, otherwise a negative error value.
723 * @retval #MTP_ERROR_NONE Successful
724 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
725 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
726 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
727 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
728 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
729 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
730 * @retval #MTP_ERROR_CONTROLLER MTP controller error
731 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
732 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
734 * @see mtp_get_object_handles()
736 int mtp_storageinfo_get_volume_identifier(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **volume_identifier);
743 * @addtogroup CAPI_NETWORK_MTP_OBJECTINFO_MODULE
748 * @brief Gets the filename of the object information.
750 * @remarks The @a file_name should be freed using free().
751 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
752 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
754 * @param [in] mtp_device The MTP device
755 * @param [in] object_handle The object handle
756 * @param [out] file_name The file name of Object information
758 * @return 0 on success, otherwise a negative error value.
759 * @retval #MTP_ERROR_NONE Successful
760 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
761 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
762 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
763 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
764 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
765 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
766 * @retval #MTP_ERROR_CONTROLLER MTP controller error
767 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
768 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
769 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
771 * @see mtp_get_object_handles()
773 int mtp_objectinfo_get_file_name(mtp_device_h mtp_device, mtp_object_h object_handle, char **file_name);
776 * @brief Gets the keywords of the object information.
778 * @remarks The @a keywords should be freed using free().
779 * @remarks The keywords are separated by comma.
780 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
781 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
783 * @param [in] mtp_device The MTP device
784 * @param [in] object_handle The object handle
785 * @param [out] keywords The keywords of Object information
787 * @return 0 on success, otherwise a negative error value.
788 * @retval #MTP_ERROR_NONE Successful
789 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
790 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
791 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
792 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
793 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
794 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
795 * @retval #MTP_ERROR_CONTROLLER MTP controller error
796 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
797 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
798 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
800 * @see mtp_get_object_handles()
802 int mtp_objectinfo_get_keywords(mtp_device_h mtp_device, mtp_object_h object_handle, char **keywords);
805 * @brief Gets the association desc of the object information.
807 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
808 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
810 * @param [in] mtp_device The MTP device
811 * @param [in] object_handle The object handle
812 * @param [out] asso_desc The association description of Object information
814 * @return 0 on success, otherwise a negative error value.
815 * @retval #MTP_ERROR_NONE Successful
816 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
817 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
818 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
819 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
820 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
821 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
822 * @retval #MTP_ERROR_CONTROLLER MTP controller error
823 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
824 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
825 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
827 * @see mtp_get_object_handles()
829 int mtp_objectinfo_get_association_desc(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_desc);
832 * @brief Gets the association type of the object information.
834 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
835 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
837 * @param [in] mtp_device The MTP device
838 * @param [in] object_handle The object handle
839 * @param [out] asso_type The association type of Object information
841 * @return 0 on success, otherwise a negative error value.
842 * @retval #MTP_ERROR_NONE Successful
843 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
844 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
845 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
846 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
847 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
848 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
849 * @retval #MTP_ERROR_CONTROLLER MTP controller error
850 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
851 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
852 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
854 * @see mtp_get_object_handles()
856 int mtp_objectinfo_get_association_type(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_type);
859 * @brief Gets the size of the object information.
861 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
862 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
864 * @param [in] mtp_device The MTP device
865 * @param [in] object_handle The object handle
866 * @param [out] size The size of Object information
868 * @return 0 on success, otherwise a negative error value.
869 * @retval #MTP_ERROR_NONE Successful
870 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
871 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
872 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
873 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
874 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
875 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
876 * @retval #MTP_ERROR_CONTROLLER MTP controller error
877 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
878 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
879 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
881 * @see mtp_get_object_handles()
883 int mtp_objectinfo_get_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
886 * @brief Gets the parent object handle of the object information.
888 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
889 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
891 * @param [in] mtp_device The MTP device
892 * @param [in] object_handle The object handle
893 * @param [out] parent_object_handle The parent of Object information
895 * @return 0 on success, otherwise a negative error value.
896 * @retval #MTP_ERROR_NONE Successful
897 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
898 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
899 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
900 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
901 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
902 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
903 * @retval #MTP_ERROR_CONTROLLER MTP controller error
904 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
905 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
906 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
908 * @see mtp_get_object_handles()
910 int mtp_objectinfo_get_parent_object_handle(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_object_h *parent_object_handle);
913 * @brief Gets the mtp storage of the object information.
915 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
916 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
918 * @param [in] mtp_device The MTP device
919 * @param [in] object_handle The object handle
920 * @param [out] mtp_storage The MTP storage of Object information
922 * @return 0 on success, otherwise a negative error value.
923 * @retval #MTP_ERROR_NONE Successful
924 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
925 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
926 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
927 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
928 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
929 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
930 * @retval #MTP_ERROR_CONTROLLER MTP controller error
931 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
932 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
933 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
935 * @see mtp_get_object_handles()
937 int mtp_objectinfo_get_storage(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_storage_h* mtp_storage);
940 * @brief Gets the object created time of the object information.
942 * @remarks When interpreted as an absolute time value, \n
943 * @a data_created represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
944 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
945 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
947 * @param [in] mtp_device The MTP device
948 * @param [in] object_handle The object handle
949 * @param [out] date_created The object created time of Object information
951 * @return 0 on success, otherwise a negative error value.
952 * @retval #MTP_ERROR_NONE Successful
953 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
954 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
955 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
956 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
957 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
958 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
959 * @retval #MTP_ERROR_CONTROLLER MTP controller error
960 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
961 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
962 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
964 * @see mtp_get_object_handles()
966 int mtp_objectinfo_get_date_created(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_created);
969 * @brief Gets the object modified time of the object information.
971 * @remarks When interpreted as an absolute time value, \n
972 * @a data_modified represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
973 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
974 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
976 * @param [in] mtp_device The MTP device
977 * @param [in] object_handle The object handle
978 * @param [out] date_modified The object modified time of Object information
980 * @return 0 on success, otherwise a negative error value.
981 * @retval #MTP_ERROR_NONE Successful
982 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
983 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
984 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
985 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
986 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
987 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
988 * @retval #MTP_ERROR_CONTROLLER MTP controller error
989 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
990 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
991 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
993 * @see mtp_get_object_handles()
995 int mtp_objectinfo_get_date_modified(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_modified);
998 * @brief Gets the file type of the object information.
1000 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1001 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1003 * @param [in] mtp_device The MTP device
1004 * @param [in] object_handle The object handle
1005 * @param [out] file_type The file type of Object information
1007 * @return 0 on success, otherwise a negative error value.
1008 * @retval #MTP_ERROR_NONE Successful
1009 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1010 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1011 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1012 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1013 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1014 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1015 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1016 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1017 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1018 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1020 * @see mtp_get_object_handles()
1022 int mtp_objectinfo_get_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
1025 * @brief Gets the image bit depth of the object information.
1027 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1028 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1030 * @param [in] mtp_device The MTP device
1031 * @param [in] object_handle The object handle
1032 * @param [out] depth The image bit depth of Object information
1034 * @return 0 on success, otherwise a negative error value.
1035 * @retval #MTP_ERROR_NONE Successful
1036 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1037 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1038 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1039 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1040 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1041 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1042 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1043 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1044 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1045 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1047 * @see mtp_get_object_handles()
1049 int mtp_objectinfo_get_image_bit_depth(mtp_device_h mtp_device, mtp_object_h object_handle, int *depth);
1052 * @brief Gets the image pixel width of the object information.
1054 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1055 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1057 * @param [in] mtp_device The MTP device
1058 * @param [in] object_handle The object handle
1059 * @param [out] width The image pixel width of Object information
1061 * @return 0 on success, otherwise a negative error value.
1062 * @retval #MTP_ERROR_NONE Successful
1063 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1064 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1065 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1066 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1067 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1068 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1069 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1070 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1071 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1072 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1074 * @see mtp_get_object_handles()
1076 int mtp_objectinfo_get_image_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
1079 * @brief Gets the image pixel height of the object information.
1081 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1082 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1084 * @param [in] mtp_device The MTP device
1085 * @param [in] object_handle The object handle
1086 * @param [out] height The image pixel height of Object information
1088 * @return 0 on success, otherwise a negative error value.
1089 * @retval #MTP_ERROR_NONE Successful
1090 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1091 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1092 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1093 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1094 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1095 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1096 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1097 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1098 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1099 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1101 * @see mtp_get_object_handles()
1103 int mtp_objectinfo_get_image_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1106 * @brief Gets the thumbnail size of the object information.
1108 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1109 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1111 * @param [in] mtp_device The MTP device
1112 * @param [in] object_handle The object handle
1113 * @param [out] size The thumbnail size of Object information
1115 * @return 0 on success, otherwise a negative error value.
1116 * @retval #MTP_ERROR_NONE Successful
1117 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1118 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1119 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1120 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1121 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1122 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1123 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1124 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1125 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1126 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1128 * @see mtp_get_object_handles()
1130 int mtp_objectinfo_get_thumbnail_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
1133 * @brief Gets the thumbnail file type of the object information.
1135 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1136 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1138 * @param [in] mtp_device The MTP device
1139 * @param [in] object_handle The object handle
1140 * @param [out] file_type The file type of Object information
1142 * @return 0 on success, otherwise a negative error value.
1143 * @retval #MTP_ERROR_NONE Successful
1144 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1145 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1146 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1147 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1148 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1149 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1150 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1151 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1152 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1153 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1155 * @see mtp_get_object_handles()
1157 int mtp_objectinfo_get_thumbnail_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
1160 * @brief Gets the thumbnail pixel height of the object information.
1162 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1163 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1165 * @param [in] mtp_device The MTP device
1166 * @param [in] object_handle The object handle
1167 * @param [out] height The thumbnail pixel height of Object information
1169 * @return 0 on success, otherwise a negative error value.
1170 * @retval #MTP_ERROR_NONE Successful
1171 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1172 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1173 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1174 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1175 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1176 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1177 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1178 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1179 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1180 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1182 * @see mtp_get_object_handles()
1184 int mtp_objectinfo_get_thumbnail_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1187 * @brief Gets the thumbnail pixel width of the object information.
1189 * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
1190 * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n
1192 * @param [in] mtp_device The MTP device
1193 * @param [in] object_handle The object handle
1194 * @param [out] width The thumbnail pixel width of Object information
1196 * @return 0 on success, otherwise a negative error value.
1197 * @retval #MTP_ERROR_NONE Successful
1198 * @retval #MTP_ERROR_NOT_SUPPORTED MTP is not supported
1199 * @retval #MTP_ERROR_NOT_INITIALIZED MTP is not initialized
1200 * @retval #MTP_ERROR_NOT_ACTIVATED MTP is not activated
1201 * @retval #MTP_ERROR_INVALID_PARAMETER Invalid parameter
1202 * @retval #MTP_ERROR_NOT_COMM_INITIALIZED MTP communication is not initialized
1203 * @retval #MTP_ERROR_COMM_ERROR MTP communication error
1204 * @retval #MTP_ERROR_CONTROLLER MTP controller error
1205 * @retval #MTP_ERROR_OUT_OF_MEMORY Out of memory
1206 * @retval #MTP_ERROR_NO_DEVICE MTP have not any device
1207 * @retval #MTP_ERROR_PLUGIN_FAIL Plugin failed
1209 * @see mtp_get_object_handles()
1211 int mtp_objectinfo_get_thumbnail_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);