rygel r287 - in trunk: . src/media-providers/tracker src/media-server



Author: zeeshanak
Date: Tue Nov 11 18:10:05 2008
New Revision: 287
URL: http://svn.gnome.org/viewvc/rygel?rev=287&view=rev

Log:
Avoid using 'construct' now that we have flexible construction methods.

Modified:
   trunk/ChangeLog
   trunk/src/media-providers/tracker/rygel-media-tracker.vala
   trunk/src/media-server/rygel-media-manager.vala
   trunk/src/media-server/rygel-media-server.vala
   trunk/src/media-server/rygel-metadata-extractor.vala

Modified: trunk/src/media-providers/tracker/rygel-media-tracker.vala
==============================================================================
--- trunk/src/media-providers/tracker/rygel-media-tracker.vala	(original)
+++ trunk/src/media-providers/tracker/rygel-media-tracker.vala	Tue Nov 11 18:10:05 2008
@@ -36,7 +36,10 @@
 
     private SearchCriteriaParser search_parser;
 
-    construct {
+    /* Pubic methods */
+    public MediaTracker (string        root_id,
+                         string        root_parent_id,
+                         GUPnP.Context context) {
         this.containers = new List<TrackerContainer> ();
         this.containers.append
                         (new TrackerContainer (this.root_id + ":" + "16",
@@ -74,12 +77,6 @@
 
         /* Host the home dir of the user */
         this.context.host_path (home_dir, home_dir);
-    }
-
-    /* Pubic methods */
-    public MediaTracker (string        root_id,
-                         string        root_parent_id,
-                         GUPnP.Context context) {
         this.root_id = root_id;
         this.root_parent_id = root_parent_id;
         this.title = "Tracker";

Modified: trunk/src/media-server/rygel-media-manager.vala
==============================================================================
--- trunk/src/media-server/rygel-media-manager.vala	(original)
+++ trunk/src/media-server/rygel-media-manager.vala	Tue Nov 11 18:10:05 2008
@@ -45,7 +45,13 @@
                                      string        root_parent_id,
                                      GUPnP.Context context);
 
-    construct {
+    /* Pubic methods */
+    public MediaManager (GUPnP.Context context) {
+        this.root_id = "0";
+        this.root_parent_id = "-1";
+        this.title = "Media Manager";
+        this.context = context;
+
         this.providers = new HashTable<string, MediaProvider>
                                 ((HashFunc) id_hash_func,
                                  (EqualFunc) is_root_equal);
@@ -61,14 +67,6 @@
         this.register_media_providers ();
     }
 
-    /* Pubic methods */
-    public MediaManager (GUPnP.Context context) {
-        this.root_id = "0";
-        this.root_parent_id = "-1";
-        this.title = "Media Manager";
-        this.context = context;
-    }
-
     public override void add_children_metadata
                             (DIDLLiteWriter didl_writer,
                              string         container_id,

Modified: trunk/src/media-server/rygel-media-server.vala
==============================================================================
--- trunk/src/media-server/rygel-media-server.vala	(original)
+++ trunk/src/media-server/rygel-media-server.vala	Tue Nov 11 18:10:05 2008
@@ -45,7 +45,15 @@
     private ConnectionManager cm;         /* ConnectionManager */
     private MediaReceiverRegistrar msr;   /* MS MediaReceiverRegistrar */
 
-    construct {
+    public MediaServer (GUPnP.Context context,
+                        Xml.Doc       description_doc,
+                        string        relative_location) {
+        this.context = context;
+        this.resource_factory = GUPnP.ResourceFactory.get_default ();
+        this.root_device = null;
+        this.description_doc = description_doc;
+        this.relative_location = relative_location;
+
         ResourceFactory factory = this.resource_factory;
 
         /* Register Rygel.ContentDirectory */
@@ -73,16 +81,6 @@
                                                 (MEDIA_RECEIVER_REGISTRAR);
     }
 
-    public MediaServer (GUPnP.Context context,
-                        Xml.Doc       description_doc,
-                        string        relative_location) {
-        this.context = context;
-        this.resource_factory = GUPnP.ResourceFactory.get_default ();
-        this.root_device = null;
-        this.description_doc = description_doc;
-        this.relative_location = relative_location;
-    }
-
     public static int main (string[] args) {
         MediaServer server;
         MainLoop main_loop;

Modified: trunk/src/media-server/rygel-metadata-extractor.vala
==============================================================================
--- trunk/src/media-server/rygel-metadata-extractor.vala	(original)
+++ trunk/src/media-server/rygel-metadata-extractor.vala	Tue Nov 11 18:10:05 2008
@@ -81,7 +81,7 @@
         }
     }
 
-    construct {
+    public MetadataExtractor () {
         this.playbin = ElementFactory.make ("playbin", null);
 
         var bus = this.playbin.get_bus ();



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