Updated renderer-service-upnp to version 0.2.0 ( f629333 )
authorMark Ryan <mark.d.ryan@intel.com>
Wed, 14 Nov 2012 10:37:43 +0000 (11:37 +0100)
committerMark Ryan <mark.d.ryan@intel.com>
Wed, 14 Nov 2012 10:37:43 +0000 (11:37 +0100)
21 files changed:
ChangeLog
Makefile.am
Makefile.in
aclocal.m4
build-aux/compile
build-aux/depcomp
config.h.in
configure
configure.ac
m4/compiler-flags.m4
packaging/renderer-service-upnp.changes
packaging/renderer-service-upnp.spec
src/device.c
src/device.h
src/prop-defs.h
src/renderer-service-upnp.c
src/settings.c
src/task.c
src/task.h
src/upnp.c
src/upnp.h

index 1f3469a..2163fd0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+version 0.2.0
+    - The property org.mpris.MediaPlayer2.Player.TransportPlaySpeeds
+      changed from an array of string values to an array of double
+      values.
+    - The org.mpris.MediaPlayer2.Player.Rate property is now writable.
+            https://github.com/01org/renderer-service-upnp/issues/19
+
+version 0.1.0
+       - Fixed bug #34: RSU crashes when pushing an image to XBMC
+               https://github.com/01org/renderer-service-upnp/issues/34
+       - The com.intel.UPnP.RendererDevice interface has been added
+               https://github.com/01org/renderer-service-upnp/issues/44
+       - The org.mpris.MediaPlayer2.Player Volume property is now writable.
+               https://github.com/01org/renderer-service-upnp/issues/19
+       - The ProtocolInfo property has moved from the org.mpris.MediaPlayer2
+         to the new com.intel.UPnP.RendererDevice interface.
+       - The org.mpris.MediaPlayer2.Player.Rate and the
+         org.mpris.MediaPlayer2.Player.PlaySpeed are now computed correctly
+         according to the MPRIS standard.
+       - A new property org.mpris.MediaPlayer2.Player.TransportPlaySpeeds
+         has been added to inform clients of the playspeeds supported by
+         Renderers.
+
 version 0.0.4
        - Fixed bug #20: RSU executes commands of dead children
                https://github.com/01org/renderer-service-upnp/issues/20
index 2a94a0a..402ea31 100644 (file)
@@ -2,6 +2,7 @@ INCLUDES = -DG_LOG_DOMAIN=\"RSU\"
 
 AM_CFLAGS =    $(GLIB_CFLAGS)                          \
                $(GIO_CFLAGS)                           \
+               $(GSSDP_CFLAGS)                         \
                $(GUPNP_CFLAGS)                         \
                $(GUPNPAV_CFLAGS)                       \
                $(SOUP_CFLAGS)                          \
@@ -40,9 +41,11 @@ renderer_service_upnp_SOURCES = $(renderer_service_upnp_sources) \
 
 renderer_service_upnp_LDADD = $(GLIB_LIBS)     \
                              $(GIO_LIBS)       \
+                             $(GSSDP_LIBS)     \
                              $(GUPNP_LIBS)     \
                              $(GUPNPAV_LIBS)   \
-                             $(SOUP_LIBS)
+                             $(SOUP_LIBS)      \
+                             -lm
 
 dbussessiondir = @DBUS_SESSION_DIR@
 dbussession_DATA = src/com.intel.renderer-service-upnp.service
index 91ae6f9..1afecea 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11.3 from Makefile.am.
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
 
 
 VPATH = @srcdir@
+am__make_dryrun = \
+  { \
+    am__dry=no; \
+    case $$MAKEFLAGS in \
+      *\\[\ \  ]*) \
+        echo 'am--echo: ; @echo "AM"  OK' | $(MAKE) -f - 2>/dev/null \
+          | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+      *) \
+        for am__flg in $$MAKEFLAGS; do \
+          case $$am__flg in \
+            *=*|--*) ;; \
+            *n*) am__dry=yes; break;; \
+          esac; \
+        done;; \
+    esac; \
+    test $$am__dry = yes; \
+  }
 pkgdatadir = $(datadir)/@PACKAGE@
 pkgincludedir = $(includedir)/@PACKAGE@
 pkglibdir = $(libdir)/@PACKAGE@
@@ -68,7 +85,8 @@ renderer_service_upnp_OBJECTS = $(am_renderer_service_upnp_OBJECTS)
 am__DEPENDENCIES_1 =
 renderer_service_upnp_DEPENDENCIES = $(am__DEPENDENCIES_1) \
        $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
-       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+       $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) \
+       $(am__DEPENDENCIES_1)
 DEFAULT_INCLUDES = -I.@am__isrc@
 depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
 am__depfiles_maybe = depfiles
@@ -91,6 +109,11 @@ am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
 am__v_GEN_0 = @echo "  GEN   " $@;
 SOURCES = $(renderer_service_upnp_SOURCES)
 DIST_SOURCES = $(renderer_service_upnp_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -164,6 +187,8 @@ GIO_LIBS = @GIO_LIBS@
 GLIB_CFLAGS = @GLIB_CFLAGS@
 GLIB_LIBS = @GLIB_LIBS@
 GREP = @GREP@
+GSSDP_CFLAGS = @GSSDP_CFLAGS@
+GSSDP_LIBS = @GSSDP_LIBS@
 GUPNPAV_CFLAGS = @GUPNPAV_CFLAGS@
 GUPNPAV_LIBS = @GUPNPAV_LIBS@
 GUPNP_CFLAGS = @GUPNP_CFLAGS@
@@ -194,6 +219,7 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
 PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
 RSU_INTERFACE_MANAGER = @RSU_INTERFACE_MANAGER@
 RSU_INTERFACE_PUSH_HOST = @RSU_INTERFACE_PUSH_HOST@
+RSU_INTERFACE_RENDERER_DEVICE = @RSU_INTERFACE_RENDERER_DEVICE@
 RSU_SERVER_NAME = @RSU_SERVER_NAME@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
@@ -249,6 +275,7 @@ with_log_type = @with_log_type@
 INCLUDES = -DG_LOG_DOMAIN=\"RSU\"
 AM_CFLAGS = $(GLIB_CFLAGS)                             \
                $(GIO_CFLAGS)                           \
+               $(GSSDP_CFLAGS)                         \
                $(GUPNP_CFLAGS)                         \
                $(GUPNPAV_CFLAGS)                       \
                $(SOUP_CFLAGS)                          \
@@ -282,9 +309,11 @@ renderer_service_upnp_SOURCES = $(renderer_service_upnp_sources) \
 
 renderer_service_upnp_LDADD = $(GLIB_LIBS)     \
                              $(GIO_LIBS)       \
+                             $(GSSDP_LIBS)     \
                              $(GUPNP_LIBS)     \
                              $(GUPNPAV_LIBS)   \
-                             $(SOUP_LIBS)
+                             $(SOUP_LIBS)      \
+                             -lm
 
 dbussessiondir = @DBUS_SESSION_DIR@
 dbussession_DATA = src/com.intel.renderer-service-upnp.service
@@ -367,8 +396,11 @@ renderer-service-upnp.conf: $(top_builddir)/config.status $(srcdir)/renderer-ser
        cd $(top_builddir) && $(SHELL) ./config.status $@
 install-binPROGRAMS: $(bin_PROGRAMS)
        @$(NORMAL_INSTALL)
-       test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
        @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
+       fi; \
        for p in $$list; do echo "$$p $$p"; done | \
        sed 's/$(EXEEXT)$$//' | \
        while read p p1; do if test -f $$p; \
@@ -467,8 +499,11 @@ distclean-compile:
 @am__fastdepCC_FALSE@  $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
 install-dbussessionDATA: $(dbussession_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(dbussessiondir)" || $(MKDIR_P) "$(DESTDIR)$(dbussessiondir)"
        @list='$(dbussession_DATA)'; test -n "$(dbussessiondir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(dbussessiondir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(dbussessiondir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
@@ -485,8 +520,11 @@ uninstall-dbussessionDATA:
        dir='$(DESTDIR)$(dbussessiondir)'; $(am__uninstall_files_from_dir)
 install-pkgconfigDATA: $(pkgconfig_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
        @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
@@ -503,8 +541,11 @@ uninstall-pkgconfigDATA:
        dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir)
 install-sysconfDATA: $(sysconf_DATA)
        @$(NORMAL_INSTALL)
-       test -z "$(sysconfdir)" || $(MKDIR_P) "$(DESTDIR)$(sysconfdir)"
        @list='$(sysconf_DATA)'; test -n "$(sysconfdir)" || list=; \
+       if test -n "$$list"; then \
+         echo " $(MKDIR_P) '$(DESTDIR)$(sysconfdir)'"; \
+         $(MKDIR_P) "$(DESTDIR)$(sysconfdir)" || exit 1; \
+       fi; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
@@ -670,7 +711,7 @@ distcheck: dist
        *.zip*) \
          unzip $(distdir).zip ;;\
        esac
-       chmod -R a-w $(distdir); chmod a+w $(distdir)
+       chmod -R a-w $(distdir); chmod u+w $(distdir)
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
index 6ea7479..3c0d88c 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.6 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
@@ -14,8 +14,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
-[m4_warning([this file was generated for autoconf 2.68.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -198,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.11'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.11.3], [],
+m4_if([$1], [1.11.6], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -214,7 +214,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.3])dnl
+[AM_AUTOMAKE_VERSION([1.11.6])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
index b1f4749..862a14e 100755 (executable)
@@ -1,7 +1,7 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-01-04.17; # UTC
+scriptversion=2012-03-05.13; # UTC
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010, 2012 Free
 # Software Foundation, Inc.
@@ -79,6 +79,48 @@ func_file_conv ()
   esac
 }
 
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
 # func_cl_wrapper cl arg...
 # Adjust compile command to suit cl
 func_cl_wrapper ()
@@ -109,43 +151,34 @@ func_cl_wrapper ()
              ;;
          esac
          ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
        -I*)
          func_file_conv "${1#-I}" mingw
          set x "$@" -I"$file"
          shift
          ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
        -l*)
-         lib=${1#-l}
-         found=no
-         save_IFS=$IFS
-         IFS=';'
-         for dir in $lib_path $LIB
-         do
-           IFS=$save_IFS
-           if $shared && test -f "$dir/$lib.dll.lib"; then
-             found=yes
-             set x "$@" "$dir/$lib.dll.lib"
-             break
-           fi
-           if test -f "$dir/$lib.lib"; then
-             found=yes
-             set x "$@" "$dir/$lib.lib"
-             break
-           fi
-         done
-         IFS=$save_IFS
-
-         test "$found" != yes && set x "$@" "$lib.lib"
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
          shift
          ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
        -L*)
-         func_file_conv "${1#-L}"
-         if test -z "$lib_path"; then
-           lib_path=$file
-         else
-           lib_path="$lib_path;$file"
-         fi
-         linker_opts="$linker_opts -LIBPATH:$file"
+         func_cl_dashL "${1#-L}"
          ;;
        -static)
          shared=false
index bd0ac08..25a39e6 100755 (executable)
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2011-12-04.11; # UTC
+scriptversion=2012-03-27.16; # UTC
 
 # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# 2011, 2012 Free Software Foundation, Inc.
 
 # 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
@@ -28,7 +28,7 @@ scriptversion=2011-12-04.11; # UTC
 
 case $1 in
   '')
