configuration: Rename configuration to setting
authorSamuel Ortiz <sameo@linux.intel.com>
Mon, 4 Apr 2011 18:49:25 +0000 (20:49 +0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 4 Apr 2011 18:49:25 +0000 (20:49 +0200)
Makefile.am
include/setting.h [moved from include/configuration.h with 83% similarity]
src/connman.h
src/device.c
src/main.c

index 52c0984..b4f3511 100644 (file)
@@ -17,7 +17,7 @@ noinst_HEADERS = include/driver.h include/element.h include/property.h \
                        include/profile.h include/provider.h \
                        include/utsname.h include/timeserver.h include/proxy.h \
                        include/location.h include/technology.h \
-                       include/configuration.h
+                       include/setting.h
 
 local_headers = $(foreach file,$(include_HEADERS) $(nodist_include_HEADERS) \
                        $(noinst_HEADERS), include/connman/$(notdir $(file)))
similarity index 83%
rename from include/configuration.h
rename to include/setting.h
index 836fea9..78adad7 100644 (file)
  *
  */
 
-#ifndef __CONNMAN_CONFIGURATION_H
-#define __CONNMAN_CONFIGURATION_H
+#ifndef __CONNMAN_SETTING_H
+#define __CONNMAN_SETTING_H
 
 #ifdef __cplusplus
 extern "C" {
 #endif
 
-connman_bool_t connman_configuration_get_bool(const char *key);
+connman_bool_t connman_setting_get_bool(const char *key);
 
 #ifdef __cplusplus
 }
 #endif
 
-#endif /* __CONNMAN_CONFIGURATION_H */
+#endif /* __CONNMAN_SETTING_H */
index 379eec0..76b816b 100644 (file)
@@ -93,7 +93,7 @@ void __connman_debug_list_enabled(DBusMessageIter *iter, void *user_data);
 
 #include <connman/option.h>
 
-#include <connman/configuration.h>
+#include <connman/setting.h>
 
 #include <connman/plugin.h>
 
index 72b8656..ed0eaf2 100644 (file)
@@ -472,7 +472,7 @@ struct connman_device *connman_device_create(const char *node,
 
        DBG("device %p", device);
 
-       bg_scan = connman_configuration_get_bool("BackgroundScanning");
+       bg_scan = connman_setting_get_bool("BackgroundScanning");
 
        __connman_element_initialize(&device->element);
 
index 9f7c7d2..18b6bc3 100644 (file)
 
 #include "connman.h"
 
-struct connman_conf {
+static struct {
        connman_bool_t bg_scan;
-};
-
-static struct connman_conf main_conf = {
+} connman_settings  = {
        .bg_scan = TRUE,
 };
 
@@ -80,7 +78,7 @@ static void parse_config(GKeyFile *config)
        boolean = g_key_file_get_boolean(config, "General",
                                                "BackgroundScanning", &error);
        if (error == NULL)
-               main_conf.bg_scan = boolean;
+               connman_settings.bg_scan = boolean;
 
        g_clear_error(&error);
 }
@@ -162,10 +160,10 @@ const char *connman_option_get_string(const char *key)
        return NULL;
 }
 
-connman_bool_t connman_configuration_get_bool(const char *key)
+connman_bool_t connman_setting_get_bool(const char *key)
 {
        if (g_str_equal(key, "BackgroundScanning") == TRUE)
-               return main_conf.bg_scan;
+               return connman_settings.bg_scan;
 
        return FALSE;
 }