* @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;
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
* @remarks Files saved on the internal/external storage are readable or writable by all applications.\n
* When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n
- * If you want to access files or directories in internal storage, you must declare http://tizen.org/privilege/mediastorage.\n
- * If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n
+ * If you want to access files or directories in internal storage, you must declare %http://tizen.org/privilege/mediastorage.\n
+ * If you want to access files or directories in external storage, you must declare %http://tizen.org/privilege/externalstorage.\n
+ * Refer to <a href="https://docs.tizen.org/application/native/guides/security/privacy-related-permissions"><b>Privacy-related Permissions</b></a>.\n
* You must release @a path using free().
* @param[in] storage_id The storage device
* @param[out] path The absolute path to the storage directory
* @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
* @see storage_get_state()
*/
int storage_get_root_directory(int storage_id, char **path);
* @remarks Files saved on the internal/external storage are readable or writable by all applications.\n
* When an application is uninstalled, the files written by that application are not removed from the internal/external storage.\n
* The directory path may not exist, so you must make sure that it exists before using it.\n
- * If you want to access files or directories in internal storage except #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare http://tizen.org/privilege/mediastorage.\n
- * If you want to access files or directories in #STORAGE_DIRECTORY_SYSTEM_RINGTONES, you must declare %http://tizen.org/privilege/systemsettings.\n
- * If you want to access files or directories in external storage, you must declare http://tizen.org/privilege/externalstorage.\n
+ * If you want to access files or directories in internal storage, you must declare %http://tizen.org/privilege/mediastorage.\n
+ * If you want to access files or directories in external storage, you must declare %http://tizen.org/privilege/externalstorage.\n
+ * Refer to <a href="https://docs.tizen.org/application/native/guides/security/privacy-related-permissions"><b>Privacy-related Permissions</b></a>.\n
* You must release @a path using free().
* @param[in] storage_id The storage device
* @param[in] type The directory type
* @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
* @see storage_get_state()
*/
int storage_get_directory(int storage_id, storage_directory_e type, char **path);
* 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(int storage_id, storage_type_e *type);
* 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
* @see storage_get_root_directory()
* @see storage_get_total_space()
* @see storage_get_available_space()
* @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;
* @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
* 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
* @see storage_get_state()
* 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
* @see storage_get_state()
/**
+ * @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);
+
+
+/**
* @}
*/