int ms_user_get_internal_root_path(uid_t uid, char **path);
int ms_user_get_storage_type(uid_t uid, const char *path, ms_user_storage_type_t *storage_type);
+int ms_user_get_root_thumb_store_path(uid_t uid, char **path);
+int ms_user_get_default_thumb_store_path(uid_t uid, char **path);
+int ms_user_get_mmc_thumb_store_path(uid_t uid, char **path);
#ifdef __cplusplus
}
return ret;
}
+
+int ms_user_get_root_thumb_store_path(uid_t uid, char **path)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+
+ if (uid == getuid()) {
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb");
+ *path = g_strndup(result, strlen(result));
+ } else {
+ ret = tzplatform_set_user(uid);
+ MSAPI_RETVM_IF(ret != 0, MS_MEDIA_ERR_INTERNAL, "Invalid UID[%d]", uid);
+
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb");
+ *path = g_strndup(result, strlen(result));
+
+ tzplatform_reset_user();
+ }
+
+ //MSAPI_DBG_SLOG("thumb path [%s]", *path);
+
+ return ret;
+}
+int ms_user_get_default_thumb_store_path(uid_t uid, char **path)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+
+ if (uid == getuid()) {
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/phone");
+ *path = g_strndup(result, strlen(result));
+ } else {
+ ret = tzplatform_set_user(uid);
+ MSAPI_RETVM_IF(ret != 0, MS_MEDIA_ERR_INTERNAL, "Invalid UID[%d]", uid);
+
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/phone");
+ *path = g_strndup(result, strlen(result));
+
+ tzplatform_reset_user();
+ }
+
+ //MSAPI_DBG_SLOG("thumb path [%s]", *path);
+
+ return ret;
+}
+
+int ms_user_get_mmc_thumb_store_path(uid_t uid, char **path)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+
+ if (uid == getuid()) {
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/mmc");
+ *path = g_strndup(result, strlen(result));
+ } else {
+ ret = tzplatform_set_user(uid);
+ MSAPI_RETVM_IF(ret != 0, MS_MEDIA_ERR_INTERNAL, "Invalid UID[%d]", uid);
+
+ const char *result = tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/mmc");
+ *path = g_strndup(result, strlen(result));
+
+ tzplatform_reset_user();
+ }
+
+ //MSAPI_DBG_SLOG("thumb path [%s]", *path);
+
+ return ret;
+}