Change value name 85/46885/1 accepted/tizen/mobile/20150828.082951 accepted/tizen/tv/20150828.083004 accepted/tizen/wearable/20150828.083014 submit/tizen/20150828.015252
authorMinje Ahn <minje.ahn@samsung.com>
Thu, 27 Aug 2015 02:07:27 +0000 (11:07 +0900)
committerMinje Ahn <minje.ahn@samsung.com>
Thu, 27 Aug 2015 02:07:27 +0000 (11:07 +0900)
Change-Id: Idf254645fa6b6b12b58077ed81c7692dd93c29f7
Signed-off-by: Minje Ahn <minje.ahn@samsung.com>
include/media_controller_db.h
src/media_controller_db.c
svc/media_controller_db_util.c
svc/media_controller_db_util.h

index 67d3be5..245f71a 100755 (executable)
@@ -59,7 +59,7 @@
 #define SQLITE3_SAFE_FREE(sql_string)  {if(sql_string) { sqlite3_free(sql_string); sql_string = NULL;}}
 #define SQLITE3_FINALIZE(x)    {if(x != NULL) {sqlite3_finalize(x);}}
 
-int mc_db_connect(void **db_handle, bool needWrite);
+int mc_db_connect(void **db_handle, bool need_write);
 int mc_db_disconnect(void *db_handle);
 int mc_db_create_tables(void *handle);
 int mc_db_create_server_table(void *handle, const char *server_name);
index b71923a..97f7133 100755 (executable)
@@ -177,7 +177,7 @@ static int __mc_db_get_ulong_value_of_key(void *handle, const char *server_name,
        return MEDIA_CONTROLLER_ERROR_NONE;
 }
 
-int mc_db_connect(void **handle, bool needWrite)
+int mc_db_connect(void **handle, bool need_write)
 {
        int ret = MEDIA_CONTROLLER_ERROR_NONE;
        sqlite3 *db_handle = NULL;
@@ -187,7 +187,7 @@ int mc_db_connect(void **handle, bool needWrite)
        mc_retvm_if(handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
 
        /*Connect DB*/
-       if(needWrite) {
+       if(need_write) {
                ret = db_util_open_with_options(tzplatform_mkpath(TZ_USER_DB, MC_DB_NAME), &db_handle, SQLITE_OPEN_READWRITE, NULL);
        } else {
                ret = db_util_open_with_options(tzplatform_mkpath(TZ_USER_DB, MC_DB_NAME), &db_handle, SQLITE_OPEN_READONLY, NULL);
index 4da7dd3..5e24256 100755 (executable)
@@ -93,7 +93,7 @@ static char* __mc_get_db_name(uid_t uid)
        return result_psswd_rtn;
 }
 
-int mc_db_util_connect(void **handle, uid_t uid, bool needWrite)
+int mc_db_util_connect(void **handle, uid_t uid, bool need_write)
 {
        int ret = MEDIA_CONTROLLER_ERROR_NONE;
        sqlite3 *db_handle = NULL;
@@ -101,7 +101,7 @@ int mc_db_util_connect(void **handle, uid_t uid, bool needWrite)
        mc_retvm_if(handle == NULL, MEDIA_CONTROLLER_ERROR_INVALID_PARAMETER, "Handle is NULL");
 
        /*Connect DB*/
-       if(needWrite) {
+       if(need_write) {
                ret = db_util_open_with_options(__mc_get_db_name(uid), &db_handle, SQLITE_OPEN_READWRITE, NULL);
        } else {
                ret = db_util_open_with_options(__mc_get_db_name(uid), &db_handle, SQLITE_OPEN_READONLY, NULL);
index 6a7e421..7a6cad2 100755 (executable)
@@ -26,7 +26,7 @@
 #define SQLITE3_SAFE_FREE(sql_string)  {if(sql_string) { sqlite3_free(sql_string); sql_string = NULL;}}
 #define SQLITE3_FINALIZE(x)    {if(x != NULL) {sqlite3_finalize(x);}}
 
-int mc_db_util_connect(void **handle, uid_t uid, bool needWrite);
+int mc_db_util_connect(void **handle, uid_t uid, bool need_write);
 int mc_db_util_update_db(void *handle, const char *sql_str);
 int mc_db_util_disconnect(void *handle);