From: Hyihong Chae Date: Fri, 20 Nov 2015 09:11:23 +0000 (+0900) Subject: change parameter type of some APIs X-Git-Tag: accepted/tizen/mobile/20151122.234305^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F62%2F52262%2F2;p=platform%2Fcore%2Fapi%2Fmtp.git change parameter type of some APIs Change-Id: Ifbe370712512bac25712d1b650eea981821fe786 Signed-off-by: HyiHong Chae --- diff --git a/include/mtp.h b/include/mtp.h index bae4233..1f6f3ac 100755 --- a/include/mtp.h +++ b/include/mtp.h @@ -419,7 +419,7 @@ MTP_API int mtp_storageinfo_get_description(int device_handle, int storage_id, c * * @see mtp_get_storage_ids() */ -MTP_API int mtp_storageinfo_get_freespace(int device_handle, int storage_id, guint64 *freespace); +MTP_API int mtp_storageinfo_get_freespace(int device_handle, int storage_id, unsigned long long *freespace); /** * @brief Get the max capacity of the storage information. @@ -435,7 +435,7 @@ MTP_API int mtp_storageinfo_get_freespace(int device_handle, int storage_id, gui * * @see mtp_get_storage_ids() */ -MTP_API int mtp_storageinfo_get_maxcapacity(int device_handle, int storage_id, guint64 *maxcapacity); +MTP_API int mtp_storageinfo_get_maxcapacity(int device_handle, int storage_id, unsigned long long *maxcapacity); /** * @brief Get the storage type of the storage information. diff --git a/packaging/capi-network-mtp.spec b/packaging/capi-network-mtp.spec index 87cb0b2..8b94159 100755 --- a/packaging/capi-network-mtp.spec +++ b/packaging/capi-network-mtp.spec @@ -1,6 +1,6 @@ Name: capi-network-mtp Summary: A MTP library in Native API -Version: 1.2.2 +Version: 1.2.3 Release: 1 Group: Network & Connectivity/Other License: Apache-2.0 diff --git a/src/mtp.c b/src/mtp.c index d1096a1..3ce3e87 100755 --- a/src/mtp.c +++ b/src/mtp.c @@ -493,7 +493,7 @@ int mtp_storageinfo_get_description(int device_handle, int storage_id, char **de return ret; } -int mtp_storageinfo_get_freespace(int device_handle, int storage_id, guint64 *freespace) +int mtp_storageinfo_get_freespace(int device_handle, int storage_id, unsigned long long *freespace) { int ret = MTP_ERROR_NONE; @@ -509,16 +509,16 @@ int mtp_storageinfo_get_freespace(int device_handle, int storage_id, guint64 *fr /* precondition check end */ - ret = mtp_gdbus_storageinfo_get_freespace(device_handle, storage_id, freespace); + ret = mtp_gdbus_storageinfo_get_freespace(device_handle, storage_id, (guint64 *)freespace); - TC_PRT("freespace %d", (int)*freespace); + TC_PRT("freespace %llu", *freespace); _END(); return ret; } -int mtp_storageinfo_get_maxcapacity(int device_handle, int storage_id, guint64 *maxcapacity) +int mtp_storageinfo_get_maxcapacity(int device_handle, int storage_id, unsigned long long *maxcapacity) { int ret = MTP_ERROR_NONE; @@ -534,9 +534,9 @@ int mtp_storageinfo_get_maxcapacity(int device_handle, int storage_id, guint64 * /* precondition check end */ - ret = mtp_gdbus_storageinfo_get_maxcapacity(device_handle, storage_id, maxcapacity); + ret = mtp_gdbus_storageinfo_get_maxcapacity(device_handle, storage_id, (guint64 *)maxcapacity); - TC_PRT("maxcapacity %d", (int)*maxcapacity); + TC_PRT("maxcapacity %llu", *maxcapacity); _END(); diff --git a/test/mtp_unit_test.c b/test/mtp_unit_test.c index 8667883..6488e98 100755 --- a/test/mtp_unit_test.c +++ b/test/mtp_unit_test.c @@ -506,11 +506,11 @@ int storageinfo_test_get_description(void) int storageinfo_test_get_freespace(void) { int ret = 0; - guint64 value = 0; + unsigned long long value = 0; BEGIN(); ret = mtp_storageinfo_get_freespace(handle, strg_handle, &value); - TC_PRT("ret[%d]: freespace[%d]", ret, (int)value); + TC_PRT("ret[%d]: freespace[%llu]", ret, value); END(); return ret; @@ -519,11 +519,11 @@ int storageinfo_test_get_freespace(void) int storageinfo_test_get_maxcapacity(void) { int ret = 0; - guint64 value = 0; + unsigned long long value = 0; BEGIN(); ret = mtp_storageinfo_get_maxcapacity(handle, strg_handle, &value); - TC_PRT("ret[%d]: maxcapacity[%d]", ret, (int)value); + TC_PRT("ret[%d]: maxcapacity[%llu]", ret, value); END(); return ret; @@ -1118,7 +1118,7 @@ int application_test_scenario(void) tc_table_t tc_table[] = { /* manager api */ {"mtp_initialize", 1, manager_test_initialize}, - {"mtp_get_device_list", 2, manager_test_get_device_list}, + {"mtp_get_device_list", 2, manager_test_get_device_list}, {"mtp_get_device_handle", 3, manager_test_get_device_handle}, {"mtp_get_storage_ids", 4, manager_test_get_storage_ids}, {"mtp_get_object_handles", 5, manager_test_get_object_handles},