Reinforce API documents 00/317800/1 accepted/tizen/unified/20241004.041849 accepted/tizen/unified/x/20241006.082018 accepted/tizen/unified/x/asan/20241014.000637
authorDohyun Pyun <dh79.pyun@samsung.com>
Wed, 18 Sep 2024 23:13:49 +0000 (08:13 +0900)
committerDohyun Pyun <dh79.pyun@samsung.com>
Wed, 18 Sep 2024 23:13:49 +0000 (08:13 +0900)
Change-Id: I1086bc4b95d26ee6a1a42411e6eab92149c7cd0a
Signed-off-by: Dohyun Pyun <dh79.pyun@samsung.com>
include/mtp.h

index 77c8a7e9acd05b7191890fd3ad876c692f8b1341..f5b7b572d8bf2297cc3f52bcf371e0738b11640b 100644 (file)
@@ -174,6 +174,9 @@ typedef void (*mtp_event_cb)(mtp_event_e event, int event_parameter, void *user_
 
 /**
  * @brief Initializes for using MTP.
+ * @details This function sets up the necessary environment for utilizing the Media Transfer Protocol (MTP).
+ *          It must be called before performing any other MTP operations. By invoking this API, you enable
+ *          your application to communicate with MTP devices such as digital cameras, smartphones, and tablets.
  * @since_tizen 3.0
  * @remarks This function must be called before proceeding any other mtp functions.
  * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
@@ -194,6 +197,9 @@ int mtp_initialize(void);
  * @since_tizen 3.0
  *
  * @remarks The @a mtp_devices should be released using free().
+ * @details This function retrieves the list of available MTP (Media Transfer Protocol) devices connected to
+ *          your system. By calling this API, you can explore the variety of MTP-enabled gadgets such as
+ *          digital cameras, smartphones, and tablets accessible through your application.
  *
  * @param[out] mtp_devices The MTP device list
  * @param[out] device_count Length of device list
@@ -213,6 +219,11 @@ int mtp_get_devices(mtp_device_h **mtp_devices, int *device_count);
 
 /**
  * @brief Gets mtp storages from the given device.
+ * @details This function fetches the list of available MTP (Media Transfer Protocol) storages present in
+ *          a specified MTP device. By invoking this API, you can explore the various storage options within
+ *          the selected gadget, enabling seamless data transfer between your application and the device's
+ *          internal or external storage compartments.
+ *
  * @since_tizen 3.0
  * @remarks The @a mtp_storages should be freed using free().
  *
@@ -235,6 +246,10 @@ int mtp_get_storages(mtp_device_h mtp_device, mtp_storage_h **mtp_storages, int*
 
 /**
  * @brief Gets object handles from the given device and storage.
+ * @details This function retrieves the list of object handles associated with a specified MTP device and storage.
+ *          By specifying the desired file type and parent object handle, you can navigate through the hierarchical
+ *          structure of objects within the chosen storage compartment.
+ *
  * @since_tizen 3.0
  * @remarks The @a object_handles should be freed using free().
  * @remarks If the @a parent is 0, it means "root folder" of mtp storage.
@@ -263,6 +278,10 @@ int mtp_get_object_handles(mtp_device_h mtp_device, mtp_storage_h mtp_storage, m
 
 /**
  * @brief Gets object for a given path from object handle.
+ * @details This function extracts an object from a specified MTP device based on its object handle and transfers
+ *          it to a destination path on the host storage. By providing the MTP device, object handle, and destination
+ *          path as inputs, you can seamlessly move files and directories between the MTP device's internal or external
+ *          storage and your application's local storage.
  * @since_tizen 3.0
  * @remarks The @a dest_path is host storage path.
  * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
@@ -290,6 +309,10 @@ int mtp_get_object(mtp_device_h mtp_device, mtp_object_h object_handle, char *de
 
 /**
  * @brief Gets thumbnail from the given object handle.
+ * @details This function extracts a thumbnail image from a specified object handle in a MTP device and saves
+ *          it to a designated location on the host storage. By providing the MTP device, object handle, and
+ *          destination path as inputs, you can easily obtain thumbnails of images and videos stored within
+ *          the MTP device's internal or external storage.
  * @since_tizen 3.0
  * @remarks The @a dest_path is host storage path.
  * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
@@ -317,6 +340,10 @@ int mtp_get_thumbnail(mtp_device_h mtp_device, mtp_object_h object_handle, char
 
 /**
  * @brief Adds a callback function for receiving MTP event.
+ * @details This function registers a callback function that will be invoked whenever an MTP event occurs.
+ *          By providing the callback function and optional user data as arguments, you can receive notifications
+ *          regarding changes in device, storage, or object states, as well as the turning off of the MTP service.
+ *
  * @since_tizen 3.0
  * @remarks You can register multiple callback. \n
  * If you don't want to receive the event, then using the mtp_remove_mtp_event_cb() function to unregister a callback.
@@ -340,6 +367,10 @@ int mtp_add_mtp_event_cb(mtp_event_cb event_cb, void *user_data);
 
 /**
  * @brief Removes the callback function.
+ * @details This function unregisters a previously added callback function for receiving MTP events.
+ *          By providing the callback function as an argument, you can stop receiving notifications
+ *          regarding changes in device, storage, or object states, as well as the turning off of the MTP service.
+ *
  * @since_tizen 3.0
  *
  * @param[in] event_cb The callback
@@ -356,6 +387,9 @@ int mtp_remove_mtp_event_cb(mtp_event_cb event_cb);
 
 /**
  * @brief Deinitializes MTP operation.
+ * @details This function terminates the usage of the Media Transfer Protocol (MTP) and frees up any associated resources.
+ *          It is essential to call this API once you have completed all MTP operations and no longer require access to MTP devices
+ *
  * @since_tizen 3.0
  * @remarks http://tizen.org/privilege/mediastorage is needed if input or output path are relevant to media storage.\n
  * http://tizen.org/privilege/externalstorage is needed if input or output path are relevant to external storage. \n