X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=include%2Fstorage-internal.h;h=a7ac3f8f8d2d79f46909f5686f9184eeb9ae52cd;hb=893a2a428b3c400c78cf9e883a2faec52dc60687;hp=5548d8461282df98abfaab1945abf1a3087119f9;hpb=b5be274f3310695f24d748b1f26a186089f423d5;p=platform%2Fcore%2Fsystem%2Flibstorage.git diff --git a/include/storage-internal.h b/include/storage-internal.h index 5548d84..a7ac3f8 100644 --- a/include/storage-internal.h +++ b/include/storage-internal.h @@ -49,9 +49,9 @@ extern "C" { * * @retval #STORAGE_ERROR_NONE Successful * @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter - * @retval #STORAGE_ERROR_NO_DEVICE No such device - * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory + * @retval #STORAGE_ERROR_NOT_SUPPORTED Storage not supported + * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ int storage_get_primary_sdcard(int *storage_id, char **path); @@ -78,8 +78,8 @@ struct mmc_contents { * @retval #STORAGE_ERROR_NONE Successful * @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STORAGE_ERROR_NO_DEVICE No such device - * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory + * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ int storage_request_mount_mmc(struct mmc_contents *mmc_data); @@ -101,8 +101,8 @@ int storage_request_mount_mmc(struct mmc_contents *mmc_data); * @retval #STORAGE_ERROR_NONE Successful * @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STORAGE_ERROR_NO_DEVICE No such device - * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory + * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ int storage_request_unmount_mmc(struct mmc_contents *mmc_data, int option); @@ -117,8 +117,8 @@ int storage_request_unmount_mmc(struct mmc_contents *mmc_data, int option); * @retval #STORAGE_ERROR_NONE Successful * @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STORAGE_ERROR_NO_DEVICE No such device - * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory + * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ int storage_request_format_mmc(struct mmc_contents *mmc_data); @@ -134,23 +134,32 @@ int storage_request_format_mmc(struct mmc_contents *mmc_data); * @retval #STORAGE_ERROR_NONE Successful * @retval #STORAGE_ERROR_INVALID_PARAMETER Invalid parameter * @retval #STORAGE_ERROR_NO_DEVICE No such device - * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed - * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory + * @retval #STORAGE_ERROR_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ int storage_format_mmc(struct mmc_contents *mmc_data, int option); +typedef enum { + STORAGE_PART_ERROR = -1, /**< Checking partition is failed */ + STORAGE_PART_NOT_MOUNTED = 0, /**< Partition is not mounted */ + STORAGE_PART_MOUNTED = 1, /**< Partition is mounted */ + STORAGE_PART_NOT_SUPPORTED = 2, /**< Partition is not supported */ +} storage_part_mount_e; + /** - * @brief This API is used to format mmc.\n + * @brief This API is used to check user data partition is mounted.\n * - * @param[in] path for checking mounted - * @param[out] mounted True when path is mounted + * @param[out] mounted 1 when user partition is mounted, 0 when user partition is not mounted, 2 when user partition is not supported(2 partitions), and Less then 0 when error return. * * @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_OPERATION_FAILED Operation failed + * @retval #STORAGE_ERROR_OUT_OF_MEMORY Out of memory */ -int storage_is_mounted(char *path, bool *mounted); +int storage_is_mounted_opt_usr(storage_part_mount_e *mounted); /** * @}