apply guideline for using dlog
authorNam KwanWoo <kw46.nam@samsung.com>
Thu, 20 Dec 2012 07:27:20 +0000 (16:27 +0900)
committerNam KwanWoo <kw46.nam@samsung.com>
Thu, 20 Dec 2012 07:27:20 +0000 (16:27 +0900)
Change-Id: Ic83329a1b06f2b6f5f1357f9ce79af1909196bca

src/runtime_info.c [changed mode: 0755->0644]
src/runtime_info_connectivity.c [changed mode: 0755->0644]
src/runtime_info_locale.c [changed mode: 0755->0644]
src/runtime_info_location.c [changed mode: 0755->0644]
src/runtime_info_system.c
src/runtime_info_vconf.c [changed mode: 0755->0644]

old mode 100755 (executable)
new mode 100644 (file)
index bebb761..dc64831
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 #define RUNTIME_INFO_MAX -1
 
@@ -341,24 +341,24 @@ int runtime_info_get_value(runtime_info_key_e key, runtime_info_data_type_e data
        runtime_info_func_get_value get_value;
 
        if (runtime_info_get_item(key, &runtime_info_item))     {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid key", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        if (runtime_info_item->data_type != data_type) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid data type", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid data type", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        get_value = runtime_info_item->get_value;
 
        if (get_value == NULL) {
-               LOGE("[%s] IO_ERROR(0x%08x) : failed to call getter for the runtime information", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR);
+               LOGE("IO_ERROR(0x%08x) : failed to call getter for the runtime information", RUNTIME_INFO_ERROR_IO_ERROR);
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
 
        if (get_value(value) != RUNTIME_INFO_ERROR_NONE) {
-               LOGE("[%s] IO_ERROR(0x%08x) : failed to get the runtime informaion / key(%d)", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR, key);
+               LOGE("IO_ERROR(0x%08x) : failed to get the runtime informaion / key(%d)", RUNTIME_INFO_ERROR_IO_ERROR, key);
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
 
@@ -371,15 +371,14 @@ int runtime_info_get_value_int(runtime_info_key_e key, int *value)
        runtime_info_value_u runtime_info_value;
 
        if (value == NULL) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid output param", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid output param", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        retcode = runtime_info_get_value(key, RUNTIME_INFO_DATA_TYPE_INT, &runtime_info_value);
 
-       if (retcode == RUNTIME_INFO_ERROR_NONE) {
+       if (retcode == RUNTIME_INFO_ERROR_NONE)
                *value = runtime_info_value.i;
-       }
 
        return retcode;
 }
@@ -390,15 +389,14 @@ int runtime_info_get_value_bool(runtime_info_key_e key, bool *value)
        runtime_info_value_u runtime_info_value;
 
        if (value == NULL) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid output param", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid output param", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        retcode = runtime_info_get_value(key, RUNTIME_INFO_DATA_TYPE_BOOL, &runtime_info_value);
 
-       if (retcode == RUNTIME_INFO_ERROR_NONE) {
+       if (retcode == RUNTIME_INFO_ERROR_NONE)
                *value = runtime_info_value.b;
-       }
 
        return retcode;
 }
@@ -409,15 +407,14 @@ int runtime_info_get_value_double(runtime_info_key_e key, double *value)
        runtime_info_value_u runtime_info_value;
 
        if (value == NULL) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid output param", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid output param", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        retcode = runtime_info_get_value(key, RUNTIME_INFO_DATA_TYPE_DOUBLE, &runtime_info_value);
 
-       if (retcode == RUNTIME_INFO_ERROR_NONE) {
+       if (retcode == RUNTIME_INFO_ERROR_NONE)
                *value = runtime_info_value.d;
-       }
 
        return retcode;
 }
@@ -428,15 +425,14 @@ int runtime_info_get_value_string(runtime_info_key_e key, char **value)
        runtime_info_value_u runtime_info_value;
 
        if (value == NULL) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid output param", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid output param", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        retcode = runtime_info_get_value(key, RUNTIME_INFO_DATA_TYPE_STRING, &runtime_info_value);
 
-       if (retcode == RUNTIME_INFO_ERROR_NONE) {
+       if (retcode == RUNTIME_INFO_ERROR_NONE)
                *value = runtime_info_value.s;
-       }
 
        return retcode;
 }
