Binary files /tmp/gmediaserver-0.9.0/src/.contentdir.c.swp and ./src/.contentdir.c.swp differ diff -Nru /tmp/gmediaserver-0.9.0/src/gmediaserver.h ./src/gmediaserver.h --- /tmp/gmediaserver-0.9.0/src/gmediaserver.h 2005-10-10 08:10:37.000000000 +0200 +++ ./src/gmediaserver.h 2006-01-06 20:03:16.000000000 +0100 @@ -257,6 +257,13 @@ extern ServiceAction connectmgr_service_actions[]; extern ServiceVariable connectmgr_service_variables[]; +/* mediarecreg.c */ +#define MEDIARECREG_SERVICE_ID "urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar" +extern ServiceAction mediarecreg_service_actions[]; +extern ServiceVariable mediarecreg_service_variables[]; + + + /* url.c */ void sgmlescape(const char *str, char *target, uint32_t *length); char *xsgmlescape(const char *str); Binary files /tmp/gmediaserver-0.9.0/src/.gmediaserver.h.swp and ./src/.gmediaserver.h.swp differ diff -Nru /tmp/gmediaserver-0.9.0/src/Makefile.in ./src/Makefile.in --- /tmp/gmediaserver-0.9.0/src/Makefile.in 2005-12-13 21:50:45.000000000 +0100 +++ ./src/Makefile.in 2006-01-06 18:01:56.000000000 +0100 @@ -83,7 +83,7 @@ am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) -am_gmediaserver_OBJECTS = connectmgr.$(OBJEXT) contentdir.$(OBJEXT) \ +am_gmediaserver_OBJECTS = connectmgr.$(OBJEXT) contentdir.$(OBJEXT) mediarecreg.${OBJEXT} \ interface.$(OBJEXT) logging.$(OBJEXT) upnp.$(OBJEXT) \ webserver.$(OBJEXT) webclient.$(OBJEXT) main.$(OBJEXT) \ metadata.$(OBJEXT) url.$(OBJEXT) search-lexer.$(OBJEXT) \ @@ -262,6 +262,7 @@ gmediaserver_SOURCES = \ connectmgr.c \ contentdir.c \ + mediarecreg.c \ interface.c \ logging.c \ upnp.c \ @@ -370,6 +371,7 @@ @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ address@hidden@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ @AMDEP_TRUE@@am__include@ @address@hidden/$(DEPDIR)/address@hidden@ diff -Nru /tmp/gmediaserver-0.9.0/src/mediarecreg.c ./src/mediarecreg.c --- /tmp/gmediaserver-0.9.0/src/mediarecreg.c 1970-01-01 01:00:00.000000000 +0100 +++ ./src/mediarecreg.c 2006-01-06 20:06:37.000000000 +0100 @@ -0,0 +1,82 @@ +/* contentdir.c - Implementation of UPnP ContentDirectory + * + * Copyright (C) 2005 Oskar Liljeblad + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program 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 Library General Public License for more details. + * + * You should have received a copy of the GNU 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. + * + */ + +#include +#include /* Gnulib/C99 */ +#include /* ? */ +#include "gettext.h" /* Gnulib/gettext */ +#define _(s) gettext(s) +#define N_(s) gettext_noop(s) +#include "xvasprintf.h" /* Gnulib */ +#include "minmax.h" /* Gnulib */ +#include "xalloc.h" /* Gnulib */ +#include "quotearg.h" /* Gnulib */ +#include "dirname.h" /* Gnulib */ +#include "strbuf.h" +#include "intutil.h" +#include "strutil.h" +#include "gmediaserver.h" +#include "search-parser.h" +#include "search-lexer.h" + +extern int yyparse(yyscan_t scanner, SearchCriteriaParseData *data); + +static uint32_t update_id = 0; + +static ServiceVariable * +find_variable(const char *name) +{ + int c; + for (c = 0; contentdir_service_variables[c].name != NULL; c++) { + if (strcmp(contentdir_service_variables[c].name, name) == 0) + return &contentdir_service_variables[c]; + } + assert(0); /* Shouldn't get here */ +} + +static bool +mediarecreg_is_authorized(ActionEvent *event) +{ + upnp_add_response(event, "Result", "1"); + return event->status; +} + +static bool +mediarecreg_is_validated(ActionEvent *event) +{ + upnp_add_response(event, "Result", "1"); + return event->status; +} + +/* XXX: In the future, ServiceVariable should allow different + * data types (and point to real variables, e.g. {"SystemUpdateID", UINT32_TYPE, &update_id}). + */ +ServiceVariable mediarecreg_service_variables[] = { + /*{ "TransferIDs", NULL },*/ + { "SystemUpdateID", NULL }, + /*{ "ContainerUpdateIDs", NULL },*/ + { 0, } +}; + +ServiceAction mediarecreg_service_actions[] = { + { "IsAuthorized", mediarecreg_is_authorized }, + { "IsValidated", mediarecreg_is_validated }, + { 0, } +}; Binary files /tmp/gmediaserver-0.9.0/src/.mediarecreg.c.swp and ./src/.mediarecreg.c.swp differ Binary files /tmp/gmediaserver-0.9.0/src/.metadata.c.swp and ./src/.metadata.c.swp differ diff -Nru /tmp/gmediaserver-0.9.0/src/schemas/MediaServer.xml.in ./src/schemas/MediaServer.xml.in --- /tmp/gmediaserver-0.9.0/src/schemas/MediaServer.xml.in 2005-06-17 14:05:11.000000000 +0200 +++ ./src/schemas/MediaServer.xml.in 2006-01-06 17:39:42.000000000 +0100 @@ -9,7 +9,7 @@ @DEVICE_UDN@ %s Oskar Liljeblad - @PACKAGE_NAME@ + Windows Media Connect @PACKAGE_VERSION@ 0000001 @@ -30,6 +30,13 @@ /ConnectionManager/Event /ConnectionManager/Control + + urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1 + urn:microsoft.com:serviceId:X_MS_MediaReceiverRegistrar + MediaReceiverRegistrar.xml + MediaReceiverRegistrar/Event + MediaReceiverRegistrar/Control + diff -Nru /tmp/gmediaserver-0.9.0/src/upnp.c ./src/upnp.c --- /tmp/gmediaserver-0.9.0/src/upnp.c 2005-12-11 16:09:28.000000000 +0100 +++ ./src/upnp.c 2006-01-06 17:55:29.000000000 +0100 @@ -53,6 +53,12 @@ connectmgr_service_actions, connectmgr_service_variables, }, + { + MEDIARECREG_SERVICE_ID, + "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1", + mediarecreg_service_actions, + mediarecreg_service_variables, + }, { 0, } }; Binary files /tmp/gmediaserver-0.9.0/src/.upnp.c.swp and ./src/.upnp.c.swp differ