-     echo "$0: No command.  Try \`$0 --help' for more information." 1>&2
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
      exit 1;
      ;;
   -h | --h*)
@@ -40,8 +40,8 @@ as side-effects.
 
 Environment variables:
   depmode     Dependency tracking mode.
-  source      Source file read by `PROGRAMS ARGS'.
-  object      Object file output by `PROGRAMS ARGS'.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
   DEPDIR      directory where to store dependencies.
   depfile     Dependency file to output.
   tmpdepfile  Temporary file to use when outputting dependencies.
@@ -57,6 +57,12 @@ EOF
     ;;
 esac
 
+# A tabulation character.
+tab='  '
+# A newline character.
+nl='
+'
+
 if test -z "$depmode" || test -z "$source" || test -z "$object"; then
   echo "depcomp: Variables source, object and depmode must be set" 1>&2
   exit 1
@@ -102,6 +108,12 @@ if test "$depmode" = msvc7msys; then
    depmode=msvc7
 fi
 
+if test "$depmode" = xlc; then
+   # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency informations.
+   gccflag=-qmakedep=gcc,-MF
+   depmode=gcc
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -156,15 +168,14 @@ gcc)
 ## The second -e expression handles DOS-style file names with drive letters.
   sed -e 's/^[^:]*: / /' \
       -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
-## This next piece of magic avoids the `deleted header file' problem.
+## This next piece of magic avoids the "deleted header file" problem.
 ## The problem is that when a header file which appears in a .P file
 ## is deleted, the dependency causes make to die (because there is
 ## typically no way to rebuild the header).  We avoid this by adding
 ## dummy dependencies for each header file.  Too bad gcc doesn't do
 ## this for us directly.
-  tr ' ' '
-' < "$tmpdepfile" |
-## Some versions of gcc put a space before the `:'.  On the theory
+  tr ' ' "$nl" < "$tmpdepfile" |
+## Some versions of gcc put a space before the ':'.  On the theory
 ## that the space means something, we add a space to the output as
 ## well.  hp depmode also adds that space, but also prefixes the VPATH
 ## to the object.  Take care to not repeat it in the output.
@@ -203,18 +214,15 @@ sgi)
     # clever and replace this with sed code, as IRIX sed won't handle
     # lines with more than a fixed number of characters (4096 in
     # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
-    # the IRIX cc adds comments like `#:fec' to the end of the
+    # the IRIX cc adds comments like '#:fec' to the end of the
     # dependency line.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
-    tr '
-' ' ' >> "$depfile"
+    tr "$nl" ' ' >> "$depfile"
     echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
-    tr ' ' '
-' < "$tmpdepfile" \
+    tr ' ' "$nl" < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
    >> "$depfile"
   else
@@ -226,10 +234,17 @@ sgi)
   rm -f "$tmpdepfile"
   ;;
 
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 aix)
   # The C for AIX Compiler uses -M and outputs the dependencies
   # in a .u file.  In older versions, this file always lives in the
-  # current directory.  Also, the AIX compiler puts `$object:' at the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
   # start of each line; $object doesn't have directory information.
   # Version 6 uses the directory in both cases.
   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
@@ -259,12 +274,11 @@ aix)
     test -f "$tmpdepfile" && break
   done
   if test -f "$tmpdepfile"; then
-    # Each line is of the form `foo.o: dependent.h'.
+    # Each line is of the form 'foo.o: dependent.h'.
     # Do two passes, one to just change these to
-    # `$object: dependent.h' and one to simply `dependent.h:'.
+    # '$object: dependent.h' and one to simply 'dependent.h:'.
     sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-    # That's a tab and a space in the [].
-    sed -e 's,^.*\.[a-z]*:[     ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+    sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -275,23 +289,26 @@ aix)
   ;;
 
 icc)
-  # Intel's C compiler understands `-MD -MF file'.  However on
-  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # Intel's C compiler anf tcc (Tiny C Compiler) understand '-MD -MF file'.
+  # However on
+  #    $CC -MD -MF foo.d -c -o sub/foo.o sub/foo.c
   # ICC 7.0 will fill foo.d with something like
   #    foo.o: sub/foo.c
   #    foo.o: sub/foo.h
-  # which is wrong.  We want:
+  # which is wrong.  We want
   #    sub/foo.o: sub/foo.c
   #    sub/foo.o: sub/foo.h
   #    sub/foo.c:
   #    sub/foo.h:
   # ICC 7.1 will output
   #    foo.o: sub/foo.c sub/foo.h
-  # and will wrap long lines using :
+  # and will wrap long lines using '\':
   #    foo.o: sub/foo.c ... \
   #     sub/foo.h ... \
   #     ...
-
+  # tcc 0.9.26 (FIXME still under development at the moment of writing)
+  # will emit a similar output, but also prepend the continuation lines
+  # with horizontal tabulation characters.
   "$@" -MD -MF "$tmpdepfile"
   stat=$?
   if test $stat -eq 0; then :
@@ -300,15 +317,21 @@ icc)
     exit $stat
   fi
   rm -f "$depfile"
-  # Each line is of the form `foo.o: dependent.h',
-  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Each line is of the form 'foo.o: dependent.h',
+  # or 'foo.o: dep1.h dep2.h \', or ' dep3.h dep4.h \'.
   # Do two passes, one to just change these to
-  # `$object: dependent.h' and one to simply `dependent.h:'.
-  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
-  # Some versions of the HPUX 10.20 sed can't process this invocation
-  # correctly.  Breaking it into two sed invocations is a workaround.
-  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
-    sed -e 's/$/ :/' >> "$depfile"
+  # '$object: dependent.h' and one to simply 'dependent.h:'.
+  sed -e "s/^[ $tab][ $tab]*/  /" -e "s,^[^:]*:,$object :," \
+    < "$tmpdepfile" > "$depfile"
+  sed '
+    s/[ '"$tab"'][ '"$tab"']*/ /g
+    s/^ *//
+    s/ *\\*$//
+    s/^[^:]*: *//
+    /^$/d
+    /:$/d
+    s/$/ :/
+  ' < "$tmpdepfile" >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
@@ -344,7 +367,7 @@ hp2)
   done
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
-    # Add `dependent.h:' lines.
+    # Add 'dependent.h:' lines.
     sed -ne '2,${
               s/^ *//
               s/ \\*$//
@@ -359,9 +382,9 @@ hp2)
 
 tru64)
    # The Tru64 compiler uses -MD to generate dependencies as a side
-   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
    # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
-   # dependencies in `foo.d' instead, so we check for that too.
+   # dependencies in 'foo.d' instead, so we check for that too.
    # Subdirectories are respected.
    dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
    test "x$dir" = "x$object" && dir=
@@ -407,8 +430,7 @@ tru64)
    done
    if test -f "$tmpdepfile"; then
       sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
-      # That's a tab and a space in the [].
-      sed -e 's,^.*\.[a-z]*:[   ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+      sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
    else
       echo "#dummy" > "$depfile"
    fi
@@ -443,11 +465,11 @@ msvc7)
   p
 }' | $cygpath_u | sort -u | sed -n '
 s/ /\\ /g
-s/\(.*\)/      \1 \\/p
+s/\(.*\)/'"$tab"'\1 \\/p
 s/.\(.*\) \\/\1:/
 H
 $ {
-  s/.*/        /
+  s/.*/'"$tab"'/
   G
   p
 }' >> "$depfile"
@@ -478,7 +500,7 @@ dashmstdout)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -498,15 +520,14 @@ dashmstdout)
   done
 
   test -z "$dashmflag" && dashmflag=-M
-  # Require at least two characters before searching for `:'
+  # Require at least two characters before searching for ':'
   # in the target name.  This is to cope with DOS-style filenames:
-  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
   "$@" $dashmflag |
-    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+    sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile"
   rm -f "$depfile"
   cat < "$tmpdepfile" > "$depfile"
-  tr ' ' '
-' < "$tmpdepfile" | \
+  tr ' ' "$nl" < "$tmpdepfile" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -562,8 +583,7 @@ makedepend)
   # makedepend may prepend the VPATH from the source file name to the object.
   # No need to regex-escape $object, excess matching of '.' is harmless.
   sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
-  sed '1,2d' "$tmpdepfile" | tr ' ' '
-' | \
+  sed '1,2d' "$tmpdepfile" | tr ' ' "$nl" | \
 ## Some versions of the HPUX 10.20 sed can't process this invocation
 ## correctly.  Breaking it into two sed invocations is a workaround.
     sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
@@ -583,7 +603,7 @@ cpp)
     shift
   fi
 
-  # Remove `-o $object'.
+  # Remove '-o $object'.
   IFS=" "
   for arg
   do
@@ -652,8 +672,8 @@ msvisualcpp)
   sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> "$depfile"
-  echo "       " >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
   sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
index c5d2bc2..e7f558a 100644 (file)
@@ -89,6 +89,9 @@
 /* d-Bus Name of renderer-service-upnp push host interface */
 #undef RSU_INTERFACE_PUSH_HOST
 
+/* d-Bus Name of renderer-service-upnp device interface */
+#undef RSU_INTERFACE_RENDERER_DEVICE
+
 /* Log level flag for debug messages */
 #undef RSU_LOG_LEVEL
 
index 36fedfd..6464e3a 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,13 +1,11 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for renderer-service-upnp 0.0.4.
+# Generated by GNU Autoconf 2.69 for renderer-service-upnp 0.2.0.
 #
 # Report bugs to <https://github.com/01org/renderer-service-upnp/issues/new>.
 #
 #
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
-# Foundation, Inc.
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -136,6 +134,31 @@ export LANGUAGE
 # CDPATH.
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
 if test "x$CONFIG_SHELL" = x; then
   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
   emulate sh
@@ -169,7 +192,8 @@ if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
 else
   exitcode=1; echo positional parameters were not saved.
 fi
-test x\$exitcode = x0 || exit 1"
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
@@ -214,21 +238,25 @@ IFS=$as_save_IFS
 
 
       if test "x$CONFIG_SHELL" != x; then :
-  # We cannot yet assume a decent shell, so we have to provide a
-       # neutralization value for shells without unset; and this also
-       # works around shells that cannot unset nonexistent variables.
-       # Preserve -v and -x to the replacement shell.
-       BASH_ENV=/dev/null
-       ENV=/dev/null
-       (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
-       export CONFIG_SHELL
-       case $- in # ((((
-         *v*x* | *x*v* ) as_opts=-vx ;;
-         *v* ) as_opts=-v ;;
-         *x* ) as_opts=-x ;;
-         * ) as_opts= ;;
-       esac
-       exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
+  export CONFIG_SHELL
+             # We cannot yet assume a decent shell, so we have to provide a
+# neutralization value for shells without unset; and this also
+# works around shells that cannot unset nonexistent variables.
+# Preserve -v and -x to the replacement shell.
+BASH_ENV=/dev/null
+ENV=/dev/null
+(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+case $- in # ((((
+  *v*x* | *x*v* ) as_opts=-vx ;;
+  *v* ) as_opts=-v ;;
+  *x* ) as_opts=-x ;;
+  * ) as_opts= ;;
+esac
+exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
 fi
 
     if test x$as_have_required = xno; then :
@@ -332,6 +360,14 @@ $as_echo X"$as_dir" |
 
 
 } # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
 # as_fn_append VAR VALUE
 # ----------------------
 # Append the text in VALUE to the end of the definition contained in VAR. Take