@@ -448,19 +444,19 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb
        bool subscribe_event = false;
 
        if (callback == NULL) {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x)", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x)", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        if (runtime_info_get_item(key, &runtime_info_item))     {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid key", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
        set_event_cb = runtime_info_item->set_event_cb;
 
        if (set_event_cb == NULL) {
-               LOGE("[%s] IO_ERROR(0x%08x) : failed to set callback for the runtime information", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR);
+               LOGE("IO_ERROR(0x%08x) : failed to set callback for the runtime information", RUNTIME_INFO_ERROR_IO_ERROR);
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
 
@@ -471,7 +467,7 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb
                event_subscription = malloc(sizeof(runtime_info_event_subscription_s));
 
                if (event_subscription == NULL) {
-                       LOGE("[%s] OUT_OF_MEMORY(0x%08x)", __FUNCTION__, RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
+                       LOGE("OUT_OF_MEMORY(0x%08x)", RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
                        return RUNTIME_INFO_ERROR_OUT_OF_MEMORY;
                }
 
@@ -482,17 +478,15 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb
        runtime_info_item->event_subscription->changed_cb = callback;
        runtime_info_item->event_subscription->user_data = user_data;
 
-       if (runtime_info_item->event_subscription->most_recent_value != NULL) {
+       if (runtime_info_item->event_subscription->most_recent_value != NULL)
                free(runtime_info_item->event_subscription->most_recent_value);
-       }
 
        runtime_info_item->event_subscription->most_recent_value = NULL;
 
-       if (subscribe_event == true) {
+       if (subscribe_event == true)
                return set_event_cb();
-       } else {
+       else
                return RUNTIME_INFO_ERROR_NONE;
-       }
 }
 
 int runtime_info_unset_changed_cb(runtime_info_key_e key)
@@ -501,7 +495,7 @@ int runtime_info_unset_changed_cb(runtime_info_key_e key)
        runtime_info_func_unset_event_cb unset_event_cb;
 
        if (runtime_info_get_item(key, &runtime_info_item))     {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid key", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return RUNTIME_INFO_ERROR_INVALID_PARAMETER;
        }
 
@@ -518,7 +512,7 @@ int runtime_info_unset_changed_cb(runtime_info_key_e key)
        unset_event_cb = runtime_info_item->unset_event_cb;
 
        if (unset_event_cb == NULL)     {
-               LOGE("[%s] IO_ERROR(0x%08x) : failed to unset callback for the runtime information", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR);
+               LOGE("IO_ERROR(0x%08x) : failed to unset callback for the runtime information", RUNTIME_INFO_ERROR_IO_ERROR);
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
 
@@ -535,12 +529,12 @@ void runtime_info_updated(runtime_info_key_e key)
        int retcode;
 
        if (runtime_info_get_item(key, &runtime_info_item))     {
-               LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, RUNTIME_INFO_ERROR_INVALID_PARAMETER);
+               LOGE("INVALID_PARAMETER(0x%08x) : invalid key", RUNTIME_INFO_ERROR_INVALID_PARAMETER);
                return;
        }
 
        if (runtime_info_item->event_subscription == NULL) {
-               LOGE("[%s] IO_ERROR(0x%08x) : invalid event subscription", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR);
+               LOGE("IO_ERROR(0x%08x) : invalid event subscription", RUNTIME_INFO_ERROR_IO_ERROR);
                return;
        }
 
@@ -549,19 +543,18 @@ void runtime_info_updated(runtime_info_key_e key)
        retcode = runtime_info_get_value(key, runtime_info_item->data_type, &current_value);
 
        if (retcode != RUNTIME_INFO_ERROR_NONE) {
-               LOGE("[%s] IO_ERROR(0x%08x) : failed to get the runtime information", __FUNCTION__, RUNTIME_INFO_ERROR_IO_ERROR);
+               LOGE("IO_ERROR(0x%08x) : failed to get the runtime information", RUNTIME_INFO_ERROR_IO_ERROR);
                return;
        }
 
        if (runtime_info_item->event_subscription->most_recent_value != NULL) {
-               if (!memcmp(runtime_info_item->event_subscription->most_recent_value, &current_value, sizeof(runtime_info_value_u))) {
+               if (!memcmp(runtime_info_item->event_subscription->most_recent_value, &current_value, sizeof(runtime_info_value_u)))
                        dispatch_event = false;
-               }
        } else {
                runtime_info_item->event_subscription->most_recent_value = calloc(1, sizeof(runtime_info_value_u));
 
                if (runtime_info_item->event_subscription->most_recent_value == NULL) {
-                       LOGE("[%s] OUT_OF_MEMORY(0x%08x)", __FUNCTION__, RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
+                       LOGE("OUT_OF_MEMORY(0x%08x)", RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
                        return;
                }
        }
old mode 100755 (executable)
new mode 100644 (file)
index d474428..75b964b
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 #include <stdio.h>
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 static const char *VCONF_WIFI_STATUS = VCONFKEY_WIFI_STATE;
 static const char *VCONF_BT_ENABLED = VCONFKEY_BT_STATUS;
@@ -42,14 +42,11 @@ static const char *VCONF_GPS_STATUS = VCONFKEY_LOCATION_GPS_STATE;
 int runtime_info_wifi_status_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_WIFI_STATUS, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       switch (vconf_value)
-       {
+       switch (vconf_value) {
        case VCONFKEY_WIFI_OFF:
                value->i = RUNTIME_INFO_WIFI_STATUS_DISABLED;
                break;
@@ -61,8 +58,8 @@ int runtime_info_wifi_status_get_value(runtime_info_value_h value)
        case VCONFKEY_WIFI_CONNECTED:
        case VCONFKEY_WIFI_TRANSFER:
                value->i = RUNTIME_INFO_WIFI_STATUS_CONNECTED;
-               break;  
-       
+               break;
+
        default:
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
@@ -75,7 +72,7 @@ int runtime_info_wifi_status_set_event_cb()
        return runtime_info_vconf_set_event_cb(VCONF_WIFI_STATUS, RUNTIME_INFO_KEY_WIFI_STATUS, 0);
 }
 
-void runtime_info_wifi_status_unset_event_cb ()
+void runtime_info_wifi_status_unset_event_cb()
 {
        runtime_info_vconf_unset_event_cb(VCONF_WIFI_STATUS, 0);
 }
@@ -83,14 +80,11 @@ void runtime_info_wifi_status_unset_event_cb ()
 int runtime_info_bt_enabled_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_BT_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       switch (vconf_value)
-       {
+       switch (vconf_value) {
        case VCONFKEY_BT_STATUS_OFF:
                value->b = false;
                break;
@@ -99,8 +93,8 @@ int runtime_info_bt_enabled_get_value(runtime_info_value_h value)
        case VCONFKEY_BT_STATUS_BT_VISIBLE:
        case VCONFKEY_BT_STATUS_TRANSFER:
                value->b = true;
-               break;  
-       
+               break;
+
        default:
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
@@ -113,7 +107,7 @@ int runtime_info_bt_enabled_set_event_cb()
        return runtime_info_vconf_set_event_cb(VCONF_BT_ENABLED, RUNTIME_INFO_KEY_BLUETOOTH_ENABLED, 0);
 }
 
-void runtime_info_bt_enabled_unset_event_cb ()
+void runtime_info_bt_enabled_unset_event_cb()
 {
        runtime_info_vconf_unset_event_cb(VCONF_BT_ENABLED, 0);
 }
@@ -122,11 +116,9 @@ void runtime_info_bt_enabled_unset_event_cb ()
 int runtime_info_wifi_hotspot_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_WIFI_HOTSPOT_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) ? true : false;
 
@@ -146,11 +138,9 @@ void runtime_info_wifi_hotspot_unset_event_cb()
 int runtime_info_bt_hotspot_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_BT_HOTSPOT_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_BT) ? true : false;
 
@@ -170,11 +160,9 @@ void runtime_info_bt_hotspot_unset_event_cb()
 int runtime_info_usb_hotspot_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_USB_HOTSPOT_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_USB) ? true : false;
 
@@ -194,11 +182,9 @@ void runtime_info_usb_hotspot_unset_event_cb()
 int runtime_info_packet_data_get_value(runtime_info_value_h value)
 {
        bool vconf_value;
-       
+
        if (runtime_info_vconf_get_value_bool(VCONF_PACKET_DATA_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->b = vconf_value;
 
@@ -218,11 +204,9 @@ void runtime_info_packet_data_unset_event_cb()
 int runtime_info_data_roaming_get_value(runtime_info_value_h value)
 {
        bool vconf_value;
-       
+
        if (runtime_info_vconf_get_value_bool(VCONF_DATA_ROAMING_ENABLED, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->b = vconf_value;
 
@@ -242,14 +226,11 @@ void runtime_info_data_roaming_unset_event_cb()
 int runtime_info_gps_status_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_GPS_STATUS, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       switch (vconf_value)
-       {
+       switch (vconf_value) {
        case VCONFKEY_LOCATION_GPS_OFF:
                value->i = RUNTIME_INFO_GPS_STATUS_DISABLED;
                break;
@@ -261,7 +242,7 @@ int runtime_info_gps_status_get_value(runtime_info_value_h value)
        case VCONFKEY_LOCATION_GPS_CONNECTED:
                value->i = RUNTIME_INFO_GPS_STATUS_CONNECTED;
                break;
-       
+
        default:
                return RUNTIME_INFO_ERROR_IO_ERROR;
        }
old mode 100755 (executable)
new mode 100644 (file)
index e214914..6af4be5
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 #include <stdio.h>
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 static const char *VCONF_24HOUR_FORMAT = "db/menu_widget/regionformat_time1224";
 static const char *VCONF_FIRST_DAY_OF_WEEK = "db/setting/weekofday_format";
@@ -38,14 +38,11 @@ static const char *VCONF_REGION = VCONFKEY_REGIONFORMAT;
 int runtime_info_24hour_format_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_24HOUR_FORMAT, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       switch (vconf_value)
-       {
+       switch (vconf_value) {
        case VCONFKEY_TIME_FORMAT_12:
                value->b = false;
                break;
@@ -74,14 +71,11 @@ void runtime_info_24hour_format_unset_event_cb()
 int runtime_info_first_day_of_week_get_value(runtime_info_value_h value)
 {
        int vconf_value;
-       
+
        if (runtime_info_vconf_get_value_int(VCONF_FIRST_DAY_OF_WEEK, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       switch (vconf_value)
-       {
+       switch (vconf_value) {
        case SETTING_WEEKOFDAY_FORMAT_SUNDAY:
                value->i = RUNTIME_INFO_FIRST_DAY_OF_WEEK_SUNDAY;
                break;
@@ -133,15 +127,13 @@ int runtime_info_language_get_value(runtime_info_value_h value)
        char *token = NULL;
 
        if (runtime_info_vconf_get_value_string(VCONF_LANGUAGE, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        token = strtok(vconf_value, ".");
        value->s = strdup(token);
        free(vconf_value);
        if (value->s == NULL) {
-               LOGE("[%s] OUT_OF_MEMORY(0x%08x)", __func__, RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
+               LOGE("OUT_OF_MEMORY(0x%08x)", RUNTIME_INFO_ERROR_OUT_OF_MEMORY);
                return RUNTIME_INFO_ERROR_OUT_OF_MEMORY;
        }
 
@@ -161,11 +153,9 @@ void runtime_info_language_unset_event_cb()
 int runtime_info_region_get_value(runtime_info_value_h value)
 {
        char *vconf_value;
-       
+
        if (runtime_info_vconf_get_value_string(VCONF_REGION, &vconf_value))
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        value->s = vconf_value;
 
@@ -177,7 +167,7 @@ int runtime_info_region_set_event_cb()
        return runtime_info_vconf_set_event_cb(VCONF_REGION, RUNTIME_INFO_KEY_REGION, 0);
 }
 
-void runtime_info_region_unset_event_cb ()
+void runtime_info_region_unset_event_cb()
 {
        runtime_info_vconf_unset_event_cb(VCONF_REGION, 0);
 }
old mode 100755 (executable)
new mode 100644 (file)
index 14d7aee..c041063
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 static const char *VCONF_LOCATION_SERVICE_ENABLED = VCONFKEY_LOCATION_ENABLED;
 static const char *VCONF_LOCATION_AGPS_ENABLED = "db/location/setting/AgpsEnabled";
index 27065b8..6145f66 100644 (file)
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 static const char *VCONF_FLIGHT_MODE = VCONFKEY_TELEPHONY_FLIGHT_MODE;
 static const char *VCONF_AUDIO_JACK = VCONFKEY_SYSMAN_EARJACK;
old mode 100755 (executable)
new mode 100644 (file)
index 6caea0b..f2db3ef
@@ -11,7 +11,7 @@
  * distributed under the License is distributed on an AS IS BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  * See the License for the specific language governing permissions and
- * limitations under the License. 
+ * limitations under the License.
  */
 
 #include <stdio.h>
@@ -28,7 +28,7 @@
 #undef LOG_TAG
 #endif
 
-#define LOG_TAG "TIZEN_N_RUNTIME_INFO"
+#define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 int runtime_info_vconf_get_value_int(const char *vconf_key, int *value)
 {
@@ -37,7 +37,7 @@ int runtime_info_vconf_get_value_int(const char *vconf_key, int *value)
 
 int runtime_info_vconf_get_value_bool(const char *vconf_key, bool *value)
 {
-       return vconf_get_bool(vconf_key, (int*)value);
+       return vconf_get_bool(vconf_key, (int *)value);
 }
 
 int runtime_info_vconf_get_value_double(const char *vconf_key, double *value)
@@ -50,14 +50,11 @@ int runtime_info_vconf_get_value_string(const char *vconf_key, char **value)
        char *str_value = NULL;
 
        str_value = vconf_get_str(vconf_key);
-               
-       if (str_value != NULL)
-       {
+
+       if (str_value != NULL) {
                *value = str_value;
                return 0;
-       }
-       else
-       {
+       } else {
                return -1;
        }
 }
@@ -67,47 +64,36 @@ typedef void (*runtime_info_vconf_event_cb)(keynode_t *node, void *event_data);
 static void runtime_info_vconf_event_cb0(keynode_t *node, void *event_data)
 {
        if (node != NULL)
-       {
                runtime_info_updated((runtime_info_key_e)event_data);
-       }               
 }
 
 static void runtime_info_vconf_event_cb1(keynode_t *node, void *event_data)
 {
        if (node != NULL)
-       {
                runtime_info_updated((runtime_info_key_e)event_data);
-       }               
 }
 
 static void runtime_info_vconf_event_cb2(keynode_t *node, void *event_data)
 {
        if (node != NULL)
-       {
                runtime_info_updated((runtime_info_key_e)event_data);
-       }               
 }
 
 static void runtime_info_vconf_event_cb3(keynode_t *node, void *event_data)
 {
        if (node != NULL)
-       {
                runtime_info_updated((runtime_info_key_e)event_data);
-       }               
 }
 
 static void runtime_info_vconf_event_cb4(keynode_t *node, void *event_data)
 {
        if (node != NULL)
-       {
                runtime_info_updated((runtime_info_key_e)event_data);
-       }               
 }
 
 static runtime_info_vconf_event_cb runtime_info_vconf_get_event_cb_slot(int slot)
 {
-       switch (slot)
-       {
+       switch (slot) {
        case 0:
                return runtime_info_vconf_event_cb0;
 
@@ -128,34 +114,27 @@ static runtime_info_vconf_event_cb runtime_info_vconf_get_event_cb_slot(int slot
        }
 }
 
-int runtime_info_vconf_set_event_cb (const char *vconf_key, runtime_info_key_e runtime_info_key, int slot)
+int runtime_info_vconf_set_event_cb(const char *vconf_key, runtime_info_key_e runtime_info_key, int slot)
 {
        runtime_info_vconf_event_cb vconf_event_cb;
 
        vconf_event_cb = runtime_info_vconf_get_event_cb_slot(slot);
 
        if (vconf_event_cb == NULL)
-       {
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
-       if (vconf_notify_key_changed(vconf_key, vconf_event_cb, (void*)runtime_info_key))
-       {
+       if (vconf_notify_key_changed(vconf_key, vconf_event_cb, (void *)runtime_info_key))
                return RUNTIME_INFO_ERROR_IO_ERROR;
-       }
 
        return RUNTIME_INFO_ERROR_NONE;
 }
 
-void runtime_info_vconf_unset_event_cb (const char *vconf_key, int slot)
+void runtime_info_vconf_unset_event_cb(const char *vconf_key, int slot)
 {
        runtime_info_vconf_event_cb vconf_event_cb;
 
        vconf_event_cb = runtime_info_vconf_get_event_cb_slot(slot);
 
        if (vconf_event_cb != NULL)
-       {
                vconf_ignore_key_changed(vconf_key, vconf_event_cb);
-       }
 }
-