int media_svc_insert_folder_end(uid_t uid);
int media_svc_check_folder_exist_by_path(sqlite3 *handle, const char *storage_id, const char *folder_path);
-int media_svc_get_folder_id(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id);
int media_svc_append_query(const char *query, uid_t uid);
int media_svc_send_query(uid_t uid);
return media_svc_check_folder_exist_by_path(handle, storage_id, folder_path);
}
-int get_folder_id(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id)
-{
- return media_svc_get_folder_id(handle, storage_id, path, folder_id);
-}
-
int get_media_type(const char *path, int *mediatype)
{
return media_svc_get_media_type(path, mediatype);
return MS_MEDIA_ERR_NONE;
}
-
-int _media_svc_get_folder_uuid(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id)
-{
- int ret = MS_MEDIA_ERR_NONE;
- sqlite3_stmt *sql_stmt = NULL;
- char *sql = NULL;
-
- media_svc_retvm_if(storage_id == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "storage_id is NULL");
- media_svc_retvm_if(path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
-
- sql = sqlite3_mprintf("SELECT folder_uuid FROM %q WHERE (storage_uuid='%q' AND path='%q')", MEDIA_SVC_DB_TABLE_FOLDER, storage_id, path);
-
- ret = _media_svc_sql_prepare_to_step(handle, sql, &sql_stmt);
-
- media_svc_retv_if(ret != MS_MEDIA_ERR_NONE, ret);
-
- SAFE_STRLCPY(folder_id, (const char *)sqlite3_column_text(sql_stmt, 0), MEDIA_SVC_UUID_SIZE+1);
-
- SQLITE3_FINALIZE(sql_stmt);
-
- if (!STRING_VALID(folder_id)) {
- media_svc_error("Not found valid storage id [%s]", path);
- ret = MS_MEDIA_ERR_INVALID_PARAMETER;
- }
-
- return ret;
-}
-
return MS_MEDIA_ERR_NONE;
}
-int media_svc_get_folder_id(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id)
-{
- return _media_svc_get_folder_uuid(handle, storage_id, path, folder_id);
-}
-
int media_svc_append_query(const char *query, uid_t uid)
{
return _media_svc_append_query_list(query, uid);
GList ** _media_svc_get_folder_list_ptr(void);
int _media_svc_count_folder_with_path(sqlite3 *handle, const char *storage_id, const char *path, int *count);
-int _media_svc_get_folder_uuid(sqlite3 *handle, const char *storage_id, const char *path, char *folder_id);
#endif /*_MEDIA_SVC_MEDIA_FOLDER_H_*/