Apply requirement for gcov automation
[platform/core/system/libstorage.git] / include / storage-internal.h
index e3bd50a..a7ac3f8 100644 (file)
@@ -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,11 +134,33 @@ 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 check user data partition is mounted.\n
+ *
+ * @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_opt_usr(storage_part_mount_e *mounted);
+
 /**
  * @}
  */