663a0fdec8efead7151a0b4b22041faa4108b968
[platform/core/api/mtp.git] / include / mtp.h
1 /*
2  * Copyright (c) 2012, 2013 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __MTP_H__
18 #define __MTP_H__
19
20 #include <tizen.h>
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 /**
27  * @file mtp.h
28  * @brief This file contains the MTP API
29  */
30 #ifndef TIZEN_ERROR_MTP
31 #define TIZEN_ERROR_MTP -0x03000000
32 #endif
33
34 /**
35  * @addtogroup CAPI_NETWORK_MTP_MANAGER_MODULE
36  * @{
37  */
38
39 /**
40  * @brief The handle to the mtp device
41  * @since_tizen 3.0
42  */
43 typedef int mtp_device_h;
44
45 /**
46  * @brief The handle to the mtp storage
47  * @since_tizen 3.0
48  */
49 typedef int mtp_storage_h;
50
51 /**
52  * @brief The handle to the mtp object
53  * @since_tizen 3.0
54  */
55 typedef int mtp_object_h;
56
57 /**
58  * @brief Error codes reported by the MTP API.
59  * @since_tizen 3.0
60  */
61 typedef enum {
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 */
75 } mtp_error_e;
76
77 /**
78  * @brief Enumerations for MTP Storage type
79  * @since_tizen 3.0
80  */
81 typedef enum {
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 */
87 } mtp_storage_type_e;
88
89 /**
90  * @brief Enumerations for MTP file type
91  * @since_tizen 3.0
92  */
93 typedef enum {
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 */
139
140         MTP_FILETYPE_ALL, /**< Helper enum value for certain function */
141         MTP_FILETYPE_ALL_IMAGE /**< Helper enum value for certain function */
142 } mtp_filetype_e;
143
144 /**
145  * @brief Enumerations for MTP event type
146  * @since_tizen 3.0
147  */
148 typedef enum {
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 */
157 } mtp_event_e;
158
159 /**
160  * @brief Called when mtp event is occured.
161  * @since_tizen 3.0
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.
167  *
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
171  *
172  * @see mtp_set_mtp_event_cb()
173  * @see mtp_unset_mtp_event_cb()
174  */
175 typedef void (* mtp_event_cb)(mtp_event_e event, int event_parameter, void *user_data);
176
177 /**
178  * @brief Initializes for using MTP.
179  * @since_tizen 3.0
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
183  *
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
189  *
190  * @see mtp_deinitialize()
191  */
192 int mtp_initialize(void);
193
194 /**
195  * @brief Gets the mtp devices.
196  * @since_tizen 3.0
197  * @param [out] mtp_devices The MTP device list
198  * @param [out] device_count Length of device list
199  *
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
208  *
209  * @see mtp_initialize()
210  */
211 int mtp_get_devices(mtp_device_h **mtp_devices, int *device_count);
212
213 /**
214  * @brief Gets mtp storages from the given device.
215  * @since_tizen 3.0
216  * @remarks The @a mtp_storages should be freed using free().
217  *
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
221  *
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
230  *
231  * @see mtp_get_devices()
232  */
233 int mtp_get_storages(mtp_device_h mtp_device, mtp_storage_h **mtp_storages, int* storage_count);
234
235 /**
236  * @brief Gets object handles from the given device and storage.
237  * @since_tizen 3.0
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.
240  *
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
247  *
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
256  *
257  * @see mtp_get_devices()
258  * @see mtp_get_storages()
259  */
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);
262
263 /**
264  * @brief Gets object for a given path from object handle.
265  * @since_tizen 3.0
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
269  *
270  * @param [in] mtp_device The MTP device
271  * @param [in] object_handle The object handle
272  * @param [in] dest_path The dest path
273  *
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
284  *
285  * @see mtp_get_devices()
286  * @see mtp_get_object_handles()
287  */
288 int mtp_get_object(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
289
290 /**
291  * @brief Gets thumbnail from the given object handle.
292  * @since_tizen 3.0
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.
296  *
297  * @param [in] mtp_device The MTP device
298  * @param [in] object_handle The object handle
299  * @param [in] dest_path The dest path
300  *
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
311  *
312  * @see mtp_get_devices()
313  * @see mtp_get_object_handles()
314  */
315 int mtp_get_thumbnail(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
316
317 /**
318  * @brief Adds a callback function for receiving MTP event.
319  * @since_tizen 3.0
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
326  *
327  * @param [in] event_cb The callback
328  * @param [in] user_data The user data
329  *
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
335  *
336  * @see mtp_remove_mtp_event_cb()
337  */
338 int mtp_add_mtp_event_cb(mtp_event_cb event_cb, void *user_data);
339
340 /**
341  * @brief Removes the callback function.
342  * @since_tizen 3.0
343  *
344  * @param [in] event_cb The callback
345  *
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
351  *
352  * @see mtp_add_mtp_event_cb()
353  */
354 int mtp_remove_mtp_event_cb(mtp_event_cb event_cb);
355
356 /**
357  * @brief Deinitializes MTP operation.
358  * @since_tizen 3.0
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
361  *
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
366  *
367  * @see mtp_initialize()
368  */
369 int mtp_deinitialize(void);
370
371 /**
372 * @}
373 */
374
375 /**
376  * @addtogroup CAPI_NETWORK_MTP_DEVICEINFO_MODULE
377  * @{
378  */
379
380 /**
381  * @brief Gets the manufacturer name of the device information.
382  * @since_tizen 3.0
383  * @remarks The @a manufacturer_name should be freed using free().
384  *
385  * @param [in] mtp_device The MTP device
386  * @param [out] manufacturer_name The manufacturer name of Device information
387  *
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
399  *
400  * @see mtp_get_devices()
401  */
402 int mtp_deviceinfo_get_manufacturer_name(mtp_device_h mtp_device, char **manufacturer_name);
403
404 /**
405  * @brief Gets the model name of the device information.
406  * @since_tizen 3.0
407  * @remarks The @a model_name should be freed using free().
408  *
409  * @param [in] mtp_device The MTP device
410  * @param [out] model_name The model name of Device information
411  *
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
423  *
424  * @see mtp_get_devices()
425  */
426 int mtp_deviceinfo_get_model_name(mtp_device_h mtp_device, char **model_name);
427
428 /**
429  * @brief Gets the serial number of the device information.
430  * @since_tizen 3.0
431  * @remarks The @a serial_number should be freed using free().
432  *
433  * @param [in] mtp_device The MTP device
434  * @param [out] serial_number The serial number of Device information
435  *
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
447  *
448  * @see mtp_get_devices()
449  */
450 int mtp_deviceinfo_get_serial_number(mtp_device_h mtp_device, char **serial_number);
451
452 /**
453  * @brief Gets the device version of the device information.
454  * @since_tizen 3.0
455  * @remarks The @a device_version should be freed using free().
456  *
457  * @param [in] mtp_device The MTP device
458  * @param [out] device_version The device version of Device information
459  *
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
471  *
472  * @see mtp_get_devices()
473  */
474 int mtp_deviceinfo_get_device_version(mtp_device_h mtp_device, char **device_version);
475
476 /**
477 * @}
478 */
479
480 /**
481  * @addtogroup CAPI_NETWORK_MTP_STORAGEINFO_MODULE
482  * @{
483  */
484
485 /**
486  * @brief Gets the description of the storage information.
487  * @since_tizen 3.0
488  * @remarks The @a description should be freed using free().
489  *
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
493  *
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
505  *
506  * @see mtp_get_storages()
507  */
508 int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description);
509
510 /**
511  * @brief Gets the free space of the storage information.
512  * @since_tizen 3.0
513  *
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
517  *
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
529  *
530  * @see mtp_get_storages()
531  */
532 int mtp_storageinfo_get_free_space(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space);
533
534 /**
535  * @brief Gets the max capacity of the storage information.
536  * @since_tizen 3.0
537  *
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
541  *
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
553  *
554  * @see mtp_get_storages()
555  */
556 int mtp_storageinfo_get_max_capacity(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *max_capacity);
557
558 /**
559  * @brief Gets the storage type of the storage information.
560  * @since_tizen 3.0
561  *
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
565  *
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
577  *
578  * @see mtp_get_storages()
579  */
580 int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type);
581
582 /**
583  * @brief Gets the volume identifier of the storage information.
584  * @since_tizen 3.0
585  * @remarks The @a volume_identifier should be freed using free().
586  *
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
590  *
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
602  *
603  * @see mtp_get_object_handles()
604  */
605 int mtp_storageinfo_get_volume_identifier(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **volume_identifier);
606
607 /**
608 * @}
609 */
610
611 /**
612  * @addtogroup CAPI_NETWORK_MTP_OBJECTINFO_MODULE
613  * @{
614  */
615
616 /**
617  * @brief Gets the filename of the object information.
618  * @since_tizen 3.0
619  * @remarks The @a file_name should be freed using free().
620  *
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
624  *
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
637  *
638  * @see mtp_get_object_handles()
639  */
640 int mtp_objectinfo_get_file_name(mtp_device_h mtp_device, mtp_object_h object_handle, char **file_name);
641
642 /**
643  * @brief Gets the keywords of the object information.
644  * @since_tizen 3.0
645  * @remarks The @a keywords should be freed using free().
646  * @remarks The keywords are separated by comma.
647  *
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
651  *
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
664  *
665  * @see mtp_get_object_handles()
666  */
667 int mtp_objectinfo_get_keywords(mtp_device_h mtp_device, mtp_object_h object_handle, char **keywords);
668
669 /**
670  * @brief Gets the association desc of the object information.
671  * @since_tizen 3.0
672  *
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
676  *
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
689  *
690  * @see mtp_get_object_handles()
691  */
692 int mtp_objectinfo_get_association_desc(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_desc);
693
694 /**
695  * @brief Gets the association type of the object information.
696  * @since_tizen 3.0
697  *
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
701  *
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
714  *
715  * @see mtp_get_object_handles()
716  */
717 int mtp_objectinfo_get_association_type(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_type);
718
719 /**
720  * @brief Gets the size of the object information.
721  * @since_tizen 3.0
722  *
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
726  *
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
739  *
740  * @see mtp_get_object_handles()
741  */
742 int mtp_objectinfo_get_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
743
744 /**
745  * @brief Gets the parent object handle of the object information.
746  * @since_tizen 3.0
747  *
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
751  *
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
764  *
765  * @see mtp_get_object_handles()
766  */
767 int mtp_objectinfo_get_parent_object_handle(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_object_h *parent_object_handle);
768
769 /**
770  * @brief Gets the mtp storage of the object information.
771  * @since_tizen 3.0
772  *
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
776  *
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
789  *
790  * @see mtp_get_object_handles()
791  */
792 int mtp_objectinfo_get_storage(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_storage_h* mtp_storage);
793
794 /**
795  * @brief Gets the object created time of the object information.
796  * @since_tizen 3.0
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).
799  *
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
803  *
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
816  *
817  * @see mtp_get_object_handles()
818  */
819 int mtp_objectinfo_get_date_created(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_created);
820
821 /**
822  * @brief Gets the object modified time of the object information.
823  * @since_tizen 3.0
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).
826  *
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
830  *
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
843  *
844  * @see mtp_get_object_handles()
845  */
846 int mtp_objectinfo_get_date_modified(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_modified);
847
848 /**
849  * @brief Gets the file type of the object information.
850  * @since_tizen 3.0
851  *
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
855  *
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
868  *
869  * @see mtp_get_object_handles()
870  */
871 int mtp_objectinfo_get_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
872
873 /**
874  * @brief Gets the image bit depth of the object information.
875  * @since_tizen 3.0
876  *
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
880  *
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
893  *
894  * @see mtp_get_object_handles()
895  */
896 int mtp_objectinfo_get_image_bit_depth(mtp_device_h mtp_device, mtp_object_h object_handle, int *depth);
897
898 /**
899  * @brief Gets the image pixel width of the object information.
900  * @since_tizen 3.0
901  *
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
905  *
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
918  *
919  * @see mtp_get_object_handles()
920  */
921 int mtp_objectinfo_get_image_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
922
923 /**
924  * @brief Gets the image pixel height of the object information.
925  * @since_tizen 3.0
926  *
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
930  *
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
943  *
944  * @see mtp_get_object_handles()
945  */
946 int mtp_objectinfo_get_image_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
947
948 /**
949  * @brief Gets the thumbnail size of the object information.
950  * @since_tizen 3.0
951  *
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
955  *
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
968  *
969  * @see mtp_get_object_handles()
970  */
971 int mtp_objectinfo_get_thumbnail_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
972
973 /**
974  * @brief Gets the thumbnail file type of the object information.
975  * @since_tizen 3.0
976  *
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
980  *
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
993  *
994  * @see mtp_get_object_handles()
995  */
996 int mtp_objectinfo_get_thumbnail_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
997
998 /**
999  * @brief Gets the thumbnail pixel height of the object information.
1000  * @since_tizen 3.0
1001  *
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
1005  *
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
1018  *
1019  * @see mtp_get_object_handles()
1020  */
1021 int mtp_objectinfo_get_thumbnail_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1022
1023 /**
1024  * @brief Gets the thumbnail pixel width of the object information.
1025  * @since_tizen 3.0
1026  *
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
1030  *
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
1043  *
1044  * @see mtp_get_object_handles()
1045  */
1046 int mtp_objectinfo_get_thumbnail_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
1047
1048 /**
1049 * @}
1050 */
1051
1052 #ifdef __cplusplus
1053 }
1054 #endif
1055
1056 #endif