From: Hyihong Chae Date: Tue, 2 Feb 2016 08:48:11 +0000 (+0900) Subject: add brief sentence ('in bytes') X-Git-Tag: submit/tizen/20160203.051417^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dd5136cbdfcb7058765810941fc9c029880cd8a4;p=platform%2Fcore%2Fapi%2Fmtp.git add brief sentence ('in bytes') add remove routine of event-callback glist at deinitialized. Change-Id: I15112289361882b3409a4e39b41bbf25b191ff18 Signed-off-by: HyiHong Chae --- diff --git a/include/mtp.h b/include/mtp.h index 333d17c..47aa322 100755 --- a/include/mtp.h +++ b/include/mtp.h @@ -508,12 +508,12 @@ int mtp_deviceinfo_get_device_version(mtp_device_h mtp_device, char **device_ver int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_storage, char **description); /** - * @brief Gets the free space of the storage information. + * @brief Gets the free space of the storage information in bytes. * @since_tizen 3.0 * * @param [in] mtp_device The MTP device * @param [in] mtp_storage The MTP storage - * @param [out] free_space The free space of Storage information + * @param [out] free_space The free space of Storage information (bytes) * * @return 0 on success, otherwise a negative error value. * @retval #MTP_ERROR_NONE Successful @@ -532,12 +532,12 @@ int mtp_storageinfo_get_description(mtp_device_h mtp_device, mtp_storage_h mtp_s int mtp_storageinfo_get_free_space(mtp_device_h mtp_device, mtp_storage_h mtp_storage, unsigned long long *free_space); /** - * @brief Gets the max capacity of the storage information. + * @brief Gets the max capacity of the storage information in bytes. * @since_tizen 3.0 * * @param [in] mtp_device The MTP device * @param [in] mtp_storage The MTP storage - * @param [out] max_capacity The max capacity of Storage information + * @param [out] max_capacity The max capacity of Storage information (bytes) * * @return 0 on success, otherwise a negative error value. * @retval #MTP_ERROR_NONE Successful diff --git a/src/mtp.c b/src/mtp.c index be028be..7d4109f 100755 --- a/src/mtp.c +++ b/src/mtp.c @@ -314,6 +314,7 @@ int mtp_deinitialize(void) if (__is_initialized == true && ref_count == 0) { mtp_db_deinit(); + mtp_gdbus_manager_remove_all_event_cb(); ret = mtp_gdbus_manager_deinitialize(); __is_initialized = false; } diff --git a/src/mtp_gdbus_manager.c b/src/mtp_gdbus_manager.c index e7be1ac..a34e654 100755 --- a/src/mtp_gdbus_manager.c +++ b/src/mtp_gdbus_manager.c @@ -95,6 +95,14 @@ mtp_error_e mtp_gdbus_manager_remove_event_cb(mtp_event_cb callback) return MTP_ERROR_NONE; } +mtp_error_e mtp_gdbus_manager_remove_all_event_cb(void) +{ + g_slist_free_full(event_cb_list, g_free); + event_cb_list = NULL; + + return MTP_ERROR_NONE; +} + mtp_error_e mtp_gdbus_manager_initialize(void) { mtp_error_e result = MTP_ERROR_NONE;