@@ -453,6 +489,10 @@ as_cr_alnum=$as_cr_Letters$as_cr_digits
   chmod +x "$as_me.lineno" ||
     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
 
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
   # Don't try to exec as it changes $[0], causing all sort of problems
   # (the dirname of $[0] is not the place where we might find the
   # original and so on.  Autoconf is especially sensitive to this).
@@ -487,16 +527,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -508,28 +548,8 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -561,8 +581,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='renderer-service-upnp'
 PACKAGE_TARNAME='renderer-service-upnp'
-PACKAGE_VERSION='0.0.4'
-PACKAGE_STRING='renderer-service-upnp 0.0.4'
+PACKAGE_VERSION='0.2.0'
+PACKAGE_STRING='renderer-service-upnp 0.2.0'
 PACKAGE_BUGREPORT='https://github.com/01org/renderer-service-upnp/issues/new'
 PACKAGE_URL='https://01.org/dleyna/'
 
@@ -611,6 +631,7 @@ with_log_type
 with_log_level
 never_quit
 RSU_INTERFACE_PUSH_HOST
+RSU_INTERFACE_RENDERER_DEVICE
 RSU_INTERFACE_MANAGER
 RSU_SERVER_NAME
 DBUS_SESSION_DIR
@@ -624,6 +645,8 @@ GUPNPAV_LIBS
 GUPNPAV_CFLAGS
 GUPNP_LIBS
 GUPNP_CFLAGS
+GSSDP_LIBS
+GSSDP_CFLAGS
 GIO_LIBS
 GIO_CFLAGS
 GLIB_LIBS
@@ -748,6 +771,8 @@ GLIB_CFLAGS
 GLIB_LIBS
 GIO_CFLAGS
 GIO_LIBS
+GSSDP_CFLAGS
+GSSDP_LIBS
 GUPNP_CFLAGS
 GUPNP_LIBS
 GUPNPAV_CFLAGS
@@ -1210,8 +1235,6 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1297,7 +1320,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures renderer-service-upnp 0.0.4 to adapt to many kinds of systems.
+\`configure' configures renderer-service-upnp 0.2.0 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1364,7 +1387,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of renderer-service-upnp 0.0.4:";;
+     short | recursive ) echo "Configuration of renderer-service-upnp 0.2.0:";;
    esac
   cat <<\_ACEOF
 
@@ -1410,6 +1433,9 @@ Some influential environment variables:
   GLIB_LIBS   linker flags for GLIB, overriding pkg-config
   GIO_CFLAGS  C compiler flags for GIO, overriding pkg-config
   GIO_LIBS    linker flags for GIO, overriding pkg-config
+  GSSDP_CFLAGS
+              C compiler flags for GSSDP, overriding pkg-config
+  GSSDP_LIBS  linker flags for GSSDP, overriding pkg-config
   GUPNP_CFLAGS
               C compiler flags for GUPNP, overriding pkg-config
   GUPNP_LIBS  linker flags for GUPNP, overriding pkg-config
@@ -1488,10 +1514,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-renderer-service-upnp configure 0.0.4
-generated by GNU Autoconf 2.68
+renderer-service-upnp configure 0.2.0
+generated by GNU Autoconf 2.69
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1765,7 +1791,8 @@ int
 main ()
 {
 static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)];
-test_array [0] = 0
+test_array [0] = 0;
+return test_array [0];
 
   ;
   return 0;
@@ -1875,7 +1902,7 @@ $as_echo "$ac_try_echo"; } >&5
         test ! -s conftest.err
        } && test -s conftest$ac_exeext && {
         test "$cross_compiling" = yes ||
-        $as_test_x conftest$ac_exeext
+        test -x conftest$ac_exeext
        }; then :
   ac_retval=0
 else
@@ -1964,8 +1991,8 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by renderer-service-upnp $as_me 0.0.4, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+It was created by renderer-service-upnp $as_me 0.2.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
 
@@ -2388,7 +2415,7 @@ case $as_dir/ in #((
     # by default.
     for ac_prog in ginstall scoinst install; do
       for ac_exec_ext in '' $ac_executable_extensions; do
-       if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+       if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
          if test $ac_prog = install &&
            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
            # AIX install.  It has an incompatible calling convention.
@@ -2557,7 +2584,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_STRIP="${ac_tool_prefix}strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2597,7 +2624,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_STRIP="strip"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2648,7 +2675,7 @@ do
   test -z "$as_dir" && as_dir=.
     for ac_prog in mkdir gmkdir; do
         for ac_exec_ext in '' $ac_executable_extensions; do
-          { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+          as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
           case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
             'mkdir (GNU coreutils) '* | \
             'mkdir (coreutils) '* | \
@@ -2701,7 +2728,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_AWK="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2787,7 +2814,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='renderer-service-upnp'
- VERSION='0.0.4'
+ VERSION='0.2.0'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2919,6 +2946,7 @@ AM_BACKSLASH='\'
                CFLAGS+=" -Wno-overlength-strings"
 
                CFLAGS+=" -DG_DISABLE_DEPRECATED"
+               CFLAGS+=" -DGLIB_DISABLE_DEPRECATION_WARNINGS"
        fi
 
        CFLAGS+=" -Wno-format-extra-args"
@@ -2955,7 +2983,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -2995,7 +3023,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="gcc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3048,7 +3076,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="${ac_tool_prefix}cc"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3089,7 +3117,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
        ac_prog_rejected=yes
        continue
@@ -3147,7 +3175,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3191,7 +3219,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_prog_ac_ct_CC="$ac_prog"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -3637,8 +3665,7 @@ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 #include <stdarg.h>
 #include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
+struct stat;
 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
 struct buf { int x; };
 FILE * (*rcsopen) (struct buf *, struct stat *, int);
@@ -4070,7 +4097,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4113,7 +4140,7 @@ do
   IFS=$as_save_IFS
   test -z "$as_dir" && as_dir=.
     for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
     ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
     break 2
@@ -4438,6 +4465,97 @@ $as_echo "yes" >&6; }
 fi
 
 pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GSSDP" >&5
+$as_echo_n "checking for GSSDP... " >&6; }
+
+if test -n "$GSSDP_CFLAGS"; then
+    pkg_cv_GSSDP_CFLAGS="$GSSDP_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gssdp-1.0 >= 0.13.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gssdp-1.0 >= 0.13.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GSSDP_CFLAGS=`$PKG_CONFIG --cflags "gssdp-1.0 >= 0.13.0" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$GSSDP_LIBS"; then
+    pkg_cv_GSSDP_LIBS="$GSSDP_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gssdp-1.0 >= 0.13.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gssdp-1.0 >= 0.13.0") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_GSSDP_LIBS=`$PKG_CONFIG --libs "gssdp-1.0 >= 0.13.0" 2>/dev/null`
+                     test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+               GSSDP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gssdp-1.0 >= 0.13.0" 2>&1`
+        else
+               GSSDP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gssdp-1.0 >= 0.13.0" 2>&1`
+        fi
+       # Put the nasty error message in config.log where it belongs
+       echo "$GSSDP_PKG_ERRORS" >&5
+
+       as_fn_error $? "Package requirements (gssdp-1.0 >= 0.13.0) were not met:
+
+$GSSDP_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables GSSDP_CFLAGS
+and GSSDP_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+       { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables GSSDP_CFLAGS
+and GSSDP_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+       GSSDP_CFLAGS=$pkg_cv_GSSDP_CFLAGS
+       GSSDP_LIBS=$pkg_cv_GSSDP_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUPNP" >&5
 $as_echo_n "checking for GUPNP... " >&6; }
 
@@ -4445,12 +4563,12 @@ if test -n "$GUPNP_CFLAGS"; then
     pkg_cv_GUPNP_CFLAGS="$GUPNP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-1.0 >= 0.17.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gupnp-1.0 >= 0.17.2") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-1.0 >= 0.19.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gupnp-1.0 >= 0.19.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GUPNP_CFLAGS=`$PKG_CONFIG --cflags "gupnp-1.0 >= 0.17.2" 2>/dev/null`
+  pkg_cv_GUPNP_CFLAGS=`$PKG_CONFIG --cflags "gupnp-1.0 >= 0.19.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4462,12 +4580,12 @@ if test -n "$GUPNP_LIBS"; then
     pkg_cv_GUPNP_LIBS="$GUPNP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-1.0 >= 0.17.2\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gupnp-1.0 >= 0.17.2") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-1.0 >= 0.19.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gupnp-1.0 >= 0.19.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GUPNP_LIBS=`$PKG_CONFIG --libs "gupnp-1.0 >= 0.17.2" 2>/dev/null`
+  pkg_cv_GUPNP_LIBS=`$PKG_CONFIG --libs "gupnp-1.0 >= 0.19.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4488,14 +4606,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               GUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gupnp-1.0 >= 0.17.2" 2>&1`
+               GUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gupnp-1.0 >= 0.19.0" 2>&1`
         else
-               GUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gupnp-1.0 >= 0.17.2" 2>&1`
+               GUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gupnp-1.0 >= 0.19.0" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$GUPNP_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (gupnp-1.0 >= 0.17.2) were not met:
+       as_fn_error $? "Package requirements (gupnp-1.0 >= 0.19.0) were not met:
 
 $GUPNP_PKG_ERRORS
 
@@ -4536,12 +4654,12 @@ if test -n "$GUPNPAV_CFLAGS"; then
     pkg_cv_GUPNPAV_CFLAGS="$GUPNPAV_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-av-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gupnp-av-1.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-av-1.0 >= 0.11.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gupnp-av-1.0 >= 0.11.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GUPNPAV_CFLAGS=`$PKG_CONFIG --cflags "gupnp-av-1.0" 2>/dev/null`
+  pkg_cv_GUPNPAV_CFLAGS=`$PKG_CONFIG --cflags "gupnp-av-1.0 >= 0.11.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4553,12 +4671,12 @@ if test -n "$GUPNPAV_LIBS"; then
     pkg_cv_GUPNPAV_LIBS="$GUPNPAV_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-av-1.0\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "gupnp-av-1.0") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gupnp-av-1.0 >= 0.11.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "gupnp-av-1.0 >= 0.11.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_GUPNPAV_LIBS=`$PKG_CONFIG --libs "gupnp-av-1.0" 2>/dev/null`
+  pkg_cv_GUPNPAV_LIBS=`$PKG_CONFIG --libs "gupnp-av-1.0 >= 0.11.0" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4579,14 +4697,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               GUPNPAV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gupnp-av-1.0" 2>&1`
+               GUPNPAV_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gupnp-av-1.0 >= 0.11.0" 2>&1`
         else
-               GUPNPAV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gupnp-av-1.0" 2>&1`
+               GUPNPAV_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gupnp-av-1.0 >= 0.11.0" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$GUPNPAV_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (gupnp-av-1.0) were not met:
+       as_fn_error $? "Package requirements (gupnp-av-1.0 >= 0.11.0) were not met:
 
 $GUPNPAV_PKG_ERRORS
 
