Change tzplatform_getenv to tzplatform_uid_getenv
[platform/core/system/libstorage.git] / include / storage-expand.h
index 48c26b8..d5c0843 100644 (file)
@@ -50,8 +50,9 @@ typedef enum {
  * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
  */
 typedef enum {
-       STORAGE_TYPE_INTERNAL, /**< Internal device storage (built-in storage in a device, non-removable) */
-       STORAGE_TYPE_EXTERNAL, /**< External storage */
+       STORAGE_TYPE_INTERNAL,          /**< Internal device storage (built-in storage in a device, non-removable) */
+       STORAGE_TYPE_EXTERNAL,          /**< External storage */
+       STORAGE_TYPE_EXTENDED_INTERNAL, /**< Extended internal storage (External storage used as internal storage) (Since 4.0) */
 } storage_type_e;
 
 
@@ -249,8 +250,9 @@ int storage_unset_state_changed_cb(int storage_id, storage_state_changed_cb call
  * @since_tizen 3.0
  */
 typedef enum {
-       STORAGE_DEV_EXT_SDCARD = 1001, /**< sdcard device (external storage) */
-       STORAGE_DEV_EXT_USB_MASS_STORAGE, /**< USB storage device (external storage) */
+       STORAGE_DEV_EXT_SDCARD = 1001,     /**< SD card device (external storage) */
+       STORAGE_DEV_EXT_USB_MASS_STORAGE,  /**< USB storage device (external storage) */
+       STORAGE_DEV_EXTENDED_INTERNAL,     /**< Extended internal storage device (External storage used as internal storage) (Since 4.0) */
 } storage_dev_e;
 
 
@@ -258,7 +260,7 @@ typedef enum {
  * @brief Called when the state of a storage type changes.
  * @since_tizen 3.0
  * @param[in] storage_id The unique storage ID
- * @param[in] type The type of the storage device
+ * @param[in] dev The type of the external storage device
  * @param[in] state The state of the storage
  * @param[in] fstype The type of the file system
  * @param[in] fsuuid The uuid of the file system
@@ -347,6 +349,30 @@ int storage_get_available_space(int storage_id, unsigned long long *bytes);
 
 
 /**
+ * @brief Gets the type and the kind of external device for the given storage id.
+ *
+ * @since_tizen 5.0
+ *
+ * @remarks This function works only for external storages.
+ * If @a type is #STORAGE_TYPE_INTERNAL, this function returns #STORAGE_ERROR_INVALID_PARAMETER and @a dev is unchanged.
+ *
+ * @param[in] storage_id The storage id
+ * @param[out] type The storage @a type (internal or external). If @a type is #STORAGE_TYPE_INTERNAL, this function returns #STORAGE_ERROR_INVALID_PARAMETER and @a dev is unchanged.
+ * @param[out] dev The storage device for external storage.
+ *
+ * @return @c 0 on success,
+ *         otherwise a negative error value
+ *
+ * @retval #STORAGE_ERROR_NONE               Successful
+ * @retval #STORAGE_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #STORAGE_ERROR_OUT_OF_MEMORY      Out of memory
+ * @retval #STORAGE_ERROR_NOT_SUPPORTED      Storage not supported
+ * @retval #STORAGE_ERROR_OPERATION_FAILED   Operation failed
+ */
+int storage_get_type_dev(int storage_id, storage_type_e *type, storage_dev_e *dev);
+
+
+/**
  * @}
  */