[rygel/config] Rename Configuration to ConfigReader.



commit 3a4546d7f7b81525f1c98555c85ced454235e971
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Tue Apr 21 16:08:58 2009 +0300

    Rename Configuration to ConfigReader.
---
 src/rygel/Makefile.am                              |    6 +++---
 ...configuration.vala => rygel-config-reader.vala} |    6 +++---
 src/rygel/rygel-media-server-factory.vala          |   16 ++++++++--------
 src/ui/rygel-preferences.vala                      |    8 ++++----
 4 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/src/rygel/Makefile.am b/src/rygel/Makefile.am
index 424f591..8f0f3d4 100644
--- a/src/rygel/Makefile.am
+++ b/src/rygel/Makefile.am
@@ -28,7 +28,7 @@ BUILT_SOURCES = rygel-1.0.vapi \
 		rygel.h \
 		rygel-media-server.c \
 		rygel-media-server-factory.c \
-		rygel-configuration.c \
+		rygel-config-reader.c \
 		rygel-main.c \
 		rygel-content-directory.c \
 		rygel-browse.c \
@@ -108,7 +108,7 @@ rygel_LDFLAGS = -export-dynamic
 
 VAPI_FILES = rygel-1.0.vapi
 
-VAPI_SOURCE_FILES = rygel-configuration.vala \
+VAPI_SOURCE_FILES = rygel-config-reader.vala \
 		    rygel-content-directory.vala \
 		    rygel-connection-manager.vala \
 		    rygel-media-receiver-registrar.vala \
@@ -145,7 +145,7 @@ rygel-1.0.vapi: $(VAPI_SOURCE_FILES)
 
 noinst_LIBRARIES = librygel-configuration.a
 
-librygel_configuration_a_SOURCES = rygel-configuration.c \
+librygel_configuration_a_SOURCES = rygel-config-reader.c \
 				   cstuff.c \
                                    cstuff.h
 
diff --git a/src/rygel/rygel-configuration.vala b/src/rygel/rygel-config-reader.vala
similarity index 95%
rename from src/rygel/rygel-configuration.vala
rename to src/rygel/rygel-config-reader.vala
index 76d5b95..99b2944 100644
--- a/src/rygel/rygel-configuration.vala
+++ b/src/rygel/rygel-config-reader.vala
@@ -26,9 +26,9 @@ using GConf;
 using CStuff;
 
 /**
- * User configuration for Rygel.
+ * Reads the user configuration for Rygel.
  */
-public class Rygel.Configuration {
+public class Rygel.ConfigReader {
     private static const string ROOT_GCONF_PATH = "/apps/rygel/";
 
     private GConf.Client gconf;
@@ -37,7 +37,7 @@ public class Rygel.Configuration {
     public string host_ip;
     public int port;
 
-    public Configuration () {
+    public ConfigReader () {
         this.gconf = GConf.Client.get_default ();
 
         try {
diff --git a/src/rygel/rygel-media-server-factory.vala b/src/rygel/rygel-media-server-factory.vala
index 1468eec..b1f93c6 100644
--- a/src/rygel/rygel-media-server-factory.vala
+++ b/src/rygel/rygel-media-server-factory.vala
@@ -39,11 +39,11 @@ public class Rygel.MediaServerFactory {
     public static const string XBOX_DESC_DOC = "xml/description-xbox360.xml";
     public static const string DESC_PREFIX = "Rygel";
 
-    private Configuration config;
+    private ConfigReader config_reader;
     private GUPnP.Context context;
 
     public MediaServerFactory () throws GLib.Error {
-        this.config = new Configuration ();
+        this.config_reader = new ConfigReader ();
 
         /* Set up GUPnP context */
         this.context = create_upnp_context ();
@@ -73,7 +73,7 @@ public class Rygel.MediaServerFactory {
                                    string desc_path) throws GLib.Error {
         string orig_desc_path;
 
-        if (this.config.enable_xbox)
+        if (this.config_reader.enable_xbox)
             /* Use Xbox 360 specific description */
             orig_desc_path = Path.build_filename (BuildConfig.DATA_DIR,
                                                   XBOX_DESC_DOC);
@@ -91,7 +91,7 @@ public class Rygel.MediaServerFactory {
         /* Modify description to include Plugin-specific stuff */
         this.prepare_desc_for_plugin (doc, plugin);
 
-        if (this.config.enable_xbox)
+        if (this.config_reader.enable_xbox)
             /* Put/Set XboX specific stuff to description */
             add_xbox_specifics (doc);
 
@@ -102,8 +102,8 @@ public class Rygel.MediaServerFactory {
 
     private GUPnP.Context create_upnp_context () throws GLib.Error {
         GUPnP.Context context = new GUPnP.Context (null,
-                                                   this.config.host_ip,
-                                                   this.config.port);
+                                                   this.config_reader.host_ip,
+                                                   this.config_reader.port);
 
         /* Host UPnP dir */
         context.host_path (BuildConfig.DATA_DIR, "");
@@ -167,7 +167,7 @@ public class Rygel.MediaServerFactory {
             return;
         }
 
-        element->set_content (this.config.get_title (plugin_name));
+        element->set_content (this.config_reader.get_title (plugin_name));
 
         /* UDN */
         element = Utils.get_xml_element (device_element, "UDN");
@@ -177,7 +177,7 @@ public class Rygel.MediaServerFactory {
             return;
         }
 
-        element->set_content (this.config.get_udn (plugin_name));
+        element->set_content (this.config_reader.get_udn (plugin_name));
     }
 
     private void add_services_to_desc (Xml.Node *device_element,
diff --git a/src/ui/rygel-preferences.vala b/src/ui/rygel-preferences.vala
index 78d3864..ff3b9e8 100644
--- a/src/ui/rygel-preferences.vala
+++ b/src/ui/rygel-preferences.vala
@@ -26,18 +26,18 @@ public class Rygel.Preferences : Dialog {
     public Preferences () {
         this.title = "Rygel Preferences";
 
-        var config = new Rygel.Configuration ();
+        var config_reader = new Rygel.ConfigReader ();
 
         this.add_string_pref ("IP",
-                              config.host_ip,
+                              config_reader.host_ip,
                               "The IP to advertise the UPnP MediaServer on");
         this.add_int_pref ("Port",
-                           config.port,
+                           config_reader.port,
                            uint16.MIN,
                            uint16.MAX,
                            "The port to advertise the UPnP MediaServer on");
         this.add_boolean_pref ("XBox support",
-                               config.enable_xbox,
+                               config_reader.enable_xbox,
                                "Enable Xbox support");
 
         this.add_button (STOCK_OK, ResponseType.ACCEPT);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]