@@ -4627,12 +4745,12 @@ if test -n "$SOUP_CFLAGS"; then
     pkg_cv_SOUP_CFLAGS="$SOUP_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsoup-2.4") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.28.2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.28.2") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4" 2>/dev/null`
+  pkg_cv_SOUP_CFLAGS=`$PKG_CONFIG --cflags "libsoup-2.4 >= 2.28.2" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4644,12 +4762,12 @@ if test -n "$SOUP_LIBS"; then
     pkg_cv_SOUP_LIBS="$SOUP_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "libsoup-2.4") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libsoup-2.4 >= 2.28.2\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "libsoup-2.4 >= 2.28.2") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4" 2>/dev/null`
+  pkg_cv_SOUP_LIBS=`$PKG_CONFIG --libs "libsoup-2.4 >= 2.28.2" 2>/dev/null`
                      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -4670,14 +4788,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-               SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsoup-2.4" 2>&1`
+               SOUP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "libsoup-2.4 >= 2.28.2" 2>&1`
         else
-               SOUP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsoup-2.4" 2>&1`
+               SOUP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "libsoup-2.4 >= 2.28.2" 2>&1`
         fi
        # Put the nasty error message in config.log where it belongs
        echo "$SOUP_PKG_ERRORS" >&5
 
-       as_fn_error $? "Package requirements (libsoup-2.4) were not met:
+       as_fn_error $? "Package requirements (libsoup-2.4 >= 2.28.2) were not met:
 
 $SOUP_PKG_ERRORS
 
@@ -4866,7 +4984,7 @@ do
     for ac_prog in grep ggrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+      as_fn_executable_p "$ac_path_GREP" || continue
 # Check for GNU ac_path_GREP and select it if it is found.
   # Check for GNU $ac_path_GREP
 case `"$ac_path_GREP" --version 2>&1` in
@@ -4932,7 +5050,7 @@ do
     for ac_prog in egrep; do
     for ac_exec_ext in '' $ac_executable_extensions; do
       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
-      { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+      as_fn_executable_p "$ac_path_EGREP" || continue
 # Check for GNU ac_path_EGREP and select it if it is found.
   # Check for GNU $ac_path_EGREP
 case `"$ac_path_EGREP" --version 2>&1` in
@@ -5146,60 +5264,60 @@ else
   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
 /* end confdefs.h.  */
 
-#include <stdbool.h>
-#ifndef bool
- "error: bool is not defined"
-#endif
-#ifndef false
- "error: false is not defined"
-#endif
-#if false
- "error: false is not 0"
-#endif
-#ifndef true
- "error: true is not defined"
-#endif
-#if true != 1
- "error: true is not 1"
-#endif
-#ifndef __bool_true_false_are_defined
- "error: __bool_true_false_are_defined is not defined"
-#endif
-
-       struct s { _Bool s: 1; _Bool t; } s;
-
-       char a[true == 1 ? 1 : -1];
-       char b[false == 0 ? 1 : -1];
-       char c[__bool_true_false_are_defined == 1 ? 1 : -1];
-       char d[(bool) 0.5 == true ? 1 : -1];
-       /* See body of main program for 'e'.  */
-       char f[(_Bool) 0.0 == false ? 1 : -1];
-       char g[true];
-       char h[sizeof (_Bool)];
-       char i[sizeof s.t];
-       enum { j = false, k = true, l = false * true, m = true * 256 };
-       /* The following fails for
-          HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
-       _Bool n[m];
-       char o[sizeof n == m * sizeof n[0] ? 1 : -1];
-       char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
-       /* Catch a bug in an HP-UX C compiler.  See
-          http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
-          http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
-        */
-       _Bool q = true;
-       _Bool *pq = &q;
+             #include <stdbool.h>
+             #ifndef bool
             "error: bool is not defined"
+             #endif
+             #ifndef false
             "error: false is not defined"
+             #endif
+             #if false
             "error: false is not 0"
+             #endif
+             #ifndef true
             "error: true is not defined"
+             #endif
+             #if true != 1
             "error: true is not 1"
+             #endif
+             #ifndef __bool_true_false_are_defined
             "error: __bool_true_false_are_defined is not defined"
+             #endif
+
+             struct s { _Bool s: 1; _Bool t; } s;
+
+             char a[true == 1 ? 1 : -1];
+             char b[false == 0 ? 1 : -1];
+             char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+             char d[(bool) 0.5 == true ? 1 : -1];
+             /* See body of main program for 'e'.  */
+             char f[(_Bool) 0.0 == false ? 1 : -1];
+             char g[true];
+             char h[sizeof (_Bool)];
+             char i[sizeof s.t];
+             enum { j = false, k = true, l = false * true, m = true * 256 };
+             /* The following fails for
+                HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
+             _Bool n[m];
+             char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+             char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+             /* Catch a bug in an HP-UX C compiler.  See
+                http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+                http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+              */
+             _Bool q = true;
+             _Bool *pq = &q;
 
 int
 main ()
 {
 
-       bool e = &s;
-       *pq |= q;
-       *pq |= ! q;
-       /* Refer to every declared value, to avoid compiler optimizations.  */
-       return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
-               + !m + !n + !o + !p + !q + !pq);
+             bool e = &s;
+             *pq |= q;
+             *pq |= ! q;
+             /* Refer to every declared value, to avoid compiler optimizations.  */
+             return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+                     + !m + !n + !o + !p + !q + !pq);
 
   ;
   return 0;
@@ -5214,7 +5332,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
 $as_echo "$ac_cv_header_stdbool_h" >&6; }
-ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+   ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
 if test "x$ac_cv_type__Bool" = xyes; then :
 
 cat >>confdefs.h <<_ACEOF
@@ -5224,6 +5342,7 @@ _ACEOF
 
 fi
 
+
 if test $ac_cv_header_stdbool_h = yes; then
 
 $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
@@ -5666,6 +5785,12 @@ RSU_INTERFACE_MANAGER=com.intel.RendererServiceUPnP.Manager
 $as_echo "#define RSU_INTERFACE_MANAGER \"com.intel.RendererServiceUPnP.Manager\"" >>confdefs.h
 
 
+RSU_INTERFACE_RENDERER_DEVICE=com.intel.UPnP.RendererDevice
+
+
+$as_echo "#define RSU_INTERFACE_RENDERER_DEVICE \"com.intel.UPnP.RendererDevice\"" >>confdefs.h
+
+
 RSU_INTERFACE_PUSH_HOST=com.intel.RendererServiceUPnP.PushHost
 
 
@@ -6106,16 +6231,16 @@ if (echo >conf$$.file) 2>/dev/null; then
     # ... but there are two gotchas:
     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
-    # In both cases, we have to default to `cp -p'.
+    # In both cases, we have to default to `cp -pR'.
     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
-      as_ln_s='cp -p'
+      as_ln_s='cp -pR'
   elif ln conf$$.file conf$$ 2>/dev/null; then
     as_ln_s=ln
   else
-    as_ln_s='cp -p'
+    as_ln_s='cp -pR'
   fi
 else
-  as_ln_s='cp -p'
+  as_ln_s='cp -pR'
 fi
 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
 rmdir conf$$.dir 2>/dev/null
@@ -6175,28 +6300,16 @@ else
   as_mkdir_p=false
 fi
 
-if test -x / >/dev/null 2>&1; then
-  as_test_x='test -x'
-else
-  if ls -dL / >/dev/null 2>&1; then
-    as_ls_L_option=L
-  else
-    as_ls_L_option=
-  fi
-  as_test_x='
-    eval sh -c '\''
-      if test -d "$1"; then
-       test -d "$1/.";
-      else
-       case $1 in #(
-       -*)set "./$1";;
-       esac;
-       case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
-       ???[sx]*):;;*)false;;esac;fi
-    '\'' sh
-  '
-fi
-as_executable_p=$as_test_x
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
 
 # Sed expression to map a string onto a valid CPP name.
 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
@@ -6217,8 +6330,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by renderer-service-upnp $as_me 0.0.4, which was
-generated by GNU Autoconf 2.68.  Invocation command line was
+This file was extended by renderer-service-upnp $as_me 0.2.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -6284,11 +6397,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-renderer-service-upnp config.status 0.0.4
-configured by $0, generated by GNU Autoconf 2.68,
+renderer-service-upnp config.status 0.2.0
+configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2010 Free Software Foundation, Inc.
+Copyright (C) 2012 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -6379,7 +6492,7 @@ fi
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 if \$ac_cs_recheck; then
-  set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
   shift
   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
   CONFIG_SHELL='$SHELL'
