[rygel] Remove all xbox-related stuff



commit 328dfcdfa3932db5e78656c716713262788081a4
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Wed Apr 29 23:00:11 2009 +0300

    Remove all xbox-related stuff
    
    It doesn't work anyway and we better concentrate on implementing standard
    stuff that it at least worthy of being called "UPnP".
---
 data/xml/Makefile.am                          |    4 +-
 data/xml/X_MS_MediaReceiverRegistrar1.xml     |   97 -------------------------
 data/xml/description-xbox360.xml              |   25 -------
 src/rygel/Makefile.am                         |    3 -
 src/rygel/rygel-configuration.vala            |   10 ---
 src/rygel/rygel-media-receiver-registrar.vala |   59 ---------------
 src/rygel/rygel-media-server-factory.vala     |   31 +--------
 src/rygel/rygel-plugin.vala                   |    8 --
 8 files changed, 2 insertions(+), 235 deletions(-)

diff --git a/data/xml/Makefile.am b/data/xml/Makefile.am
index d47d7b4..09349cc 100644
--- a/data/xml/Makefile.am
+++ b/data/xml/Makefile.am
@@ -1,8 +1,6 @@
 xml_DATA = description.xml \
 	   ContentDirectory.xml \
-	   ConnectionManager.xml \
-	   X_MS_MediaReceiverRegistrar1.xml \
-	   description-xbox360.xml
+	   ConnectionManager.xml
 
 xmldir = $(datadir)/rygel/xml
 
diff --git a/data/xml/X_MS_MediaReceiverRegistrar1.xml b/data/xml/X_MS_MediaReceiverRegistrar1.xml
deleted file mode 100644
index cf2e939..0000000
--- a/data/xml/X_MS_MediaReceiverRegistrar1.xml
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0"?>
-<scpd xmlns="urn:schemas-upnp-org:service-1-0">
-    <specVersion>
-        <major>1</major>
-        <minor>0</minor>
-    </specVersion>
-    <actionList>
-        <action>
-            <name>IsAuthorized</name>
-            <argumentList>
-                <argument>
-                    <name>DeviceID</name>
-                    <direction>in</direction>
-                    <relatedStateVariable>A_ARG_TYPE_DeviceID</relatedStateVariable>
-                </argument>
-                <argument>
-                    <name>Result</name>
-                    <direction>out</direction>
-                    <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
-                </argument>
-            </argumentList>
-        </action>
-        <action>
-            <name>RegisterDevice</name>
-            <argumentList>
-                <argument>
-                    <name>RegistrationReqMsg</name>
-                    <direction>in</direction>
-                    <relatedStateVariable>A_ARG_TYPE_RegistrationReqMsg</relatedStateVariable>
-                </argument>
-                <argument>
-                    <name>RegistrationRespMsg</name>
-                    <direction>out</direction>
-                    <relatedStateVariable>A_ARG_TYPE_RegistrationRespMsg</relatedStateVariable>
-                </argument>
-            </argumentList>
-        </action>
-        <action>
-            <name>IsValidated</name>
-            <argumentList>
-                <argument>
-                    <name>DeviceID</name>
-                    <direction>in</direction>
-                    <relatedStateVariable>A_ARG_TYPE_DeviceID</relatedStateVariable>
-                </argument>
-                <argument>
-                    <name>Result</name>
-                    <direction>out</direction>
-                    <relatedStateVariable>A_ARG_TYPE_Result</relatedStateVariable>
-                </argument>
-            </argumentList>
-        </action>
-    </actionList>
-    <serviceStateTable>
-        <stateVariable>
-            <name>A_ARG_TYPE_DeviceID</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>string</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>A_ARG_TYPE_Result</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>int</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>A_ARG_TYPE_RegistrationReqMsg</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>bin.base64</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>A_ARG_TYPE_RegistrationRespMsg</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>bin.base64</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>AuthorizationGrantedUpdateID</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>ui4</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>AuthorizationDeniedUpdateID</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>ui4</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>ValidationSucceededUpdateID</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>ui4</dataType>
-        </stateVariable>
-        <stateVariable>
-            <name>ValidationRevokedUpdateID</name>
-            <sendEventsAttribute>no</sendEventsAttribute>
-            <dataType>ui4</dataType>
-        </stateVariable>
-    </serviceStateTable>
-</scpd>
-
diff --git a/data/xml/description-xbox360.xml b/data/xml/description-xbox360.xml
deleted file mode 100644
index f59ba3e..0000000
--- a/data/xml/description-xbox360.xml
+++ /dev/null
@@ -1,25 +0,0 @@
-<root xmlns="urn:schemas-upnp-org:device-1-0" xmlns:dlna="urn:schemas-dlna-org:device-1-0">
-<specVersion>
-<major>1</major>
-<minor>0</minor>
-</specVersion>
-<device>
-<deviceType>urn:schemas-upnp-org:device:MediaServer:1</deviceType>
-<UDN></UDN>
-<friendlyName></friendlyName>
-<manufacturer>Rygel Developers.</manufacturer>
-<manufacturerURL>http://live.gnome.org/Rygel</manufacturerURL>
-<modelName>Windows Media Connect</modelName>
-<modelNumber>0.1</modelNumber>
-<modelDescription></modelDescription>
-<serialNumber>0000001</serialNumber>
-<UPC></UPC>
-<presentationURL></presentationURL>
-<serviceList>
-</serviceList>
-<dlna:X_DLNADOC>DMS-1.50</dlna:X_DLNADOC>
-<dlna:X_DLNADOC>M-DMS-1.50</dlna:X_DLNADOC>
-<dlna:X_DLNACAP></dlna:X_DLNACAP>
-</device>
-</root>
-
diff --git a/src/rygel/Makefile.am b/src/rygel/Makefile.am
index 424f591..1ce2d3d 100644
--- a/src/rygel/Makefile.am
+++ b/src/rygel/Makefile.am
@@ -45,7 +45,6 @@ BUILT_SOURCES = rygel-1.0.vapi \
 		rygel-resource-info.c \
 		rygel-icon-info.c \
 		rygel-connection-manager.c \
