apply ACR comments 03/56603/1 accepted/tizen/mobile/20160115.010022 accepted/tizen/tv/20160115.010039 accepted/tizen/wearable/20160115.010057 submit/tizen/20160114.072206
authorJihoon Jung <jh8801.jung@samsung.com>
Mon, 11 Jan 2016 09:39:59 +0000 (18:39 +0900)
committerJihoon Jung <jh8801.jung@samsung.com>
Mon, 11 Jan 2016 09:41:09 +0000 (18:41 +0900)
Signed-off-by: Ji-hoon Jung <jh8801.jung@samsung.com>
Change-Id: Icdb528587e2d67a5f2314b6fbb82511000062cfe

include/mtp.h
src/mtp.c
test/mtp_unit_test.c

index 05b8fbf..0ea1b30 100755 (executable)
@@ -81,6 +81,19 @@ typedef enum {
 } mtp_error_e;
 
 /**
+ * @brief Enumerations for MTP Storage type
+ * @since_tizen 3.0
+ */
+
+typedef enum {
+       MTP_STORAGE_TYPE_UNDEFINED, /**< Storage type is undefined */
+       MTP_STORAGE_TYPE_FIXED_ROM, /**< Storage type is fixed ROM */
+       MTP_STORAGE_TYPE_REMOVABLE_ROM, /**< Storage type is removable ROM */
+       MTP_STORAGE_TYPE_FIXED_RAM, /**< Storage type is fixed RAM */
+       MTP_STORAGE_TYPE_REMOVABLE_RAM /**< Storage type is Removable RAM */
+} mtp_storage_type_e;
+
+/**
  * @brief Enumerations for MTP file type
  * @since_tizen 3.0
  */
@@ -652,7 +665,7 @@ int mtp_storageinfo_get_max_capacity(mtp_device_h mtp_device, mtp_storage_h mtp_
  *
  * @see mtp_get_storages()
  */
-int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, int *storage_type);
+int mtp_storageinfo_get_storage_type(mtp_device_h mtp_device, mtp_storage_h mtp_storage, mtp_storage_type_e *storage_type);
 
 /**
  * @brief Gets the volume identifier of the storage information.
@@ -868,6 +881,8 @@ int mtp_objectinfo_get_storage(mtp_device_h mtp_device, mtp_object_h object_hand
 /**
  * @brief Gets the data created time of the object information.
  * @since_tizen 3.0
+ * @remarks When interpreted as an absolute time value, \n
+ * @a data_created represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
  *
  * @param [in] mtp_device The MTP device
  * @param [in] object_handle The object handle
@@ -893,6 +908,8 @@ int mtp_objectinfo_get_data_created(mtp_device_h mtp_device, mtp_object_h object
 /**
  * @brief Gets the data modified time of the object information.
  * @since_tizen 3.0
+ * @remarks When interpreted as an absolute time value, \n
+ * @a data_modified represents the number of seconds elapsed since the Epoch, 1970-01-01 00:00:00 +0000 (UTC).
  *
  * @param [in] mtp_device The MTP device
  * @param [in] object_handle The object handle
index 50f03f3..b250cba 100755 (executable)
--- a/src/mtp.c
+++ b/src/mtp.c
@@ -606,7 +606,7 @@ int mtp_storageinfo_get_max_capacity(int mtp_device, int mtp_storage, unsigned l
        return ret;
 }
 
-int mtp_storageinfo_get_storage_type(int mtp_device, int mtp_storage, int *storage_type)
+int mtp_storageinfo_get_storage_type(int mtp_device, int mtp_storage, mtp_storage_type_e *storage_type)
 {
        int ret = MTP_ERROR_NONE;
 
@@ -622,7 +622,7 @@ int mtp_storageinfo_get_storage_type(int mtp_device, int mtp_storage, int *stora
 
        /* precondition check end */
 
-       ret = mtp_gdbus_storageinfo_get_storagetype(mtp_device, mtp_storage, storage_type);
+       ret = mtp_gdbus_storageinfo_get_storagetype(mtp_device, mtp_storage, (int *)storage_type);
 
        TC_PRT("storagetype %d", *storage_type);
 
index 266a0d2..f33ee83 100755 (executable)
@@ -566,7 +566,7 @@ int storageinfo_test_get_maxcapacity(void)
 int storageinfo_test_get_storagetype(void)
 {
        int ret = 0;
-       int value = 0;
+       mtp_storage_type_e value = 0;
        BEGIN();
 
        ret = mtp_storageinfo_get_storage_type(mtp_device, mtp_storage, &value);