/usr/bin/chmod 0644 $TZ_USER_DB/.media.db
/usr/bin/chsmack -a 'User::Home' $TZ_USER_DB/.media.db
-/usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb/phone
-/usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb/mmc
+/usr/bin/mkdir -p $TZ_USER_SHARE/media/.thumb
/usr/bin/chown -R multimedia_fw:multimedia_fw $TZ_USER_SHARE/media
/usr/bin/chsmack -a 'User::App::Shared' -t $TZ_USER_SHARE/media
/usr/bin/chmod 0775 $TZ_USER_SHARE/media
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_e *storage_type);
int ms_user_get_root_thumb_store_path(uid_t uid, char **path);
-int ms_user_get_thumb_store_path(uid_t uid, ms_user_storage_type_e storage_type, const char *storage_id, char **path);
int ms_user_get_media_db_path(uid_t uid, char **path);
#ifndef _USE_TVPD_MODE
MEDIA_DB = 0,
INTERNAL_ROOT,
THUMB_ROOT,
- THUMB_INTERNAL,
- THUMB_EXTERNAL,
MEDIA_SHARED
} ms_user_path_type_e;
idx = uid - 5000;
MSAPI_RETVM_IF(idx < 0 || idx > 127, MS_MEDIA_ERR_INVALID_PARAMETER, "Invalid uid");
- MSAPI_RETVM_IF(type == THUMB_EXTERNAL && storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
g_mutex_lock(&tzplatform_mutex);
case THUMB_ROOT:
result = tzplatform_context_mkpath(context[idx], TZ_USER_SHARE, "media/.thumb");
break;
- case THUMB_INTERNAL:
- result = tzplatform_context_mkpath(context[idx], TZ_USER_SHARE, "media/.thumb/phone");
- break;
- case THUMB_EXTERNAL:
- result = tzplatform_context_mkpath3(context[idx], TZ_USER_SHARE, "media/.thumb/mmc", storage_id);
- break;
#ifndef _USE_TVPD_MODE
case MEDIA_SHARED:
result = tzplatform_context_getenv(context[idx], TZ_USER_MEDIASHARED);
return ret;
}
-int ms_user_get_thumb_store_path(uid_t uid, ms_user_storage_type_e storage_type, const char *storage_id, char **path)
-{
- int ret = MS_MEDIA_ERR_NONE;
-
- if (uid == getuid()) {
- if (storage_type == MS_USER_STORAGE_INTERNAL)
- *path = g_strdup(tzplatform_mkpath(TZ_USER_SHARE, "media/.thumb/phone"));
- else
- *path = g_strdup(tzplatform_mkpath3(TZ_USER_SHARE, "media/.thumb/mmc", storage_id));
- } else {
- if (storage_type == MS_USER_STORAGE_INTERNAL)
- ret = __ms_user_get_path(THUMB_INTERNAL, NULL, uid, path);
- else
- ret = __ms_user_get_path(THUMB_EXTERNAL, storage_id, uid, path);
- }
-
- //MSAPI_DBG_SLOG("thumb path [%s]", *path);
- /* Create if not exist */
- if (storage_type == MS_USER_STORAGE_EXTERNAL) {
- if (!g_file_test(*path, G_FILE_TEST_EXISTS)) {
- ret = g_mkdir_with_parents(*path, S_IRWXU | S_IRWXG | S_IRWXO);
- if (ret != 0) {
- MSAPI_DBG_ERR("Failed to create thumb directory for external");
- ret = MS_MEDIA_ERR_INTERNAL;
- }
- }
- }
-
- return ret;
-}
-
int ms_user_get_media_db_path(uid_t uid, char **path)
{
int ret = MS_MEDIA_ERR_NONE;