Enable the ConnectionManager service.
authorZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 3 Jul 2008 21:52:48 +0000 (21:52 +0000)
committerZeeshan Ali (Khattak) <zeeshanak@src.gnome.org>
Thu, 3 Jul 2008 21:52:48 +0000 (21:52 +0000)
svn path=/trunk/; revision=204

ChangeLog
data/xml/Makefile.am
data/xml/description.xml
src/gupnp-media-server.vala

index aee4eea..e780858 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
 2008-07-04  Zeeshan Ali Khattak  <zeenix@gmail.com>
 
+       * data/xml/Makefile.am:
+       * data/xml/description.xml:
+       * src/gupnp-media-server.vala:
+
+       Enable the ConnectionManager service.
+
+2008-07-04  Zeeshan Ali Khattak  <zeenix@gmail.com>
+
        * src/Makefile.am:
        * src/gupnp-connection-manager.vala:
 
index c23d325..548c0e5 100644 (file)
@@ -1,5 +1,6 @@
 xml_DATA = description.xml \
           ContentDirectory.xml \
+          ConnectionManager.xml \
           X_MS_MediaReceiverRegistrar1.xml \
           description-xbox360.xml
 
index a5c2b4b..262710d 100644 (file)
@@ -23,8 +23,6 @@
 <eventSubURL>/ContentDirectory/Event</eventSubURL>
 <controlURL>/ContentDirectory/Control</controlURL>
 </service>
-<!-- FIXME: Implement the service, uncomment these lines and enable the
-            distribution of the SCPD in the build.
 <service>
 <serviceType>urn:schemas-upnp-org:service:ConnectionManager:2</serviceType>
 <serviceId>urn:upnp-org:serviceId:ConnectionManager</serviceId>
@@ -32,7 +30,6 @@
 <eventSubURL>/ConnectionManager/Event</eventSubURL>
 <controlURL>/ConnectionManager/Control</controlURL>
 </service>
--->
 <service>
 <serviceType>urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1</serviceType>
 <serviceId>urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar</serviceId>
index 3f62d10..309c8fa 100644 (file)
@@ -31,6 +31,8 @@ using CStuff;
 public class GUPnP.MediaServer: RootDevice {
     public static const string CONTENT_DIR =
                         "urn:schemas-upnp-org:service:ContentDirectory";
+    public static const string CONNECTION_MANAGER =
+                        "urn:schemas-upnp-org:service:ConnectionManager";
     public static const string MEDIA_RECEIVER_REGISTRAR =
                         "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar";
 
@@ -40,7 +42,8 @@ public class GUPnP.MediaServer: RootDevice {
     public static const string GCONF_PATH = "/apps/gupnp-media-server/";
 
     private ContentDirectory content_dir; /* ContentDirectory */
-    private MediaReceiverRegistrar msr;  /* MS MediaReceiverRegistrar */
+    private ConnectionManager cm;         /* ConnectionManager */
+    private MediaReceiverRegistrar msr;   /* MS MediaReceiverRegistrar */
 
     construct {
         ResourceFactory factory = this.resource_factory;
@@ -51,6 +54,12 @@ public class GUPnP.MediaServer: RootDevice {
         factory.register_resource_type (CONTENT_DIR + ":2",
                                         typeof (ContentDirectory));
 
+        /* Register GUPnP.ConnectionManager */
+        factory.register_resource_type (CONNECTION_MANAGER + ":1",
+                                        typeof (ConnectionManager));
+        factory.register_resource_type (CONNECTION_MANAGER + ":2",
+                                        typeof (ConnectionManager));
+
         /* Register GUPnP.MediaReceiverRegistrar */
         factory.register_resource_type (MEDIA_RECEIVER_REGISTRAR + ":1",
                                         typeof (MediaReceiverRegistrar));
@@ -59,6 +68,7 @@ public class GUPnP.MediaServer: RootDevice {
 
         /* Now create the sevice objects */
         this.content_dir = (ContentDirectory) this.get_service (CONTENT_DIR);
+        this.cm = (ConnectionManager) this.get_service (CONNECTION_MANAGER);
         this.msr = (MediaReceiverRegistrar) this.get_service
                                                 (MEDIA_RECEIVER_REGISTRAR);
     }