-static int __media_info_get_media_path_by_id_from_db(const char *media_id, char **path)
-{
- int ret = MEDIA_CONTENT_ERROR_NONE;
- sqlite3_stmt *stmt = NULL;
- char *select_query = NULL;
-
- content_retip_if_fail(STRING_VALID(media_id));
-
- select_query = sqlite3_mprintf(SELECT_MEDIA_PATH_BY_ID, media_id);
-
- ret = _content_get_result(select_query, &stmt);
- SQLITE3_SAFE_FREE(select_query);
- content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
-
- if (sqlite3_step(stmt) == SQLITE_ROW) {
- *path = g_strdup((const char *)sqlite3_column_text(stmt, 0));
- } else {
- content_error("There's no media with this ID : %s", media_id);
- *path = NULL;
- ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
- }
-
- SQLITE3_FINALIZE(stmt);
-
- return ret;
-}
-