ContentDirectory.xml \
ConnectionManager.xml \
AVTransport2.xml \
- RenderingControl2.xml
+ RenderingControl2.xml \
+ X_MS_MediaReceiverRegistrar1.xml
xmldir = $(datadir)/rygel/xml
--- /dev/null
+<?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>
rygel-metadata-extractor.vala \
rygel-media-db-container.vala \
rygel-media-db-object-factory.vala \
+ rygel-media-receiver-registrar.vala \
rygel-log-handler.vala
rygel_VALAFLAGS = \
--- /dev/null
+/*
+ * 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 ();
+ }
+}
ConnectionManager.UPNP_TYPE,
ConnectionManager.DESCRIPTION_PATH,
typeof (SourceConnectionManager));
+
+ this.add_resource (resource_info);
+ resource_info = new ResourceInfo (MediaReceiverRegistrar.UPNP_ID,
+ MediaReceiverRegistrar.UPNP_TYPE,
+ MediaReceiverRegistrar.DESCRIPTION_PATH,
+ typeof (MediaReceiverRegistrar));
this.add_resource (resource_info);
}