Apply ACR comment
[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 raw device
41  * @since_tizen 3.0
42  */
43 typedef struct mtp_raw_device *mtp_raw_device_h;
44
45 /**
46  * @brief The handle to the mtp device
47  * @since_tizen 3.0
48  */
49 typedef int mtp_device_h;
50
51 /**
52  * @brief The handle to the mtp storage
53  * @since_tizen 3.0
54  */
55 typedef int mtp_storage_h;
56
57 /**
58  * @brief The handle to the mtp object
59  * @since_tizen 3.0
60  */
61 typedef int mtp_object_h;
62
63 /**
64  * @brief Error codes reported by the MTP API.
65  * @since_tizen 3.0
66  */
67 typedef enum {
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 */
81 } mtp_error_e;
82
83 /**
84  * @brief Enumerations for MTP Storage type
85  * @since_tizen 3.0
86  */
87
88 typedef enum {
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 */
94 } mtp_storage_type_e;
95
96 /**
97  * @brief Enumerations for MTP file type
98  * @since_tizen 3.0
99  */
100 typedef enum {
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 */
146
147         MTP_FILETYPE_ALL, /**< Helper enum value for certain function */
148         MTP_FILETYPE_ALL_IMAGE /**< Helper enum value for certain function */
149 } mtp_filetype_e;
150
151 /**
152  * @brief Enumerations for MTP event type
153  * @since_tizen 3.0
154  */
155 typedef enum {
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 */
164 } mtp_event_e;
165
166 /**
167  * @brief Called after mtp_set_mtp_event_cb() has completed.
168  * @since_tizen 3.0
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.
174  *
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
178  *
179  * @see mtp_set_mtp_event_cb()
180  * @see mtp_unset_mtp_event_cb()
181  */
182 typedef void (* mtp_event_cb)(mtp_event_e event, int event_parameter, void *user_data);
183
184 /**
185  * @brief Initializes for using MTP.
186  * @since_tizen 3.0
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
190  *
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
196  *
197  * @see mtp_deinitialize()
198  */
199 int mtp_initialize(void);
200
201 /**
202  * @brief Gets device list.
203  * @since_tizen 3.0
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
207  *
208  * @param [out] raw_devices All current connected device list
209  * @param [out] device_count The count of device
210  *
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
218  *
219  * @see mtp_destroy_raw_devices()
220  */
221 int mtp_get_raw_devices(mtp_raw_device_h **raw_devices, int *device_count);
222
223 /**
224  * @brief Gets bus location from raw device.
225  * @since_tizen 3.0
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
229  *
230  * @param [in] raw_device The raw device
231  * @param [out] bus_location The bus location
232  *
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
238  *
239  * @see mtp_get_raw_devices()
240  */
241 int mtp_get_bus_location(mtp_raw_device_h raw_device, int *bus_location);
242
243 /**
244  * @brief Gets device number from raw device.
245  * @since_tizen 3.0
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
249  *
250  * @param [in] raw_device The raw device
251  * @param [out] device_number The device number
252  *
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
258  *
259  * @see mtp_get_raw_devices()
260  */
261 int mtp_get_device_number(mtp_raw_device_h raw_device, int *device_number);
262
263 /**
264  * @brief Gets device name from raw device.
265  * @since_tizen 3.0
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
270  *
271  * @param [in] raw_device The raw device
272  * @param [out] model_name The model name
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_INVALID_PARAMETER Invalid parameter
279  *
280  * @see mtp_get_raw_devices()
281  */
282 int mtp_get_device_name(mtp_raw_device_h raw_device, char **model_name);
283
284 /**
285  * @brief Destroys the raw devices handler.
286  * @since_tizen 3.0
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
289  *
290  * @param [in] raw_devices The raw devices handler
291  *
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
296  *
297  * @see mtp_get_raw_devices()
298  */
299 int mtp_destroy_raw_devices(mtp_raw_device_h *raw_devices);
300
301 /**
302  * @brief Gets device handler from bus location.
303  * @since_tizen 3.0
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
307  *
308  * @param [in] bus_location The bus location
309  * @param [in] device_number The device number
310  * @param [out] mtp_device The MTP device
311  *
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
320  *
321  * @pre mtp_get_bus_location(), mtp_get_device_number()
322  * @see mtp_initialize()
323  */
324 int mtp_get_device(int bus_location, int device_number, mtp_device_h *mtp_device);
325
326 /**
327  * @brief Gets mtp storages from device.
328  * @since_tizen 3.0
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
332  *
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
336  *
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
345  *
346  * @see mtp_get_device()
347  */
348 int mtp_get_storages(mtp_device_h mtp_device, mtp_storage_h **mtp_storages, int* storage_num);
349
350 /**
351  * @brief Gets object handles from the given device and storage.
352  * @since_tizen 3.0
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
357  *
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
364  *
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
373  *
374  * @see mtp_get_device()
375  * @see mtp_get_storages()
376  */
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);
379
380 /**
381  * @brief Gets object for a given path from object handle.
382  * @since_tizen 3.0
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
385  *
386  * @param [in] mtp_device The MTP device
387  * @param [in] object_handle The object handle
388  * @param [in] dest_path The dest path
389  *
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
399  *
400  * @see mtp_get_device()
401  * @see mtp_get_object_handles()
402  */
403 int mtp_get_object(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
404
405 /**
406  * @brief Gets thumbnail from object handle.
407  * @since_tizen 3.0
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.
410  *
411  * @param [in] mtp_device The MTP device
412  * @param [in] object_handle The object handle
413  * @param [in] dest_path The dest path
414  *
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
424  *
425  * @see mtp_get_device()
426  * @see mtp_get_object_handles()
427  */
428 int mtp_get_thumbnail(mtp_device_h mtp_device, mtp_object_h object_handle, char *dest_path);
429
430 /**
431  * @brief Registers a callback function for receiving MTP event.
432  * @since_tizen 3.0
433  *
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
440  *
441  * @param [in] event_cb The callback
442  * @param [in] user_data The user data
443  *
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
449
450  * @see mtp_unset_mtp_event_cb()
451  */
452 int mtp_set_mtp_event_cb(mtp_event_cb event_cb, void *user_data);
453
454 /**
455  * @brief Unregisters the callback function.
456  * @since_tizen 3.0
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
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  *
465  * @see mtp_set_mtp_event_cb()
466  */
467 int mtp_unset_mtp_event_cb(void);
468
469 /**
470  * @brief Deinitializes MTP operation.
471  * @since_tizen 3.0
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
474  *
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
479  *
480  * @see mtp_initialize()
481  */
482 int mtp_deinitialize(void);
483
484 /**
485 * @}
486 */
487
488 /**
489  * @addtogroup CAPI_NETWORK_MTP_DEVICEINFO_MODULE
490  * @{
491  */
492
493 /**
494  * @brief Gets the manufacturer name of the device information.
495  * @since_tizen 3.0
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
499  *
500  * @param [in] mtp_device The MTP device
501  * @param [out] manufacturer_name The manufacturer name of Device information
502  *
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
514  *
515  * @see mtp_get_device()
516  */
517 int mtp_deviceinfo_get_manufacturer_name(mtp_device_h mtp_device, char **manufacturer_name);
518
519 /**
520  * @brief Gets the model name of the device information.
521  * @since_tizen 3.0
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
525  *
526  * @param [in] mtp_device The MTP device
527  * @param [out] model_name The model name of Device information
528  *
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
540  *
541  * @see mtp_get_device()
542  */
543 int mtp_deviceinfo_get_model_name(mtp_device_h mtp_device, char **model_name);
544
545 /**
546  * @brief Gets the serial number of the device information.
547  * @since_tizen 3.0
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
551  *
552  * @param [in] mtp_device The MTP device
553  * @param [out] serial_number The serial number of Device information
554  *
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
566  *
567  * @see mtp_get_device()
568  */
569 int mtp_deviceinfo_get_serial_number(mtp_device_h mtp_device, char **serial_number);
570
571 /**
572  * @brief Gets the device version of the device information.
573  * @since_tizen 3.0
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
577  *
578  * @param [in] mtp_device The MTP device
579  * @param [out] device_version The device version of Device information
580  *
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
592  *
593  * @see mtp_get_device()
594  */
595 int mtp_deviceinfo_get_device_version(mtp_device_h mtp_device, char **device_version);
596
597 /**
598 * @}
599 */
600
601 /**
602  * @addtogroup CAPI_NETWORK_MTP_STORAGEINFO_MODULE
603  * @{
604  */
605
606 /**
607  * @brief Gets the description of the storage information.
608  * @since_tizen 3.0
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
612  *
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
616  *
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
628  *
629  * @see mtp_get_storages()
630  */
631 int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description);
632
633 /**
634  * @brief Gets the free space of the storage information.
635  * @since_tizen 3.0
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
638  *
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
642  *
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
654  *
655  * @see mtp_get_storages()
656  */
657 int mtp_storageinfo_get_free_space(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space);
658
659 /**
660  * @brief Gets the max capacity of the storage information.
661  * @since_tizen 3.0
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
664  *
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
668  *
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
680  *
681  * @see mtp_get_storages()
682  */
683 int mtp_storageinfo_get_max_capacity(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *max_capacity);
684
685 /**
686  * @brief Gets the storage type of the storage information.
687  * @since_tizen 3.0
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
690  *
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
694  *
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
706  *
707  * @see mtp_get_storages()
708  */
709 int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type);
710
711 /**
712  * @brief Gets the volume identifier of the storage information.
713  * @since_tizen 3.0
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
717  *
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
721  *
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
733  *
734  * @see mtp_get_object_handles()
735  */
736 int mtp_storageinfo_get_volume_identifier(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **volume_identifier);
737
738 /**
739 * @}
740 */
741
742 /**
743  * @addtogroup CAPI_NETWORK_MTP_OBJECTINFO_MODULE
744  * @{
745  */
746
747 /**
748  * @brief Gets the filename of the object information.
749  * @since_tizen 3.0
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
753  *
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
757  *
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
770  *
771  * @see mtp_get_object_handles()
772  */
773 int mtp_objectinfo_get_file_name(mtp_device_h mtp_device, mtp_object_h object_handle, char **file_name);
774
775 /**
776  * @brief Gets the keywords of the object information.
777  * @since_tizen 3.0
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
782  *
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
786  *
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
799  *
800  * @see mtp_get_object_handles()
801  */
802 int mtp_objectinfo_get_keywords(mtp_device_h mtp_device, mtp_object_h object_handle, char **keywords);
803
804 /**
805  * @brief Gets the association desc of the object information.
806  * @since_tizen 3.0
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
809  *
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
813  *
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
826  *
827  * @see mtp_get_object_handles()
828  */
829 int mtp_objectinfo_get_association_desc(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_desc);
830
831 /**
832  * @brief Gets the association type of the object information.
833  * @since_tizen 3.0
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
836  *
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
840  *
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
853  *
854  * @see mtp_get_object_handles()
855  */
856 int mtp_objectinfo_get_association_type(mtp_device_h mtp_device, mtp_object_h object_handle, int *asso_type);
857
858 /**
859  * @brief Gets the size of the object information.
860  * @since_tizen 3.0
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
863  *
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
867  *
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
880  *
881  * @see mtp_get_object_handles()
882  */
883 int mtp_objectinfo_get_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
884
885 /**
886  * @brief Gets the parent object handle of the object information.
887  * @since_tizen 3.0
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
890  *
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
894  *
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
907  *
908  * @see mtp_get_object_handles()
909  */
910 int mtp_objectinfo_get_parent_object_handle(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_object_h *parent_object_handle);
911
912 /**
913  * @brief Gets the mtp storage of the object information.
914  * @since_tizen 3.0
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
917  *
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
921  *
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
934  *
935  * @see mtp_get_object_handles()
936  */
937 int mtp_objectinfo_get_storage(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_storage_h* mtp_storage);
938
939 /**
940  * @brief Gets the object created time of the object information.
941  * @since_tizen 3.0
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
946  *
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
950  *
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
963  *
964  * @see mtp_get_object_handles()
965  */
966 int mtp_objectinfo_get_date_created(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_created);
967
968 /**
969  * @brief Gets the object modified time of the object information.
970  * @since_tizen 3.0
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
975  *
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
979  *
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
992  *
993  * @see mtp_get_object_handles()
994  */
995 int mtp_objectinfo_get_date_modified(mtp_device_h mtp_device, mtp_object_h object_handle, int *date_modified);
996
997 /**
998  * @brief Gets the file type of the object information.
999  * @since_tizen 3.0
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
1002  *
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
1006  *
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
1019  *
1020  * @see mtp_get_object_handles()
1021  */
1022 int mtp_objectinfo_get_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
1023
1024 /**
1025  * @brief Gets the image bit depth of the object information.
1026  * @since_tizen 3.0
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
1029  *
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
1033  *
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
1046  *
1047  * @see mtp_get_object_handles()
1048  */
1049 int mtp_objectinfo_get_image_bit_depth(mtp_device_h mtp_device, mtp_object_h object_handle, int *depth);
1050
1051 /**
1052  * @brief Gets the image pixel width of the object information.
1053  * @since_tizen 3.0
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
1056  *
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
1060  *
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
1073  *
1074  * @see mtp_get_object_handles()
1075  */
1076 int mtp_objectinfo_get_image_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
1077
1078 /**
1079  * @brief Gets the image pixel height of the object information.
1080  * @since_tizen 3.0
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
1083  *
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
1087  *
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
1100  *
1101  * @see mtp_get_object_handles()
1102  */
1103 int mtp_objectinfo_get_image_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1104
1105 /**
1106  * @brief Gets the thumbnail size of the object information.
1107  * @since_tizen 3.0
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
1110  *
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
1114  *
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
1127  *
1128  * @see mtp_get_object_handles()
1129  */
1130 int mtp_objectinfo_get_thumbnail_size(mtp_device_h mtp_device, mtp_object_h object_handle, int *size);
1131
1132 /**
1133  * @brief Gets the thumbnail file type of the object information.
1134  * @since_tizen 3.0
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
1137  *
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
1141  *
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
1154  *
1155  * @see mtp_get_object_handles()
1156  */
1157 int mtp_objectinfo_get_thumbnail_file_type(mtp_device_h mtp_device, mtp_object_h object_handle, mtp_filetype_e *file_type);
1158
1159 /**
1160  * @brief Gets the thumbnail pixel height of the object information.
1161  * @since_tizen 3.0
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
1164  *
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
1168  *
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
1181  *
1182  * @see mtp_get_object_handles()
1183  */
1184 int mtp_objectinfo_get_thumbnail_pix_height(mtp_device_h mtp_device, mtp_object_h object_handle, int *height);
1185
1186 /**
1187  * @brief Gets the thumbnail pixel width of the object information.
1188  * @since_tizen 3.0
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
1191  *
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
1195  *
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
1208  *
1209  * @see mtp_get_object_handles()
1210  */
1211 int mtp_objectinfo_get_thumbnail_pix_width(mtp_device_h mtp_device, mtp_object_h object_handle, int *width);
1212
1213 /**
1214 * @}
1215 */
1216
1217 #ifdef __cplusplus
1218 }
1219 #endif
1220
1221 #endif