index 714ee76..53ed29e 100644 (file)
@@ -1,7 +1,7 @@
 AC_PREREQ([2.66])
 
 AC_INIT([renderer-service-upnp],
-       [0.0.4],
+       [0.2.0],
        [https://github.com/01org/renderer-service-upnp/issues/new],
        ,
        [https://01.org/dleyna/])
@@ -33,9 +33,10 @@ PKG_PROG_PKG_CONFIG(0.16)
 PKG_CHECK_MODULES([DBUS], [dbus-1])
 PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.26.1])
 PKG_CHECK_MODULES([GIO], [gio-2.0 >= 2.26.1])
-PKG_CHECK_MODULES([GUPNP], [gupnp-1.0 >= 0.17.2])
-PKG_CHECK_MODULES([GUPNPAV], [gupnp-av-1.0])
-PKG_CHECK_MODULES([SOUP], [libsoup-2.4])
+PKG_CHECK_MODULES([GSSDP], [gssdp-1.0 >= 0.13.0])
+PKG_CHECK_MODULES([GUPNP], [gupnp-1.0 >= 0.19.0])
+PKG_CHECK_MODULES([GUPNPAV], [gupnp-av-1.0 >= 0.11.0])
+PKG_CHECK_MODULES([SOUP], [libsoup-2.4 >= 2.28.2])
 
 # Checks for header files.
 AC_CHECK_HEADERS([stdlib.h string.h syslog.h])
@@ -172,6 +173,11 @@ AC_SUBST(RSU_INTERFACE_MANAGER)
 AC_DEFINE([RSU_INTERFACE_MANAGER], "com.intel.RendererServiceUPnP.Manager",
                               [d-Bus Name of renderer-service-upnp main interface])
 
+RSU_INTERFACE_RENDERER_DEVICE=com.intel.UPnP.RendererDevice
+AC_SUBST(RSU_INTERFACE_RENDERER_DEVICE)
+AC_DEFINE([RSU_INTERFACE_RENDERER_DEVICE], "com.intel.UPnP.RendererDevice",
+                              [d-Bus Name of renderer-service-upnp device interface])
+
 RSU_INTERFACE_PUSH_HOST=com.intel.RendererServiceUPnP.PushHost
 AC_SUBST(RSU_INTERFACE_PUSH_HOST)
 AC_DEFINE([RSU_INTERFACE_PUSH_HOST], "com.intel.RendererServiceUPnP.PushHost",
index f098187..6f3329b 100644 (file)
@@ -47,6 +47,7 @@ AC_DEFUN_ONCE([RSU_COMPILER_FLAGS], [
                CFLAGS+=" -Wno-overlength-strings"
 
                CFLAGS+=" -DG_DISABLE_DEPRECATED"
+               CFLAGS+=" -DGLIB_DISABLE_DEPRECATION_WARNINGS"
        fi
 
        CFLAGS+=" -Wno-format-extra-args"
index aee9efe..a80c6b1 100644 (file)
@@ -1,2 +1,5 @@
+* Wed Nov 14 11:32:17 CET 2012 - Mark Ryan <mark.d.ryan@intel.com>
+- Submit version 0.2.0 ( f629333 ) of renderer-service-upnp
+
 * Mon Sep 24 15:18:13 CEST 2012 - Mark Ryan <mark.d.ryan@intel.com>
 - Submit version 0.0.4 ( 7fae1bf ) of renderer-service-upnp
index ddef56b..851cc7b 100644 (file)
@@ -7,7 +7,7 @@
 
 Name:       renderer-service-upnp
 Summary:    A high level API for discovering and manipulating digital media renderers.
-Version:    0.0.4
+Version:    0.2.0
 Release:    0
 Group:      System/Libraries
 License:    LGPLv2+
@@ -19,6 +19,7 @@ BuildRequires:  pkgconfig(dbus-1)
 BuildRequires:  pkgconfig(glib-2.0)
 BuildRequires:  pkgconfig(gio-2.0)
 BuildRequires:  pkgconfig(gupnp-1.0)
+BuildRequires:  pkgconfig(gssdp-1.0)
 BuildRequires:  pkgconfig(gupnp-av-1.0)
 BuildRequires:  pkgconfig(libsoup-2.4)
 
index 6e23874..124eabe 100644 (file)
@@ -22,6 +22,7 @@
 
 
 #include <string.h>
+#include <math.h>
 
 #include <libgupnp/gupnp-control-point.h>
 #include <libgupnp-av/gupnp-av.h>
@@ -54,6 +55,8 @@ static void prv_rc_last_change_cb(GUPnPServiceProxy *proxy,
                                  GValue *value,
                                  gpointer user_data);
 
+static void prv_props_update(rsu_device_t *device, rsu_task_t *task);
+
 static void prv_unref_variant(gpointer variant)
 {
        GVariant *var = variant;
@@ -67,6 +70,8 @@ static void prv_props_init(rsu_props_t *props)
                                                  NULL, prv_unref_variant);
        props->player_props = g_hash_table_new_full(g_str_hash, g_str_equal,
                                                    NULL, prv_unref_variant);
+       props->device_props = g_hash_table_new_full(g_str_hash, g_str_equal,
+                                                   NULL, prv_unref_variant);
        props->synced = FALSE;
 }
 
@@ -74,6 +79,7 @@ static void prv_props_free(rsu_props_t *props)
 {
        g_hash_table_unref(props->root_props);
        g_hash_table_unref(props->player_props);
+       g_hash_table_unref(props->device_props);
 }
 
 static void prv_service_proxies_free(rsu_service_proxies_t *service_proxies)
@@ -139,6 +145,9 @@ static void prv_emit_signal_properties_changed(rsu_device_t *device,
                                               const char *interface,
                                               GVariant *changed_props)
 {
+#if RSU_LOG_LEVEL & RSU_LOG_LEVEL_DEBUG
+       gchar *params;
+#endif
        GVariant *val = g_variant_ref_sink(g_variant_new("(s@a{sv}as)",
                                           interface,
                                           changed_props,
@@ -148,7 +157,12 @@ static void prv_emit_signal_properties_changed(rsu_device_t *device,
                      RSU_INTERFACE_PROPERTIES,
                      RSU_INTERFACE_PROPERTIES_CHANGED,
                      device->path);
-       RSU_LOG_DEBUG("Params: %s", g_variant_print(val, FALSE));
+
+#if RSU_LOG_LEVEL & RSU_LOG_LEVEL_DEBUG
+       params = g_variant_print(val, FALSE);
+       RSU_LOG_DEBUG("Params: %s", params);
+       g_free(params);
+#endif
 
        g_dbus_connection_emit_signal(device->connection,
                                      NULL,
@@ -268,6 +282,10 @@ void rsu_device_delete(void *device)
                g_ptr_array_unref(dev->contexts);
                g_free(dev->path);
                prv_props_free(&dev->props);
+
+               if (dev->transport_play_speeds != NULL)
+                       g_ptr_array_free(dev->transport_play_speeds, TRUE);
+               g_free(dev->rate);
                g_free(dev);
        }
 }
@@ -425,7 +443,7 @@ gboolean rsu_device_new(GDBusConnection *connection,
                        rsu_device_t **device)
 {
        rsu_device_t *dev = g_new0(rsu_device_t, 1);
-       GString *new_path = NULL;
+       GString *new_path;
        unsigned int i;
 
        prv_props_init(&dev->props);
@@ -453,13 +471,14 @@ gboolean rsu_device_new(GDBusConnection *connection,
 
        dev->path = g_string_free(new_path, FALSE);
 
+       dev->rate = g_strdup("1");
+
        *device = dev;
        return TRUE;
 
 on_error:
 
-       if (new_path)
-               g_string_free(new_path, TRUE);
+       g_string_free(new_path, TRUE);
 
        rsu_device_delete(dev);
 
@@ -511,7 +530,10 @@ static void prv_get_prop(rsu_async_cb_data_t *cb_data)
        rsu_task_get_prop_t *get_prop = &cb_data->task->ut.get_prop;
        GVariant *res = NULL;
 
-       if (!strcmp(get_prop->interface_name, RSU_INTERFACE_SERVER)) {
+       if (!strcmp(get_prop->interface_name, RSU_INTERFACE_RENDERER_DEVICE)) {
+               res = g_hash_table_lookup(cb_data->device->props.device_props,
+                                         get_prop->prop_name);
+       } else if (!strcmp(get_prop->interface_name, RSU_INTERFACE_SERVER)) {
                res = g_hash_table_lookup(cb_data->device->props.root_props,
                                          get_prop->prop_name);
        } else if (!strcmp(get_prop->interface_name, RSU_INTERFACE_PLAYER)) {
@@ -524,6 +546,11 @@ static void prv_get_prop(rsu_async_cb_data_t *cb_data)
                        res = g_hash_table_lookup(
                                cb_data->device->props.player_props,
                                get_prop->prop_name);
+
+               if (!res)
+                       res = g_hash_table_lookup(
+                               cb_data->device->props.device_props,
+                               get_prop->prop_name);
        } else {
                cb_data->error = g_error_new(RSU_ERROR,
                                             RSU_ERROR_UNKNOWN_INTERFACE,
@@ -561,13 +588,17 @@ static void prv_get_props(rsu_async_cb_data_t *cb_data)
 
        vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
-       if (!strcmp(get_props->interface_name, RSU_INTERFACE_SERVER)) {
+       if (!strcmp(get_props->interface_name, RSU_INTERFACE_RENDERER_DEVICE)) {
+               prv_add_props(cb_data->device->props.device_props, vb);
+       } else if (!strcmp(get_props->interface_name, RSU_INTERFACE_SERVER)) {
                prv_add_props(cb_data->device->props.root_props, vb);
+               prv_add_props(cb_data->device->props.device_props, vb);
        } else if (!strcmp(get_props->interface_name, RSU_INTERFACE_PLAYER)) {
                prv_add_props(cb_data->device->props.player_props, vb);
        } else if (!strcmp(get_props->interface_name, "")) {
                prv_add_props(cb_data->device->props.root_props, vb);
                prv_add_props(cb_data->device->props.player_props, vb);
+               prv_add_props(cb_data->device->props.device_props, vb);
        } else {
                cb_data->error = g_error_new(RSU_ERROR,
                                             RSU_ERROR_UNKNOWN_INTERFACE,
@@ -972,7 +1003,7 @@ static void prv_last_change_cb(GUPnPServiceProxy *proxy,
                    NULL))
                goto on_error;
 
-       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
        if (meta_data) {
                prv_add_track_meta_data(device,
@@ -1018,7 +1049,9 @@ static void prv_last_change_cb(GUPnPServiceProxy *proxy,
                prv_change_props(device->props.player_props,
                                 RSU_INTERFACE_PROP_RATE, val,
                                 changed_props_vb);
-               g_free(play_speed);
+
+               g_free(device->rate);
+               device->rate = play_speed;
        }
 
        if (state) {
@@ -1054,7 +1087,8 @@ static void prv_rc_last_change_cb(GUPnPServiceProxy *proxy,
        GVariantBuilder *changed_props_vb;
        GVariant *changed_props;
        GVariant *val;
-       guint volume;
+       guint device_volume;
+       double mpris_volume;
 
        parser = gupnp_last_change_parser_new();
 
@@ -1062,13 +1096,20 @@ static void prv_rc_last_change_cb(GUPnPServiceProxy *proxy,
                    parser, 0,
                    g_value_get_string(value),
                    NULL,
-                   "Volume", G_TYPE_UINT, &volume,
+                   "Volume", G_TYPE_UINT, &device_volume,
                    NULL))
                goto on_error;
 
-       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+       if (device->props.synced == FALSE)
+               prv_props_update(device, NULL);
+
+       if (device->max_volume == 0)
+               goto on_error;
+
+       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
-       val = g_variant_ref_sink(g_variant_new_uint32(volume));
+       mpris_volume = (double)device_volume / (double)device->max_volume;
+       val = g_variant_ref_sink(g_variant_new_double(mpris_volume));
        prv_change_props(device->props.player_props,
                         RSU_INTERFACE_PROP_VOLUME, val,
                         changed_props_vb);
@@ -1120,7 +1161,7 @@ static void prv_process_protocol_info(rsu_device_t *device,
        types = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
 
        val = g_variant_ref_sink(g_variant_new_string(protocol_info));
-       g_hash_table_insert(device->props.root_props,
+       g_hash_table_insert(device->props.device_props,
                            RSU_INTERFACE_PROP_PROTOCOL_INFO,
                            val);
 
@@ -1198,7 +1239,7 @@ static void prv_get_position_info_cb(GUPnPServiceProxy *proxy,
                goto on_error;
        }
 
-       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
        g_strstrip(rel_pos);
        prv_add_reltime(cb_data->device, rel_pos, changed_props_vb);
@@ -1239,15 +1280,256 @@ static void prv_get_position_info(GCancellable *cancellable,
                                                 NULL);
 }
 
+/***********************************************************************/
+/*  Rational numbers parameters of the following functions are formed  */
+/* like this : Â«2» Â«5/6». A decimal notation like Â«2.6» is not allowed */
+/***********************************************************************/
+static inline long prv_rational_get_numerator(const char *r)
+{
+       return strtol(r, NULL, 10);
+}
+
+static long prv_rational_get_denominator(const char *r)
+{
+       char *div_pos = strstr(r, "/");
+       if (div_pos == NULL)
+               goto exit;
+
+       return strtol(div_pos + 1, NULL, 10);
+
+exit:
+       return 1;
+}
+
+static double prv_rational_to_double(const char *r, double precision)
+{
+       long p;
+       long q;
+       double result;
+
+       p = prv_rational_get_numerator(r);
+       if (p == 0)
+               goto error;
+
+       q = prv_rational_get_denominator(r);
+       if (q == 0)
+               goto error;
+
+       result = (double)p/(double)q;
+
+       if (precision != 0)
+               result = round(result/precision) * precision;
+
+       return result;
+
+error:
+       return 0.0;
+}
+
+static inline gboolean prv_rational_is_invalid(const char *val)
+{
+       return (prv_rational_get_numerator(val) == 0) ||
+               (prv_rational_get_denominator(val) == 0);
+}
+
+static gint prv_compare_rationals(const gchar *a, const gchar *b)
+{
+       long a_numerator = prv_rational_get_numerator(a);
+       long b_numerator = prv_rational_get_numerator(b);
+       long a_denominator = prv_rational_get_denominator(a);
+       long b_denominator = prv_rational_get_denominator(b);
+
+       return (a_numerator * b_denominator) - (b_numerator * a_denominator);
+}
+
+static void prv_get_rates_values(const GUPnPServiceStateVariableInfo *svi,
+                                GVariant **mpris_tp_speeds,
+                                GPtrArray **upnp_tp_speeds,
+                                double *min_rate, double *max_rate)
+{
+       char *rate;
+       char *min_rate_str;
+       char *max_rate_str;
+       GList *list;
+       GVariantBuilder vb;
+       const double precision = 0.01;
+
+       if ((svi == NULL) || (svi->allowed_values == NULL))
+               goto exit;
+
+       g_variant_builder_init(&vb, G_VARIANT_TYPE("ad"));
+
+       list = svi->allowed_values;
+
+       min_rate_str = list->data;
+       max_rate_str = min_rate_str;
+
+       if (*upnp_tp_speeds != NULL)
+               g_ptr_array_free(*upnp_tp_speeds, TRUE);
+
+       *upnp_tp_speeds = g_ptr_array_new_with_free_func(g_free);
+
+       for (; list != NULL; list = list->next) {
+               rate = (char *)list->data;
+
+               if (prv_rational_is_invalid(rate))
+                       continue;
+
+               g_ptr_array_add(*upnp_tp_speeds, g_strdup(rate));
+
+               g_variant_builder_add(&vb, "d",
+                                     prv_rational_to_double(rate, precision));
+
+               if (prv_compare_rationals(min_rate_str, rate) > 0)
+                       min_rate_str = rate;
+               else if (prv_compare_rationals(max_rate_str, rate) < 0)
+                       max_rate_str = rate;
+       }
+
+       *mpris_tp_speeds = g_variant_builder_end(&vb);
+
+       *min_rate = prv_rational_to_double(min_rate_str, precision);
+       *max_rate = prv_rational_to_double(max_rate_str, precision);
+
+exit:
+       return;
+}
+
+static void prv_get_services_states_values(GUPnPDeviceInfo *info,
+                                          GVariant **mpris_tp_speeds,
+                                          GPtrArray **upnp_tp_speeds,
+                                          guint *max_volume,
+                                          double *min_rate, double *max_rate)
+{
+       const GUPnPServiceStateVariableInfo *svi;
+       GList *services;
+       GList *service;
+       GError *error;
+       GUPnPServiceInfo *sinfo;
+       GUPnPServiceIntrospection *introspection;
+       const char *service_type;
+
+       services = gupnp_device_info_list_services(info);
+       if (services == NULL)
+               goto exit;
+
+       for (service = services; service != NULL; service = service->next) {
+               sinfo = GUPNP_SERVICE_INFO(service->data);
+               service_type = gupnp_service_info_get_service_type(sinfo);
+
+               if (!g_strrstr(service_type, ":service:AVTransport:") &&
+                   !g_strrstr(service_type, ":service:RenderingControl:")) {
+                       g_object_unref(service->data);
+                       continue;
+               }
+
+               error = NULL;
+               introspection = gupnp_service_info_get_introspection(sinfo,
+                                                                    &error);
+               if (error != NULL) {
+                       RSU_LOG_DEBUG("failed to fetch introspection file "
+                                     "for %s", service_type);
+                       g_error_free(error);
+                       g_object_unref(service->data);
+                       continue;
+               }
+
+               if (g_strrstr(service_type, ":service:AVTransport:")) {
+                       svi = gupnp_service_introspection_get_state_variable(
+                               introspection, "TransportPlaySpeed");
+
+                       prv_get_rates_values(svi,
+                                            mpris_tp_speeds, upnp_tp_speeds,
+                                            min_rate, max_rate);
+               } else {
+                       svi = gupnp_service_introspection_get_state_variable(
+                               introspection, "Volume");
+                       if (svi != NULL)
+                               *max_volume = g_value_get_uint(&svi->maximum);
+               }
+
+               g_object_unref(service->data);
+               g_object_unref(introspection);
+       }
+
+       g_list_free(services);
+
+exit:
+       return;
+}
+
+static void prv_update_device_props(GUPnPDeviceInfo *proxy, GHashTable *props)
+{
+       GVariant *val;
+       gchar *str;
+
+       val = g_variant_ref_sink(g_variant_new_string(
+                               gupnp_device_info_get_device_type(proxy)));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_DEVICE_TYPE, val);
+
+       val = g_variant_ref_sink(g_variant_new_string(
+                                       gupnp_device_info_get_udn(proxy)));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_UDN, val);
+
+       str = gupnp_device_info_get_friendly_name(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_FRIENDLY_NAME, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_icon_url(proxy, NULL, -1, -1, -1, FALSE,
+                                            NULL, NULL, NULL, NULL);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_ICON_URL, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_manufacturer(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_MANUFACTURER, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_manufacturer_url(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_MANUFACTURER_URL, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_model_description(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_MODEL_DESCRIPTION, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_model_name(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_MODEL_NAME, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_model_number(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_MODEL_NUMBER, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_serial_number(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_SERIAL_NUMBER, val);
+       g_free(str);
+
+       str = gupnp_device_info_get_presentation_url(proxy);
+       val = g_variant_ref_sink(g_variant_new_string(str));
+       g_hash_table_insert(props, RSU_INTERFACE_PROP_PRESENTATION_URL, val);
+       g_free(str);
+
+}
+
 static void prv_props_update(rsu_device_t *device, rsu_task_t *task)
 {
        GVariant *val;
        GUPnPDeviceInfo *info;
        rsu_device_context_t *context;
        rsu_props_t *props = &device->props;
-       gchar *friendly_name;
        GVariantBuilder *changed_props_vb;
        GVariant *changed_props;
+       double min_rate = 0;
+       double max_rate = 0;
+       GVariant *mpris_transport_play_speeds = NULL;
 
        context = rsu_device_get_context(device);
 
@@ -1266,27 +1548,42 @@ static void prv_props_update(rsu_device_t *device, rsu_task_t *task)
                            RSU_INTERFACE_PROP_HAS_TRACK_LIST,
                            g_variant_ref(val));
 
-       /* TODO:  The following properties require information to
-          be read out of the service file to be properly implemented.
-          The problem is that GUPnP does not currently allow you to
-          cancel requests to access the service file */
-
        info = (GUPnPDeviceInfo *) context->device_proxy;
-       friendly_name = gupnp_device_info_get_friendly_name(info);
-       val = g_variant_ref_sink(g_variant_new_string(friendly_name));
-       g_free(friendly_name);
+
+       prv_update_device_props(info, props->device_props);
+
+       val = g_hash_table_lookup(props->device_props,
+                           RSU_INTERFACE_PROP_FRIENDLY_NAME);
        g_hash_table_insert(props->root_props, RSU_INTERFACE_PROP_IDENTITY,
-                           val);
+                           g_variant_ref(val));
 
-       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE_ARRAY);
+       changed_props_vb = g_variant_builder_new(G_VARIANT_TYPE("a{sv}"));
 
-       val = g_variant_ref_sink(g_variant_new_double(1.0));
-       prv_change_props(device->props.player_props,
-                        RSU_INTERFACE_PROP_MINIMUM_RATE, val,
-                        changed_props_vb);
-       prv_change_props(device->props.player_props,
-                        RSU_INTERFACE_PROP_MAXIMUM_RATE, g_variant_ref(val),
-                        changed_props_vb);
+       prv_get_services_states_values(info, &mpris_transport_play_speeds,
+                                      &device->transport_play_speeds,
+                                      &device->max_volume,
+                                      &min_rate, &max_rate);
+
+       if (min_rate != 0) {
+               val = g_variant_ref_sink(g_variant_new_double(min_rate));
+               prv_change_props(device->props.player_props,
+                                RSU_INTERFACE_PROP_MINIMUM_RATE, val,
+                                changed_props_vb);
+       }
+
+       if (max_rate != 0) {
+               val = g_variant_ref_sink(g_variant_new_double(max_rate));
+               prv_change_props(device->props.player_props,
+                                RSU_INTERFACE_PROP_MAXIMUM_RATE,
+                                val, changed_props_vb);
+       }
+
+       if (mpris_transport_play_speeds != NULL) {
+               val = g_variant_ref_sink(mpris_transport_play_speeds);
+               prv_change_props(device->props.player_props,
+                                RSU_INTERFACE_PROP_TRANSPORT_PLAY_SPEEDS,
+                                val, changed_props_vb);
+       }
 
        prv_add_all_actions(device, changed_props_vb);
        device->props.synced = TRUE;
@@ -1314,6 +1611,178 @@ static void prv_complete_get_props(rsu_async_cb_data_t *cb_data)
        g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id);
 }
 
+static void prv_simple_call_cb(GUPnPServiceProxy *proxy,
+                              GUPnPServiceProxyAction *action,
+                              gpointer user_data)
+{
+       rsu_async_cb_data_t *cb_data = user_data;
+       GError *upnp_error = NULL;
+
+       if (!gupnp_service_proxy_end_action(cb_data->proxy, cb_data->action,
+                                           &upnp_error, NULL)) {
+               cb_data->error = g_error_new(RSU_ERROR,
+                                            RSU_ERROR_OPERATION_FAILED,
+                                            "Operation "
+                                            "failed: %s", upnp_error->message);
+               g_error_free(upnp_error);
+       }
+
+       (void) g_idle_add(rsu_async_complete_task, cb_data);
+       g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id);
+}
+
+static void prv_set_volume(rsu_async_cb_data_t *cb_data, GVariant *params)
+{
+       double volume;
+
+       volume = g_variant_get_double(params) * cb_data->device->max_volume;
+
+       cb_data->action =
+               gupnp_service_proxy_begin_action(cb_data->proxy, "SetVolume",
+                                                prv_simple_call_cb, cb_data,
+                                                "InstanceID", G_TYPE_INT, 0,
+                                                "Channel",
+                                                G_TYPE_STRING, "Master",
+                                                "DesiredVolume",
+                                                G_TYPE_UINT, (guint) volume,
+                                                NULL);
+}
+
+static GVariant *prv_get_rate_value_from_double(GVariant *params,
+                                               gchar **upnp_rate,
+                                               rsu_async_cb_data_t *cb_data)
+{
+       GVariant *val = NULL;
+       GVariant *tps;
+       GVariantIter iter;
+       double tps_value;
+       double mpris_rate;
+       GPtrArray *upnp_tp_speeds;
+       int i;
+
+       tps = g_hash_table_lookup(cb_data->device->props.player_props,
+                                 RSU_INTERFACE_PROP_TRANSPORT_PLAY_SPEEDS);
+
+       if (tps == NULL) {
+               cb_data->error = g_error_new(RSU_ERROR,
+                                            RSU_ERROR_OPERATION_FAILED,
+                                            "TransportPlaySpeeds list"
+                                            " is empty");
+               goto exit;
+       }
+
+       mpris_rate = g_variant_get_double(params);
+
+       upnp_tp_speeds = cb_data->device->transport_play_speeds;
+
+       i = 0;
+
+       g_variant_iter_init(&iter, tps);
+       while (g_variant_iter_next(&iter, "d", &tps_value)) {
+
+               if (fabs(mpris_rate - tps_value) <= 0.01) {
+                       val = g_variant_ref_sink(
+                               g_variant_new_double(tps_value));
+
+                       *upnp_rate = g_ptr_array_index(upnp_tp_speeds, i);
+
+                       break;
+               }
+
+               i++;
+       }
+
+       if (val == NULL)
+               cb_data->error =
+                       g_error_new(RSU_ERROR, RSU_ERROR_BAD_QUERY,
+                                   "Value %.2f not in TransportPlaySpeeds",
+                                   mpris_rate);
+
+exit:
+
+       return val;
+}
+
+static void prv_set_rate(GVariant *params, rsu_async_cb_data_t *cb_data)
+{
+       GVariant *val;
+       gchar *rate;
+
+       if (g_variant_is_of_type(params, G_VARIANT_TYPE_DOUBLE) == FALSE) {
+               cb_data->error = g_error_new(RSU_ERROR, RSU_ERROR_BAD_QUERY,
+                                            "Parameter is not a double");
+               goto exit;
+       }
+
+       rate = NULL;
+
+       val = prv_get_rate_value_from_double(params, &rate, cb_data);
+       if (val == NULL)
+               goto exit;
+
+       g_free(cb_data->device->rate);
+       cb_data->device->rate = g_strdup(rate);
+
+       prv_change_props(cb_data->device->props.player_props,
+                        RSU_INTERFACE_PROP_RATE, val, NULL);
+
+exit:
+
+       return;
+}
+
+void rsu_device_set_prop(rsu_device_t *device, rsu_task_t *task,
+                        GCancellable *cancellable,
+                        rsu_upnp_task_complete_t cb,
+                        void *user_data)
+{
+       rsu_async_cb_data_t *cb_data;
+       rsu_device_context_t *context;
+       rsu_task_set_prop_t *set_prop = &task->ut.set_prop;
+
+       cb_data = rsu_async_cb_data_new(task, cb, user_data, NULL, NULL,
+                                       device);
+
+       if (g_strcmp0(set_prop->interface_name, RSU_INTERFACE_PLAYER) != 0 &&
+           g_strcmp0(set_prop->interface_name, "") != 0) {
+               cb_data->error = g_error_new(RSU_ERROR,
+                                            RSU_ERROR_UNKNOWN_INTERFACE,
+                                            "Interface %s not managed "
+                                            "for property setting",
+                                            set_prop->interface_name);
+               goto exit;
+       }
+
+       if (g_strcmp0(set_prop->prop_name, RSU_INTERFACE_PROP_RATE) == 0) {
+               prv_set_rate(set_prop->params, cb_data);
+               goto exit;
+       }
+
+       if (g_strcmp0(set_prop->prop_name, RSU_INTERFACE_PROP_VOLUME) != 0) {
+               cb_data->error = g_error_new(RSU_ERROR,
+                                            RSU_ERROR_UNKNOWN_PROPERTY,
+                                            "Property %s not managed for"
+                                            " setting", set_prop->prop_name);
+               goto exit;
+       }
+
+       context = rsu_device_get_context(device);
+
+       cb_data->cancel_id =
+               g_cancellable_connect(cancellable,
+                                     G_CALLBACK(rsu_async_task_cancelled),
+                                     cb_data, NULL);
+       cb_data->cancellable = cancellable;
+       cb_data->proxy = context->service_proxies.rc_proxy;
+
+       prv_set_volume(cb_data, set_prop->params);
+       return;
+
+exit:
+
+       g_idle_add(rsu_async_complete_task, cb_data);
+}
+
 void rsu_device_get_prop(rsu_device_t *device, rsu_task_t *task,
                         GCancellable *cancellable,
                         rsu_upnp_task_complete_t cb,
@@ -1389,26 +1858,6 @@ void rsu_device_get_all_props(rsu_device_t *device, rsu_task_t *task,
        }
 }
 
-static void prv_simple_call_cb(GUPnPServiceProxy *proxy,
-                              GUPnPServiceProxyAction *action,
-                              gpointer user_data)
-{
-       rsu_async_cb_data_t *cb_data = user_data;
-       GError *upnp_error = NULL;
-
-       if (!gupnp_service_proxy_end_action(cb_data->proxy, cb_data->action,
-                                           &upnp_error, NULL)) {
-               cb_data->error = g_error_new(RSU_ERROR,
-                                            RSU_ERROR_OPERATION_FAILED,
-                                            "Operation "
-                                            "failed: %s", upnp_error->message);
-               g_error_free(upnp_error);
-       }
-
-       (void) g_idle_add(rsu_async_complete_task, cb_data);
-       g_cancellable_disconnect(cb_data->cancellable, cb_data->cancel_id);
-}
-
 void rsu_device_play(rsu_device_t *device, rsu_task_t *task,
                     GCancellable *cancellable,
                     rsu_upnp_task_complete_t cb,
@@ -1433,8 +1882,8 @@ void rsu_device_play(rsu_device_t *device, rsu_task_t *task,
                                                 prv_simple_call_cb,
                                                 cb_data,
                                                 "InstanceID", G_TYPE_INT, 0,
-                                                "Speed", G_TYPE_STRING, "1",
-                                                NULL);
+                                                "Speed", G_TYPE_STRING,
+                                                device->rate, NULL);
 }
 
 void rsu_device_play_pause(rsu_device_t *device, rsu_task_t *task,
@@ -1480,6 +1929,7 @@ static void prv_simple_command(rsu_device_t *device, rsu_task_t *task,
                                                 "InstanceID", G_TYPE_INT, 0,
                                                 NULL);
 }
+
 void rsu_device_pause(rsu_device_t *device, rsu_task_t *task,
                      GCancellable *cancellable,
                      rsu_upnp_task_complete_t cb,
index 53bbe86..8931fce 100644 (file)
@@ -56,6 +56,7 @@ typedef struct rsu_props_t_ rsu_props_t;
 struct rsu_props_t_ {
        GHashTable *root_props;
        GHashTable *player_props;
+       GHashTable *device_props;
        gboolean synced;
 };
 
@@ -67,6 +68,9 @@ struct rsu_device_t_ {
        gpointer current_task;
        rsu_props_t props;
        guint timeout_id;
+       guint max_volume;
+       GPtrArray *transport_play_speeds;
+       gchar *rate;
 };
 
 gboolean rsu_device_new(GDBusConnection *connection,
@@ -86,6 +90,10 @@ rsu_device_t *rsu_device_from_path(const gchar *path, GHashTable *device_list);
 rsu_device_context_t *rsu_device_get_context(rsu_device_t *device);
 void rsu_device_subscribe_to_service_changes(rsu_device_t *device);
 
+void rsu_device_set_prop(rsu_device_t *device, rsu_task_t *task,
+                        GCancellable *cancellable,
+                        rsu_upnp_task_complete_t cb,
+                        void *user_data);
 void rsu_device_get_prop(rsu_device_t *device, rsu_task_t *task,
                        GCancellable *cancellable,
                        rsu_upnp_task_complete_t cb,
index 1de5853..3608ab7 100644 (file)
@@ -36,7 +36,6 @@
 #define RSU_INTERFACE_PROP_IDENTITY "Identity"
 #define RSU_INTERFACE_PROP_SUPPORTED_URIS "SupportedUriSchemes"
 #define RSU_INTERFACE_PROP_SUPPORTED_MIME "SupportedMimeTypes"
-#define RSU_INTERFACE_PROP_PROTOCOL_INFO "ProtocolInfo"
 
 #define RSU_INTERFACE_PROP_PLAYBACK_STATUS "PlaybackStatus"
 #define RSU_INTERFACE_PROP_RATE "Rate"
 #define RSU_INTERFACE_PROP_CAN_PREVIOUS "CanGoPrevious"
 #define RSU_INTERFACE_PROP_POSITION "Position"
 #define RSU_INTERFACE_PROP_METADATA "Metadata"
+#define RSU_INTERFACE_PROP_TRANSPORT_PLAY_SPEEDS "TransportPlaySpeeds"
 #define RSU_INTERFACE_PROP_MINIMUM_RATE "MinimumRate"
 #define RSU_INTERFACE_PROP_MAXIMUM_RATE "MaximumRate"
 #define RSU_INTERFACE_PROP_VOLUME "Volume"
 
+#define RSU_INTERFACE_PROP_DEVICE_TYPE "DeviceType"
+#define RSU_INTERFACE_PROP_UDN "UDN"
+#define RSU_INTERFACE_PROP_FRIENDLY_NAME "FriendlyName"
+#define RSU_INTERFACE_PROP_ICON_URL "IconURL"
+#define RSU_INTERFACE_PROP_MANUFACTURER "Manufacturer"
+#define RSU_INTERFACE_PROP_MANUFACTURER_URL "ManufacturerUrl"
+#define RSU_INTERFACE_PROP_MODEL_DESCRIPTION "ModelDescription"
+#define RSU_INTERFACE_PROP_MODEL_NAME "ModelName"
+#define RSU_INTERFACE_PROP_MODEL_NUMBER "ModelNumber"
+#define RSU_INTERFACE_PROP_SERIAL_NUMBER "SerialNumber"
+#define RSU_INTERFACE_PROP_PRESENTATION_URL "PresentationURL"
+#define RSU_INTERFACE_PROP_PROTOCOL_INFO "ProtocolInfo"
+
 #endif
index 8450610..5c7fd7c 100644 (file)
@@ -58,6 +58,7 @@
 #define RSU_INTERFACE_INVALIDATED_PROPERTIES "invalidated_properties"
 #define RSU_INTERFACE_GET "Get"
 #define RSU_INTERFACE_GET_ALL "GetAll"
+#define RSU_INTERFACE_SET "Set"
 #define RSU_INTERFACE_INTERFACE_NAME "interface_name"
 #define RSU_INTERFACE_PROPERTY_NAME "property_name"
 #define RSU_INTERFACE_PROPERTIES_VALUE "properties"
@@ -137,6 +138,14 @@ static const gchar g_rsu_server_introspection[] =
        "      <arg type='a{sv}' name='"RSU_INTERFACE_PROPERTIES_VALUE"'"
        "           direction='out'/>"
        "    </method>"
+       "    <method name='"RSU_INTERFACE_SET"'>"
+       "      <arg type='s' name='"RSU_INTERFACE_INTERFACE_NAME"'"
+       "           direction='in'/>"
+       "      <arg type='s' name='"RSU_INTERFACE_PROPERTY_NAME"'"
+       "           direction='in'/>"
+       "      <arg type='v' name='"RSU_INTERFACE_VALUE"'"
+       "           direction='in'/>"
+       "    </method>"
        "    <signal name='"RSU_INTERFACE_PROPERTIES_CHANGED"'>"
        "      <arg type='s' name='"RSU_INTERFACE_INTERFACE_NAME"'/>"
        "      <arg type='a{sv}' name='"RSU_INTERFACE_CHANGED_PROPERTIES"'/>"
@@ -162,8 +171,6 @@ static const gchar g_rsu_server_introspection[] =
        "       access='read'/>"
        "    <property type='as' name='"RSU_INTERFACE_PROP_SUPPORTED_MIME"'"
        "       access='read'/>"
-       "    <property type='s' name='"RSU_INTERFACE_PROP_PROTOCOL_INFO"'"
-       "       access='read'/>"
        "  </interface>"
        "  <interface name='"RSU_INTERFACE_PLAYER"'>"
        "    <method name='"RSU_INTERFACE_PLAY"'>"
@@ -200,8 +207,11 @@ static const gchar g_rsu_server_introspection[] =
        "       access='read'/>"
        "    <property type='d' name='"RSU_INTERFACE_PROP_MAXIMUM_RATE"'"
        "       access='read'/>"
-       "    <property type='d' name='"RSU_INTERFACE_PROP_VOLUME"'"
+       "    <property type='ad'"
+       "       name='"RSU_INTERFACE_PROP_TRANSPORT_PLAY_SPEEDS"'"
        "       access='read'/>"
+       "    <property type='d' name='"RSU_INTERFACE_PROP_VOLUME"'"
+       "       access='readwrite'/>"
        "    <property type='b' name='"RSU_INTERFACE_PROP_CAN_PLAY"'"
        "       access='read'/>"
        "    <property type='b' name='"RSU_INTERFACE_PROP_CAN_SEEK"'"
@@ -231,9 +241,34 @@ static const gchar g_rsu_server_introspection[] =
        "           direction='in'/>"
        "    </method>"
        "  </interface>"
+       "  <interface name='"RSU_INTERFACE_RENDERER_DEVICE"'>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_DEVICE_TYPE"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_UDN"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_FRIENDLY_NAME"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_ICON_URL"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_MANUFACTURER"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_MANUFACTURER_URL"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_MODEL_DESCRIPTION"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_MODEL_NAME"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_MODEL_NUMBER"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_SERIAL_NUMBER"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_PRESENTATION_URL"'"
+       "       access='read'/>"
+       "    <property type='s' name='"RSU_INTERFACE_PROP_PROTOCOL_INFO"'"
+       "       access='read'/>"
+       "  </interface>"
        "</node>";
 
-
 static gboolean prv_process_task(gpointer user_data);
 
 static void prv_rsu_method_call(GDBusConnection *conn,
@@ -281,6 +316,15 @@ static void prv_rsu_push_host_method_call(GDBusConnection *conn,
                                          GDBusMethodInvocation *invocation,
                                          gpointer user_data);
 
+static void prv_renderer_device_method_call(GDBusConnection *conn,
+                                           const gchar *sender,
+                                           const gchar *object,
+                                           const gchar *interface,
+                                           const gchar *method,
+                                           GVariant *parameters,
+                                           GDBusMethodInvocation *invocation,
+                                           gpointer user_data);
+
 static const GDBusInterfaceVTable g_rsu_vtable = {
        prv_rsu_method_call,
        NULL,
@@ -311,11 +355,18 @@ static const GDBusInterfaceVTable g_rsu_push_host_vtable = {
        NULL
 };
 
+static const GDBusInterfaceVTable g_device_vtable = {
+       prv_renderer_device_method_call,
+       NULL,
+       NULL
+};
+
 static const GDBusInterfaceVTable *g_server_vtables[RSU_INTERFACE_INFO_MAX] = {
        &g_props_vtable,
        &g_rsu_device_vtable,
        &g_rsu_player_vtable,
-       &g_rsu_push_host_vtable
+       &g_rsu_push_host_vtable,
+       &g_device_vtable
 };
 
 static void prv_free_rsu_task_cb(gpointer data, gpointer user_data)
@@ -390,6 +441,11 @@ static void prv_process_async_task(rsu_context_t *context, rsu_task_t *task)
                                       context->cancellable,
                                       prv_async_task_complete, context);
                break;
+       case RSU_TASK_SET_PROP:
+               rsu_upnp_set_prop(context->upnp, task,
+                                 context->cancellable,
+                                 prv_async_task_complete, context);
+               break;
        case RSU_TASK_PLAY:
                rsu_upnp_play(context->upnp, task,
                              context->cancellable,
@@ -651,6 +707,8 @@ static void prv_props_method_call(GDBusConnection *conn,
                task = rsu_task_get_props_new(invocation, object, parameters);
        else if (!strcmp(method, RSU_INTERFACE_GET))
                task = rsu_task_get_prop_new(invocation, object, parameters);
+       else if (!strcmp(method, RSU_INTERFACE_SET))
+               task = rsu_task_set_prop_new(invocation, object, parameters);
        else
                goto finished;
 
@@ -756,6 +814,18 @@ on_error:
        return;
 }
 
+static void prv_renderer_device_method_call(GDBusConnection *conn,
+                                           const gchar *sender,
+                                           const gchar *object,
+                                           const gchar *interface,
+                                           const gchar *method,
+                                           GVariant *parameters,
+                                           GDBusMethodInvocation *invocation,
+                                           gpointer user_data)
+{
+       /* Nothing right now */
+}
+
 static void prv_found_media_server(const gchar *path, void *user_data)
 {
        rsu_context_t *context = user_data;
index 280a14e..7af19d1 100644 (file)
@@ -74,7 +74,7 @@ static void prv_rsu_settings_get_keyfile_path(gchar **sys_path,
        if (sys_path != NULL) {
                *sys_path = NULL;
 
-               if (SYS_CONFIG_DIR && *SYS_CONFIG_DIR)
+               if (*SYS_CONFIG_DIR)
                        *sys_path = g_strdup_printf("%s/%s", SYS_CONFIG_DIR,
                                                    RSU_SETTINGS_KEYFILE_NAME);
        }
index d4f1ef0..f2961e0 100644 (file)
@@ -81,6 +81,11 @@ static void prv_rsu_task_delete(rsu_task_t *task)
                g_free(task->ut.get_prop.interface_name);
                g_free(task->ut.get_prop.prop_name);
                break;
+       case RSU_TASK_SET_PROP:
+               g_free(task->ut.set_prop.interface_name);
+               g_free(task->ut.set_prop.prop_name);
+               g_variant_unref(task->ut.set_prop.params);
+               break;
        case RSU_TASK_OPEN_URI:
                g_free(task->ut.open_uri.uri);
                break;
@@ -147,6 +152,22 @@ rsu_task_t *rsu_task_get_props_new(GDBusMethodInvocation *invocation,
        return task;
 }
 
+rsu_task_t *rsu_task_set_prop_new(GDBusMethodInvocation *invocation,
+                                 const gchar *path, GVariant *parameters)
+{
+       rsu_task_t *task;
+
+       task = prv_device_task_new(RSU_TASK_SET_PROP, invocation, path, NULL);
+
+       g_variant_get(parameters, "(ssv)", &task->ut.set_prop.interface_name,
+                     &task->ut.set_prop.prop_name, &task->ut.set_prop.params);
+
+       g_strstrip(task->ut.set_prop.interface_name);
+       g_strstrip(task->ut.set_prop.prop_name);
+
+       return task;
+}
+
 rsu_task_t *rsu_task_play_new(GDBusMethodInvocation *invocation,
                              const gchar *path)
 {
index 4b406ad..7fb4954 100644 (file)
@@ -31,6 +31,7 @@ enum rsu_task_type_t_ {
        RSU_TASK_GET_SERVERS,
        RSU_TASK_RAISE,
        RSU_TASK_QUIT,
+       RSU_TASK_SET_PROP,
        RSU_TASK_GET_ALL_PROPS,
        RSU_TASK_GET_PROP,
        RSU_TASK_PAUSE,
@@ -60,6 +61,13 @@ struct rsu_task_get_prop_t_ {
        gchar *interface_name;
 };
 
+typedef struct rsu_task_set_prop_t_ rsu_task_set_prop_t;
+struct rsu_task_set_prop_t_ {
+       gchar *prop_name;
+       gchar *interface_name;
+       GVariant *params;
+};
+
 typedef struct rsu_task_open_uri_t_ rsu_task_open_uri_t;
 struct rsu_task_open_uri_t_ {
        gchar *uri;
@@ -87,6 +95,7 @@ struct rsu_task_t_ {
        union {
                rsu_task_get_props_t get_props;
                rsu_task_get_prop_t get_prop;
+               rsu_task_set_prop_t set_prop;
                rsu_task_open_uri_t open_uri;
                rsu_task_host_uri_t host_uri;
                rsu_task_seek_t seek;
@@ -97,6 +106,8 @@ rsu_task_t *rsu_task_get_version_new(GDBusMethodInvocation *invocation);
 rsu_task_t *rsu_task_get_servers_new(GDBusMethodInvocation *invocation);
 rsu_task_t *rsu_task_raise_new(GDBusMethodInvocation *invocation);
 rsu_task_t *rsu_task_quit_new(GDBusMethodInvocation *invocation);
+rsu_task_t *rsu_task_set_prop_new(GDBusMethodInvocation *invocation,
+                                 const gchar *path, GVariant *parameters);
 rsu_task_t *rsu_task_get_prop_new(GDBusMethodInvocation *invocation,
                                  const gchar *path, GVariant *parameters);
 rsu_task_t *rsu_task_get_props_new(GDBusMethodInvocation *invocation,
index ee7f858..f978cd7 100644 (file)
@@ -22,6 +22,7 @@
 
 #include <string.h>
 
+#include <libgssdp/gssdp-resource-browser.h>
 #include <libgupnp/gupnp-context-manager.h>
 #include <libgupnp/gupnp-error.h>
 
@@ -243,6 +244,30 @@ GVariant *rsu_upnp_get_server_ids(rsu_upnp_t *upnp)
        return g_variant_ref_sink(g_variant_builder_end(&vb));
 }
 
+void rsu_upnp_set_prop(rsu_upnp_t *upnp, rsu_task_t *task,
+                      GCancellable *cancellable,
+                      rsu_upnp_task_complete_t cb,
+                      void *user_data)
+{
+       rsu_device_t *device;
+       rsu_async_cb_data_t *cb_data;
+
+       device = rsu_device_from_path(task->path, upnp->server_udn_map);
+
+       if (!device) {
+               cb_data = rsu_async_cb_data_new(task, cb, user_data, NULL, NULL,
+                                               NULL);
+               cb_data->error = g_error_new(RSU_ERROR,
+                                            RSU_ERROR_OBJECT_NOT_FOUND,
+                                            "Cannot locate a device"
+                                            " for the specified "
+                                            "object");
+               (void) g_idle_add(rsu_async_complete_task, cb_data);
+       } else {
+               rsu_device_set_prop(device, task, cancellable, cb, user_data);
+       }
+}
+
 void rsu_upnp_get_prop(rsu_upnp_t *upnp, rsu_task_t *task,
                       GCancellable *cancellable,
                       rsu_upnp_task_complete_t cb,
index 7e32d17..c2a088d 100644 (file)
@@ -32,6 +32,7 @@ enum rsu_interface_type_ {
        RSU_INTERFACE_INFO_ROOT,
        RSU_INTERFACE_INFO_PLAYER,
        RSU_INTERFACE_INFO_PUSH_HOST,
+       RSU_INTERFACE_INFO_DEVICE,
        RSU_INTERFACE_INFO_MAX
 };
 
@@ -52,6 +53,10 @@ rsu_upnp_t *rsu_upnp_new(GDBusConnection *connection,
                         void *user_data);
 void rsu_upnp_delete(rsu_upnp_t *upnp);
 GVariant *rsu_upnp_get_server_ids(rsu_upnp_t *upnp);
+void rsu_upnp_set_prop(rsu_upnp_t *upnp, rsu_task_t *task,
+                      GCancellable *cancellable,
+                      rsu_upnp_task_complete_t cb,
+                      void *user_data);
 void rsu_upnp_get_prop(rsu_upnp_t *upnp, rsu_task_t *task,
                       GCancellable *cancellable,
                       rsu_upnp_task_complete_t cb,