-		rygel-media-receiver-registrar.c \
 		rygel-media-object.c \
 		rygel-media-container.c \
 		rygel-simple-async-result.c \
@@ -75,7 +74,6 @@ rygel_SOURCES = $(VAPI_SOURCE_FILES) \
 		rygel-resource-info.c \
 		rygel-icon-info.c \
 		rygel-connection-manager.c \
-		rygel-media-receiver-registrar.c \
 		rygel-media-object.c \
 		rygel-media-container.c \
 		rygel-simple-async-result.c \
@@ -111,7 +109,6 @@ VAPI_FILES = rygel-1.0.vapi
 VAPI_SOURCE_FILES = rygel-configuration.vala \
 		    rygel-content-directory.vala \
 		    rygel-connection-manager.vala \
-		    rygel-media-receiver-registrar.vala \
 		    rygel-transcode-manager.vala \
 		    rygel-http-server.vala \
 		    rygel-state-machine.vala \
diff --git a/src/rygel/rygel-configuration.vala b/src/rygel/rygel-configuration.vala
index 80337ba..a0213fa 100644
--- a/src/rygel/rygel-configuration.vala
+++ b/src/rygel/rygel-configuration.vala
@@ -32,7 +32,6 @@ public class Rygel.Configuration {
     protected static const string ROOT_GCONF_PATH = "/apps/rygel/";
     protected static const string IP_KEY = "host-ip";
     protected static const string PORT_KEY = "port";
-    protected static const string XBOX_KEY = "enable-xbox";
     protected static const string ENABLED_KEY = "enabled";
     protected static const string TITLE_KEY = "title";
     protected static const string UDN_KEY = "UDN";
@@ -45,15 +44,6 @@ public class Rygel.Configuration {
 
     protected GConf.Client gconf;
 
-    public bool enable_xbox {
-        get {
-            return this.get_bool ("general", XBOX_KEY, false);
-        }
-        set {
-            this.set_bool ("general", XBOX_KEY, value);
-        }
-    }
-
     private string _host_ip;
     public string host_ip {
         get {
diff --git a/src/rygel/rygel-media-receiver-registrar.vala b/src/rygel/rygel-media-receiver-registrar.vala
deleted file mode 100644
index 974b2f9..0000000
--- a/src/rygel/rygel-media-receiver-registrar.vala
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2008 Zeeshan Ali <zeenix gmail com>.
- *
- * Author: Zeeshan Ali <zeenix gmail com>
- *
- * This file is part of Rygel.
- *
- * Rygel is free software; you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Rygel is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-using GUPnP;
-
-/**
- * Basic implementation of MS MediaReceiverRegistrar service version 1.
- */
-public class Rygel.MediaReceiverRegistrar: Service {
-    public const string UPNP_ID =
-                    "urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar";
-    public const string UPNP_TYPE =
-                    "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1";
-    public const string DESCRIPTION_PATH =
-                    "xml/X_MS_MediaReceiverRegistrar1.xml";
-
-    public override void constructed () {
-        this.action_invoked["IsAuthorized"] += this.is_authorized_cb;
-        this.action_invoked["IsValidated"] += this.is_authorized_cb;
-        this.action_invoked["RegisterDevice"] += this.register_device_cb;
-    }
-
-    /* IsAuthorized and IsValided action implementations (fake) */
-    private void is_authorized_cb (MediaReceiverRegistrar registrar,
-                                   owned ServiceAction    action) {
-        action.set ("Result", typeof (int), 1);
-
-        action.return ();
-    }
-
-    private void register_device_cb (MediaReceiverRegistrar registrar,
-                                     owned ServiceAction    action) {
-        action.set ("RegistrationRespMsg",
-                    typeof (string),
-                    "WhatisSupposedToBeHere");
-
-        action.return ();
-    }
-}
-
diff --git a/src/rygel/rygel-media-server-factory.vala b/src/rygel/rygel-media-server-factory.vala
index f216043..058b2bf 100644
--- a/src/rygel/rygel-media-server-factory.vala
+++ b/src/rygel/rygel-media-server-factory.vala
@@ -37,7 +37,6 @@ public errordomain MediaServerFactoryError {
  */
 public class Rygel.MediaServerFactory {
     public static const string DESC_DOC = "xml/description.xml";
-    public static const string XBOX_DESC_DOC = "xml/description-xbox360.xml";
     public static const string DESC_PREFIX = "Rygel";
 
     private Configuration config;
@@ -77,14 +76,7 @@ public class Rygel.MediaServerFactory {
 
     private Xml.Doc * create_desc (Plugin plugin,
                                    string desc_path) throws GLib.Error {
-        string orig_desc_path;
-
-        if (this.config.enable_xbox)
-            /* Use Xbox 360 specific description */
-            orig_desc_path = Path.build_filename (BuildConfig.DATA_DIR,
-                                                  XBOX_DESC_DOC);
-        else
-            orig_desc_path = Path.build_filename (BuildConfig.DATA_DIR,
+        var orig_desc_path = Path.build_filename (BuildConfig.DATA_DIR,
                                                   DESC_DOC);
 
         Xml.Doc *doc = Xml.Parser.parse_file (orig_desc_path);
@@ -97,10 +89,6 @@ public class Rygel.MediaServerFactory {
         /* Modify description to include Plugin-specific stuff */
         this.prepare_desc_for_plugin (doc, plugin);
 
-        if (this.config.enable_xbox)
-            /* Put/Set XboX specific stuff to description */
-            add_xbox_specifics (doc);
-
         save_modified_desc (doc, desc_path);
 
         return doc;
@@ -117,23 +105,6 @@ public class Rygel.MediaServerFactory {
         return context;
     }
 
-    private void add_xbox_specifics (Xml.Doc doc) {
-        Xml.Node *element;
-
-        element = Utils.get_xml_element ((Xml.Node *) doc,
-                                         "root",
-                                         "device",
-                                         "friendlyName");
-        /* friendlyName */
-        if (element == null) {
-            warning ("Element /root/device/friendlyName not found.");
-
-            return;
-        }
-
-        element->add_content (": 1 : Windows Media Connect");
-    }
-
     private void prepare_desc_for_plugin (Xml.Doc doc, Plugin plugin) {
         Xml.Node *device_element;
 
diff --git a/src/rygel/rygel-plugin.vala b/src/rygel/rygel-plugin.vala
index 855fe45..9a9412e 100644
--- a/src/rygel/rygel-plugin.vala
+++ b/src/rygel/rygel-plugin.vala
@@ -47,14 +47,6 @@ public class Rygel.Plugin : GUPnP.ResourceFactory {
                                  ConnectionManager.DESCRIPTION_PATH,
                                  typeof (ConnectionManager));
         this.add_resource (resource_info);
-
-        /* Register Rygel.MediaReceiverRegistrar */
-        resource_info = new ResourceInfo
-                                (MediaReceiverRegistrar.UPNP_ID,
-                                 MediaReceiverRegistrar.UPNP_TYPE,
-                                 MediaReceiverRegistrar.DESCRIPTION_PATH,
-                                 typeof (MediaReceiverRegistrar));
-        this.add_resource (resource_info);
     }
 
     public void add_resource (ResourceInfo resource_info) {



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