added | libupnpp/md5.hxx |
added | libupnpp/soaphelp.cxx |
added | libupnpp/getsyshwaddr.c |
added | libupnpp/getsyshwaddr.h |
added | libupnpp/vdir.cxx |
added | libupnpp/md5.cxx |
added | libupnpp/vdir.hxx |
added | libupnpp/soaphelp.hxx |
added | upmpd/mpdcli.hxx |
added | upmpd/mpdcli.cxx |
added | autogen.sh |
removed | libupnpp/dircontent.lo |
removed | libupnpp/directory.lo |
changed | libupnpp/cdirectory.cxx |
changed | libupnpp/cdirectory.hxx |
changed | libupnpp/config.h.in |
changed | libupnpp/discovery.cxx |
changed | libupnpp/discovery.hxx |
changed | libupnpp/upnpp_p.hxx |
changed | libupnpp/upnpplib.cxx |
changed | libupnpp/upnpplib.hxx |
changed | upexplo/upexplo.cxx |
changed | Makefile.am |
changed | configure.ac |
copied | Makefile.in -> upmpd/upmpd.cxx |
libupnpp/dircontent.lo
File was removed.
libupnpp/directory.lo
File was removed.
Makefile.in to upmpd/upmpd.cxx
--- a/Makefile.in +++ b/upmpd/upmpd.cxx @@ -1,859 +1,504 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software -# Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - -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@ -pkglibexecdir = $(libexecdir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -bin_PROGRAMS = upexplorer$(EXEEXT) -subdir = . -DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(top_srcdir)/configure \ - $(top_srcdir)/libupnpp/config.h.in COPYING INSTALL \ - config.guess config.sub depcomp install-sh ltmain.sh missing -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.ac -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(install_sh) -d -CONFIG_HEADER = $(top_builddir)/libupnpp/config.h -CONFIG_CLEAN_FILES = -CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(lib_LTLIBRARIES) -libupnpp_la_LIBADD = -am__dirstamp = $(am__leading_dot)dirstamp -am_libupnpp_la_OBJECTS = libupnpp/cdircontent.lo \ - libupnpp/cdirectory.lo libupnpp/description.lo \ - libupnpp/discovery.lo libupnpp/ixmlwrap.lo \ - libupnpp/upnpplib.lo -libupnpp_la_OBJECTS = $(am_libupnpp_la_OBJECTS) -PROGRAMS = $(bin_PROGRAMS) -am_upexplorer_OBJECTS = upexplo/upexplo.$(OBJEXT) -upexplorer_OBJECTS = $(am_upexplorer_OBJECTS) -upexplorer_DEPENDENCIES = libupnpp.la -upexplorer_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(upexplorer_LDFLAGS) $(LDFLAGS) -o $@ -DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/libupnpp -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -am__mv = mv -f -CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -CXXLD = $(CXX) -CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libupnpp_la_SOURCES) $(upexplorer_SOURCES) -DIST_SOURCES = $(libupnpp_la_SOURCES) $(upexplorer_SOURCES) -am__can_run_installinfo = \ - case $$AM_UPDATE_INFO_DIR in \ - n|no|NO) false;; \ - *) (install-info --version) >/dev/null 2>&1;; \ - esac -ETAGS = etags -CTAGS = ctags -DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) -distdir = $(PACKAGE)-$(VERSION) -top_distdir = $(distdir) -am__remove_distdir = \ - if test -d "$(distdir)"; then \ - find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ - && rm -rf "$(distdir)" \ - || { sleep 5 && rm -rf "$(distdir)"; }; \ - else :; fi -DIST_ARCHIVES = $(distdir).tar.gz -GZIP_ENV = --best -distuninstallcheck_listfiles = find . -type f -print -am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ - | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' -distcleancheck_listfiles = find . -type f -print -ACLOCAL = @ACLOCAL@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -DLLTOOL = @DLLTOOL@ -DSYMUTIL = @DSYMUTIL@ -DUMPBIN = @DUMPBIN@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -FGREP = @FGREP@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LD = @LD@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LIPO = @LIPO@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MANIFEST_TOOL = @MANIFEST_TOOL@ -MKDIR_P = @MKDIR_P@ -NM = @NM@ -NMEDIT = @NMEDIT@ -OBJDUMP = @OBJDUMP@ -OBJEXT = @OBJEXT@ -OTOOL = @OTOOL@ -OTOOL64 = @OTOOL64@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_URL = @PACKAGE_URL@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_AR = @ac_ct_AR@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_build_prefix = @top_build_prefix@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -lib_LTLIBRARIES = libupnpp.la -libupnpp_la_SOURCES = \ - libupnpp/cdircontent.cxx \ - libupnpp/cdirectory.cxx \ - libupnpp/description.cxx \ - libupnpp/discovery.cxx \ - libupnpp/ixmlwrap.cxx \ - libupnpp/upnpplib.cxx - -upexplorer_SOURCES = upexplo/upexplo.cxx -upexplorer_LDADD = libupnpp.la -upexplorer_LDFLAGS = -lixml -lupnp -lexpat -lpthread -all: all-am - -.SUFFIXES: -.SUFFIXES: .cxx .lo .o .obj -am--refresh: Makefile - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ - $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ - $(am__cd) $(top_srcdir) && \ - $(AUTOMAKE) --foreign Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - $(am__cd) $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) -$(am__aclocal_m4_deps): - -libupnpp/config.h: libupnpp/stamp-h1 - @if test ! -f $@; then rm -f libupnpp/stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) libupnpp/stamp-h1; else :; fi - -libupnpp/stamp-h1: $(top_srcdir)/libupnpp/config.h.in $(top_builddir)/config.status - @rm -f libupnpp/stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status libupnpp/config.h -$(top_srcdir)/libupnpp/config.h.in: $(am__configure_deps) - ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) - rm -f libupnpp/stamp-h1 - touch $@ - -distclean-hdr: - -rm -f libupnpp/config.h libupnpp/stamp-h1 -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ - } - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libupnpp/$(am__dirstamp): - @$(MKDIR_P) libupnpp - @: > libupnpp/$(am__dirstamp) -libupnpp/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) libupnpp/$(DEPDIR) - @: > libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/cdircontent.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/cdirectory.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/description.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/discovery.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/ixmlwrap.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp/upnpplib.lo: libupnpp/$(am__dirstamp) \ - libupnpp/$(DEPDIR)/$(am__dirstamp) -libupnpp.la: $(libupnpp_la_OBJECTS) $(libupnpp_la_DEPENDENCIES) $(EXTRA_libupnpp_la_DEPENDENCIES) - $(CXXLINK) -rpath $(libdir) $(libupnpp_la_OBJECTS) $(libupnpp_la_LIBADD) $(LIBS) -install-binPROGRAMS: $(bin_PROGRAMS) - @$(NORMAL_INSTALL) - @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 || test -f $$p1; \ - then echo "$$p"; echo "$$p"; else :; fi; \ - done | \ - sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ - -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ - sed 'N;N;N;s,\n, ,g' | \ - $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ - { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ - if ($$2 == $$4) files[d] = files[d] " " $$1; \ - else { print "f", $$3 "/" $$4, $$1; } } \ - END { for (d in files) print "f", d, files[d] }' | \ - while read type dir files; do \ - if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ - test -z "$$files" || { \ - echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ - $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ - } \ - ; done - -uninstall-binPROGRAMS: - @$(NORMAL_UNINSTALL) - @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ - files=`for p in $$list; do echo "$$p"; done | \ - sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ - -e 's/$$/$(EXEEXT)/' `; \ - test -n "$$list" || exit 0; \ - echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ - cd "$(DESTDIR)$(bindir)" && rm -f $$files - -clean-binPROGRAMS: - @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ - echo " rm -f" $$list; \ - rm -f $$list || exit $$?; \ - test -n "$(EXEEXT)" || exit 0; \ - list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f" $$list; \ - rm -f $$list -upexplo/$(am__dirstamp): - @$(MKDIR_P) upexplo - @: > upexplo/$(am__dirstamp) -upexplo/$(DEPDIR)/$(am__dirstamp): - @$(MKDIR_P) upexplo/$(DEPDIR) - @: > upexplo/$(DEPDIR)/$(am__dirstamp) -upexplo/upexplo.$(OBJEXT): upexplo/$(am__dirstamp) \ - upexplo/$(DEPDIR)/$(am__dirstamp) -upexplorer$(EXEEXT): $(upexplorer_OBJECTS) $(upexplorer_DEPENDENCIES) $(EXTRA_upexplorer_DEPENDENCIES) - @rm -f upexplorer$(EXEEXT) - $(upexplorer_LINK) $(upexplorer_OBJECTS) $(upexplorer_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -rm -f libupnpp/cdircontent.$(OBJEXT) - -rm -f libupnpp/cdircontent.lo - -rm -f libupnpp/cdirectory.$(OBJEXT) - -rm -f libupnpp/cdirectory.lo - -rm -f libupnpp/description.$(OBJEXT) - -rm -f libupnpp/description.lo - -rm -f libupnpp/discovery.$(OBJEXT) - -rm -f libupnpp/discovery.lo - -rm -f libupnpp/ixmlwrap.$(OBJEXT) - -rm -f libupnpp/ixmlwrap.lo - -rm -f libupnpp/upnpplib.$(OBJEXT) - -rm -f libupnpp/upnpplib.lo - -rm -f upexplo/upexplo.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/cdircontent.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/cdirectory.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/description.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/discovery.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/ixmlwrap.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libupnpp/$(DEPDIR)/upnpplib.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@upexplo/$(DEPDIR)/upexplo.Po@am__quote@ - -.cxx.o: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< - -.cxx.obj: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ -@am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` - -.cxx.lo: -@am__fastdepCXX_TRUE@ depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ -@am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ -@am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCXX_FALSE@ $(LTCXXCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -rm -rf libupnpp/.libs libupnpp/_libs - -distclean-libtool: - -rm -f libtool config.lt - -ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - mkid -fID $$unique -tags: TAGS - -TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - set x; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - shift; \ - if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - if test $$# -gt 0; then \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - "$$@" $$unique; \ - else \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$unique; \ - fi; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ - unique=`for i in $$list; do \ - if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ - done | \ - $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ - END { if (nonempty) { for (i in files) print i; }; }'`; \ - test -z "$(CTAGS_ARGS)$$unique" \ - || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ - $$unique - -GTAGS: - here=`$(am__cd) $(top_builddir) && pwd` \ - && $(am__cd) $(top_srcdir) \ - && gtags -i $(GTAGS_ARGS) "$$here" - -distclean-tags: - -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags - -distdir: $(DISTFILES) - $(am__remove_distdir) - test -d "$(distdir)" || mkdir "$(distdir)" - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d "$(distdir)/$$file"; then \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ - cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ - find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ - fi; \ - cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ - else \ - test -f "$(distdir)/$$file" \ - || cp -p $$d/$$file "$(distdir)/$$file" \ - || exit 1; \ - fi; \ - done - -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -755 \ - -exec chmod u+rwx,go+rx {} \; -o \ - ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ - ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r "$(distdir)" -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-lzip: distdir - tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz - $(am__remove_distdir) - -dist-lzma: distdir - tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma - $(am__remove_distdir) - -dist-xz: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) - -dist-shar: distdir - shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) - -dist-zip: distdir - -rm -f $(distdir).zip - zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) - -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -# This target untars the dist file and tries a VPATH configuration. Then -# it guarantees that the distribution is self-contained by making another -# tarfile. -distcheck: dist - case '$(DIST_ARCHIVES)' in \ - *.tar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ - *.tar.bz2*) \ - bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.lzma*) \ - lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ - *.tar.lz*) \ - lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ - *.tar.xz*) \ - xz -dc $(distdir).tar.xz | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ - *.zip*) \ - unzip $(distdir).zip ;;\ - esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst - chmod a-w $(distdir) - test -d $(distdir)/_build || exit 0; \ - dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ - && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ - && am__cwd=`pwd` \ - && $(am__cd) $(distdir)/_build \ - && ../configure --srcdir=.. --prefix="$$dc_install_base" \ - $(AM_DISTCHECK_CONFIGURE_FLAGS) \ - $(DISTCHECK_CONFIGURE_FLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) \ - && $(MAKE) $(AM_MAKEFLAGS) dvi \ - && $(MAKE) $(AM_MAKEFLAGS) check \ - && $(MAKE) $(AM_MAKEFLAGS) install \ - && $(MAKE) $(AM_MAKEFLAGS) installcheck \ - && $(MAKE) $(AM_MAKEFLAGS) uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ - distuninstallcheck \ - && chmod -R a-w "$$dc_install_base" \ - && ({ \ - (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ - && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ - distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ - } || { rm -rf "$$dc_destdir"; exit 1; }) \ - && rm -rf "$$dc_destdir" \ - && $(MAKE) $(AM_MAKEFLAGS) dist \ - && rm -rf $(DIST_ARCHIVES) \ - && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ - && cd "$$am__cwd" \ - || exit 1 - $(am__remove_distdir) - @(echo "$(distdir) archives ready for distribution: "; \ - list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ - sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' -distuninstallcheck: - @test -n '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: trying to run $@ with an empty' \ - '$$(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - $(am__cd) '$(distuninstallcheck_dir)' || { \ - echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ - exit 1; \ - }; \ - test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left after uninstall:" ; \ - if test -n "$(DESTDIR)"; then \ - echo " (check DESTDIR support)"; \ - fi ; \ - $(distuninstallcheck_listfiles) ; \ - exit 1; } >&2 -distcleancheck: distclean - @if test '$(srcdir)' = . ; then \ - echo "ERROR: distcleancheck can only run from a VPATH build" ; \ - exit 1 ; \ - fi - @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ - || { echo "ERROR: files left in build directory after distclean:" ; \ - $(distcleancheck_listfiles) ; \ - exit 1; } >&2 -check-am: all-am -check: check-am -all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) -install-binPROGRAMS: install-libLTLIBRARIES - -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - if test -z '$(STRIP)'; then \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - install; \ - else \ - $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ - install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ - "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ - fi -mostlyclean-generic: - -clean-generic: - -distclean-generic: - -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) - -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) - -rm -f libupnpp/$(DEPDIR)/$(am__dirstamp) - -rm -f libupnpp/$(am__dirstamp) - -rm -f upexplo/$(DEPDIR)/$(am__dirstamp) - -rm -f upexplo/$(am__dirstamp) - -maintainer-clean-generic: - @echo "This command is intended for maintainers to use" - @echo "it deletes files that may require special tools to rebuild." -clean: clean-am - -clean-am: clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf libupnpp/$(DEPDIR) upexplo/$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -html-am: - -info: info-am - -info-am: - -install-data-am: - -install-dvi: install-dvi-am - -install-dvi-am: - -install-exec-am: install-binPROGRAMS install-libLTLIBRARIES - -install-html: install-html-am - -install-html-am: - -install-info: install-info-am - -install-info-am: - -install-man: - -install-pdf: install-pdf-am - -install-pdf-am: - -install-ps: install-ps-am - -install-ps-am: - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf libupnpp/$(DEPDIR) upexplo/$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-binPROGRAMS uninstall-libLTLIBRARIES - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-binPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ - dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ - distcheck distclean distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags distcleancheck \ - distdir distuninstallcheck dvi dvi-am html html-am info \ - info-am install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-libLTLIBRARIES install-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - installcheck installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-libLTLIBRARIES - - -# Tell versions [3.59,3.63) of GNU make to not export all variables. -# Otherwise a system limit (for SysV at least) may be exceeded. -.NOEXPORT: +/* Copyright (C) 2014 J.F.Dockes + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the + * Free Software Foundation, Inc., + * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +////////////////////// libupnpp UPnP explorer test program + +#include <stdio.h> +#include <stdlib.h> + +#include <string> +#include <iostream> +#include <vector> +using namespace std; + +#include "libupnpp/upnpplib.hxx" +#include "libupnpp/vdir.hxx" +#include "libupnpp/soaphelp.hxx" + +#include "mpdcli.hxx" + +static const string friendlyName("UpMpd"); +static const string deviceDescription1 = +"<?xml version=\"1.0\"?>\n" +"<root xmlns=\"urn:schemas-upnp-org:device-1-0\">\n" +" <specVersion>\n" +" <major>1</major>\n" +" <minor>0</minor>\n" +" </specVersion>\n" +" <device>\n" +" <deviceType>urn:schemas-upnp-org:device:MediaRenderer:1</deviceType>\n" +" <friendlyName>UpMPD</friendlyName>\n" +" <manufacturer>JF Light Industries</manufacturer>\n" +" <manufacturerURL>http://www.github.com/medoc92/upmpd</manufacturerURL>\n" +" <modelDescription>UPnP front-end to MPD</modelDescription>\n" +" <modelName>UpMPD</modelName>\n" +" <modelNumber>1.0</modelNumber>\n" +" <modelURL>http://www.github.com/medoc92/upmpd</modelURL>\n" +" <serialNumber>72</serialNumber>\n" +" <UDN>uuid:\n" + ; +static const string deviceDescription2 = +"</UDN>\n" +" <serviceList>\n" +" <service>\n" +" <serviceType>urn:schemas-upnp-org:service:RenderingControl:1</serviceType>\n" +" <serviceId>urn:upnp-org:serviceId:RenderingControl</serviceId>\n" +" <SCPDURL>/RenderingControl.xml</SCPDURL>\n" +" <controlURL>/ctl/RenderingControl</controlURL>\n" +" <eventSubURL>/evt/RenderingControl</eventSubURL>\n" +" </service>\n" +" </serviceList>\n" +" <presentationURL>/presentation.html</presentationURL>\n" +" </device>\n" +"</root>\n" +; + +string scdp = +"<?xml version=\"1.0\"?>\n" +"<scpd xmlns=\"urn:schemas-upnp-org:service-1-0\">\n" +" <specVersion>\n" +" <major>1</major>\n" +" <minor>0</minor>\n" +" </specVersion>\n" +" <actionList>\n" +" <action>\n" +" <name>ListPresets</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>CurrentPresetNameList</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>PresetNameList</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>SelectPreset</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>PresetName</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_PresetName</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>GetMute</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>CurrentMute</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>Mute</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>SetMute</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>DesiredMute</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>Mute</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>GetVolume</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>CurrentVolume</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>Volume</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>SetVolume</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>DesiredVolume</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>Volume</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>GetVolumeDB</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>CurrentVolume</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>VolumeDB</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>SetVolumeDB</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>DesiredVolume</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>VolumeDB</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>GetVolumeDBRange</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>MinValue</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>VolumeDB</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>MaxValue</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>VolumeDB</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>GetLoudness</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>CurrentLoudness</name>\n" +" <direction>out</direction>\n" +" <relatedStateVariable>Loudness</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" <action>\n" +" <name>SetLoudness</name>\n" +" <argumentList>\n" +" <argument>\n" +" <name>InstanceID</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_InstanceID</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>Channel</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>A_ARG_TYPE_Channel</relatedStateVariable>\n" +" </argument>\n" +" <argument>\n" +" <name>DesiredLoudness</name>\n" +" <direction>in</direction>\n" +" <relatedStateVariable>Loudness</relatedStateVariable>\n" +" </argument>\n" +" </argumentList>\n" +" </action>\n" +" </actionList>\n" +" <serviceStateTable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>PresetNameList</name>\n" +" <dataType>string</dataType>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"yes\">\n" +" <name>LastChange</name>\n" +" <dataType>string</dataType>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>Mute</name>\n" +" <dataType>boolean</dataType>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>Volume</name>\n" +" <dataType>ui2</dataType>\n" +" <allowedValueRange>\n" +" <minimum>0</minimum>\n" +" <maximum>Vendor defined</maximum>\n" +" <step>1</step>\n" +" </allowedValueRange>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>VolumeDB</name>\n" +" <dataType>i2</dataType>\n" +" <allowedValueRange>\n" +" <minimum>Vendor defined</minimum>\n" +" <maximum>Vendor defined</maximum>\n" +" <step>Vendor defined</step>\n" +" </allowedValueRange>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>Loudness</name>\n" +" <dataType>boolean</dataType>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>A_ARG_TYPE_Channel</name>\n" +" <dataType>string</dataType>\n" +" <allowedValueList>\n" +" <allowedValue>Master</allowedValue>\n" +" <allowedValue>LF</allowedValue>\n" +" <allowedValue>RF</allowedValue>\n" +" <allowedValue>CF</allowedValue>\n" +" <allowedValue>LFE</allowedValue>\n" +" <allowedValue>LS</allowedValue>\n" +" <allowedValue>RS</allowedValue>\n" +" <allowedValue>LFC</allowedValue>\n" +" <allowedValue>RFC</allowedValue>\n" +" <allowedValue>SD</allowedValue>\n" +" <allowedValue>SL</allowedValue>\n" +" <allowedValue>SR </allowedValue>\n" +" <allowedValue>T</allowedValue>\n" +" <allowedValue>B</allowedValue>\n" +" </allowedValueList>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>A_ARG_TYPE_InstanceID</name>\n" +" <dataType>ui4</dataType>\n" +" </stateVariable>\n" +" <stateVariable sendEvents=\"no\">\n" +" <name>A_ARG_TYPE_PresetName</name>\n" +" <dataType>string</dataType>\n" +" <allowedValueList>\n" +" <allowedValue>FactoryDefaults</allowedValue>\n" +" <allowedValue>InstallationDefaults</allowedValue>\n" +" <allowedValue>Vendor defined</allowedValue>\n" +" </allowedValueList>\n" +" </stateVariable>\n" +" </serviceStateTable>\n" +"</scpd>\n" +; + + +typedef int (*soapfun)(const SoapCall&, MPDCli *) ; +static map<string, soapfun> soapcalls; + +int setMute(const SoapCall& sc, MPDCli *mpdcli) +{ + map<string, string>::const_iterator it = sc.args.find("DesiredMute"); + if (it == sc.args.end() || it->second.empty()) { + return UPNP_E_INVALID_PARAM; + } + if (it->second[0] == 'F') { + // Relative set of 0 -> restore pre-mute + mpdcli->setVolume(0, 1); + } else if (it->second[0] == 'T') { + mpdcli->setVolume(0); + } else { + return UPNP_E_INVALID_PARAM; + } +} + +static PTMutexInit cblock; +static int cluCallBack(Upnp_EventType et, void* evp, void* token) +{ + PTMutexLocker lock(cblock); + MPDCli *mpdcli = (MPDCli*)token; + + cerr << "cluCallBack: evt type:" << + LibUPnP::evTypeAsString(et).c_str() << endl; + + switch (et) { + case UPNP_CONTROL_ACTION_REQUEST: + { + struct Upnp_Action_Request *act = (struct Upnp_Action_Request *)evp; + cerr << "UPNP_CONTROL_ACTION_REQUEST: " << act->ActionName << + " Params: " << ixmlPrintDocument(act->ActionRequest) << endl; + SoapCall sc; + if (!decodeSoap(act->ActionName, act->ActionRequest, &sc)) { + return UPNP_E_INVALID_PARAM; + } + map<string, soapfun>::iterator it = soapcalls.find(sc.name); + if (it != soapcalls.end()) + return it->second(sc, mpdcli); + else + return UPNP_E_INVALID_PARAM; + } + break; + case UPNP_CONTROL_GET_VAR_REQUEST: + { + struct Upnp_State_Var_Request *act = + (struct Upnp_State_Var_Request *)evp; + cerr << "UPNP_CONTROL_ACTION_REQUEST: " << act->StateVarName << endl; + } + break; + case UPNP_EVENT_SUBSCRIPTION_REQUEST: + { + struct Upnp_Subscription_Request *act = + (struct Upnp_Subscription_Request*)evp; + } + break; + default: + // Ignore other events for now + break; + } + + return UPNP_E_INVALID_PARAM; +} + + + +static char *thisprog; +static char usage [] = + " \n\n" + ; +static void +Usage(void) +{ + fprintf(stderr, "%s: usage:\n%s", thisprog, usage); + exit(1); +} +static int op_flags; +#define OPT_MOINS 0x1 + +static string myDeviceUUID; + +int main(int argc, char *argv[]) +{ + thisprog = argv[0]; + argc--; argv++; + + if (argc != 0) + Usage(); + + soapcalls["SetMute"] = setMute; + + LibUPnP *mylib = LibUPnP::getLibUPnP(true); + if (!mylib) { + cerr << " Can't get LibUPnP" << endl; + return 1; + } + if (!mylib->ok()) { + cerr << "Lib init failed: " << + mylib->errAsString("main", mylib->getInitError()) << endl; + return 1; + } + mylib->setLogFileName("/tmp/clilibupnp.log"); + + MPDCli mpdcli("rasp1.dockes.com"); + if (!mpdcli.ok()) { + cerr << "MPD connection failed" << endl; + return 1; + } + mylib->registerHandler(UPNP_CONTROL_ACTION_REQUEST, cluCallBack, &mpdcli); + mylib->registerHandler(UPNP_CONTROL_GET_VAR_REQUEST, cluCallBack, &mpdcli); + mylib->registerHandler(UPNP_EVENT_SUBSCRIPTION_REQUEST, cluCallBack, &mpdcli); + + myDeviceUUID = LibUPnP::makeDevUUID(friendlyName); + string description = deviceDescription1 + myDeviceUUID + deviceDescription2; + cerr << myDeviceUUID << endl; + VirtualDir* theVD = VirtualDir::getVirtualDir(); + if (theVD == 0) { + cerr << "Can't get VirtualDir" << endl; + return 1; + } + theVD->addFile("/", "description.xml", description, "application/xml"); + theVD->addFile("/", "RenderingControl.xml", scdp, "application/xml"); + + mylib->setupWebServer(description); + while (true) + sleep(1000); + return 0; +} + + +/* Local Variables: */ +/* mode: c++ */ +/* c-basic-offset: 4 */ +/* tab-width: 4 */ +/* indent-tabs-mode: t */ +/* End: */