From 429301db6facc55fd2163aa7875060ee1d6b10b1 Mon Sep 17 00:00:00 2001 From: =?utf8?q?K=C3=A9vin=20THIERRY?= Date: Fri, 21 Nov 2014 09:31:07 +0100 Subject: [PATCH] Imported Upstream version 0.20.12 --- INSTALL | 12 +- Makefile.in | 352 ++-- NEWS | 154 +- aclocal.m4 | 658 ++++--- build-aux/compile | 347 ++++ build-aux/config.guess | 184 +- build-aux/config.sub | 97 +- build-aux/depcomp | 455 +++-- build-aux/install-sh | 14 +- build-aux/ltmain.sh | 4 +- build-aux/missing | 414 ++--- build-aux/test-driver | 139 ++ config.h.in | 3 + configure | 950 ++++++---- configure.ac | 29 +- doc/Makefile.in | 235 ++- doc/gupnp-docs.xml | 10 +- doc/gupnp-sections.txt | 25 + doc/gupnp.types | 2 + doc/html/GUPnPAcl.html | 413 +++++ doc/html/GUPnPContext.html | 1035 +++++++---- doc/html/GUPnPContextManager.html | 645 ++++--- doc/html/GUPnPControlPoint.html | 696 ++++--- doc/html/GUPnPDevice.html | 117 +- doc/html/GUPnPDeviceInfo.html | 1730 +++++++++++------- doc/html/GUPnPDeviceProxy.html | 77 +- doc/html/GUPnPResourceFactory.html | 413 +++-- doc/html/GUPnPRootDevice.html | 651 ++++--- doc/html/GUPnPService.html | 1437 +++++++++------ doc/html/GUPnPServiceInfo.html | 897 +++++---- doc/html/GUPnPServiceProxy.html | 1932 ++++++++++++-------- doc/html/GUPnPWhiteList.html | 633 ++++--- doc/html/GUPnPXMLDoc.html | 215 ++- doc/html/annotation-glossary.html | 110 +- doc/html/api-context.html | 38 + doc/html/api-device-control.html | 22 +- doc/html/api-device-impl.html | 22 +- doc/html/api-device-info.html | 22 +- doc/html/api-tools.html | 22 +- doc/html/api-utility.html | 32 +- doc/html/api.html | 33 +- doc/html/client-tutorial.html | 40 +- doc/html/glossary.html | 77 +- doc/html/gupnp-Error-codes.html | 406 ++-- doc/html/gupnp-Special-UPnP-types.html | 143 +- doc/html/gupnp-binding-tool.html | 28 +- doc/html/gupnp-gupnp-service-introspection.html | 735 ++++---- doc/html/gupnp.devhelp2 | 404 ++-- doc/html/home.png | Bin 578 -> 169 bytes doc/html/index.html | 25 +- doc/html/index.sgml | 216 ++- doc/html/ix01.html | 414 +++-- doc/html/left-insensitive.png | Bin 0 -> 329 bytes doc/html/left.png | Bin 373 -> 187 bytes doc/html/overview.html | 20 +- doc/html/right-insensitive.png | Bin 0 -> 233 bytes doc/html/right.png | Bin 380 -> 186 bytes doc/html/schemas-device.html | 20 +- doc/html/schemas-service.html | 20 +- doc/html/schemas.html | 22 +- doc/html/server-tutorial.html | 88 +- doc/html/style.css | 247 ++- doc/html/tutorial.html | 22 +- doc/html/up-insensitive.png | Bin 0 -> 293 bytes doc/html/up.png | Bin 291 -> 187 bytes doc/server-tutorial.xml | 12 +- examples/Makefile.in | 198 +- examples/light-client.c | 65 +- examples/light-server.c | 26 +- gtk-doc.make | 101 +- gupnp-1.0-uninstalled.pc.in | 2 +- gupnp-1.0.pc.in | 2 +- libgupnp/Makefile.am | 9 +- libgupnp/Makefile.in | 272 ++- libgupnp/gupnp-acl-private.h | 89 + libgupnp/gupnp-acl.c | 269 +++ libgupnp/gupnp-acl.h | 138 ++ libgupnp/gupnp-context-manager.c | 80 +- libgupnp/gupnp-context-private.h | 7 + libgupnp/gupnp-context.c | 334 +++- libgupnp/gupnp-context.h | 16 + libgupnp/gupnp-device-info.c | 26 +- libgupnp/gupnp-linux-context-manager.c | 88 +- libgupnp/gupnp-linux-context-manager.h | 3 + libgupnp/gupnp-network-manager.c | 7 +- libgupnp/gupnp-resource-factory.c | 13 +- libgupnp/gupnp-root-device.c | 6 + libgupnp/gupnp-service-info.c | 87 + libgupnp/gupnp-service-info.h | 7 + libgupnp/gupnp-service-introspection.c | 34 +- libgupnp/gupnp-service-proxy.c | 285 ++- libgupnp/gupnp-service-proxy.h | 28 +- libgupnp/gupnp-service.c | 85 +- libgupnp/gupnp-white-list.c | 57 +- libgupnp/gupnp-white-list.h | 3 + libgupnp/gupnp-xml-doc.c | 6 + libgupnp/gupnp.h | 1 + m4/gtk-doc.m4 | 51 +- m4/libtool.m4 | 12 +- packaging/GUPnP.changes | 20 - packaging/GUPnP.spec | 95 - tests/Makefile.in | 279 +-- tests/gtest/Makefile.am | 2 +- tests/gtest/Makefile.in | 646 +++++-- tests/gtest/data/TestBgo696762.xml | 21 - tests/gtest/data/TestDevice.xml | 28 + .../data/{ServiceBgo69762.xml => TestService.xml} | 4 + tests/gtest/test-bugs.c | 249 ++- tests/test-introspection.c | 19 +- tools/Makefile.in | 110 +- vala/GUPnP-1.0.metadata | 1 + vala/Makefile.in | 107 +- 112 files changed, 14443 insertions(+), 7760 deletions(-) create mode 100755 build-aux/compile create mode 100755 build-aux/test-driver create mode 100644 doc/html/GUPnPAcl.html create mode 100644 doc/html/api-context.html create mode 100644 doc/html/left-insensitive.png create mode 100644 doc/html/right-insensitive.png create mode 100644 doc/html/up-insensitive.png create mode 100644 libgupnp/gupnp-acl-private.h create mode 100644 libgupnp/gupnp-acl.c create mode 100644 libgupnp/gupnp-acl.h delete mode 100644 packaging/GUPnP.changes delete mode 100644 packaging/GUPnP.spec delete mode 100644 tests/gtest/data/TestBgo696762.xml create mode 100644 tests/gtest/data/TestDevice.xml rename tests/gtest/data/{ServiceBgo69762.xml => TestService.xml} (96%) diff --git a/INSTALL b/INSTALL index a1e89e1..2099840 100644 --- a/INSTALL +++ b/INSTALL @@ -1,7 +1,7 @@ Installation Instructions ************************* -Copyright (C) 1994-1996, 1999-2002, 2004-2011 Free Software Foundation, +Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, @@ -12,8 +12,8 @@ without warranty of any kind. Basic Installation ================== - Briefly, the shell commands `./configure; make; make install' should -configure, build, and install this package. The following + Briefly, the shell command `./configure && make && make install' +should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented @@ -309,9 +309,10 @@ causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to -an Autoconf bug. Until the bug is fixed you can use this workaround: +an Autoconf limitation. Until the limitation is lifted, you can use +this workaround: - CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash + CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== @@ -367,4 +368,3 @@ operates. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. - diff --git a/Makefile.in b/Makefile.in index 10a9163..cd9fbba 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,13 +80,19 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . -DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in $(srcdir)/config.h.in \ - $(srcdir)/gupnp-1.0-uninstalled.pc.in \ - $(srcdir)/gupnp-1.0.pc.in $(top_srcdir)/configure AUTHORS \ - COPYING ChangeLog INSTALL NEWS build-aux/config.guess \ - build-aux/config.sub build-aux/depcomp build-aux/install-sh \ - build-aux/ltmain.sh build-aux/missing +DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ + $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/configure $(am__configure_deps) \ + $(srcdir)/config.h.in $(srcdir)/gupnp-1.0.pc.in \ + $(srcdir)/gupnp-1.0-uninstalled.pc.in COPYING \ + build-aux/compile build-aux/config.guess build-aux/config.sub \ + build-aux/install-sh build-aux/missing build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/compile \ + $(top_srcdir)/build-aux/config.guess \ + $(top_srcdir)/build-aux/config.sub \ + $(top_srcdir)/build-aux/install-sh \ + $(top_srcdir)/build-aux/ltmain.sh \ + $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -74,21 +107,28 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = gupnp-1.0.pc gupnp-1.0-uninstalled.pc CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -125,11 +165,33 @@ am__installdirs = "$(DESTDIR)$(pkgconfigdir)" DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ - distdir dist dist-all distcheck +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + cscope distdir dist dist-all distcheck +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ + $(LISP)config.h.in +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags +CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) @@ -140,6 +202,7 @@ am__remove_distdir = \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi +am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ @@ -167,6 +230,7 @@ am__relativize = \ reldir="$$dir2" GZIP_ENV = --best DIST_ARCHIVES = $(distdir).tar.xz +DIST_TARGETS = dist-xz distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' @@ -198,17 +262,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -261,6 +325,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -368,8 +433,8 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) $(am__aclocal_m4_deps): config.h: stamp-h1 - @if test ! -f $@; then rm -f stamp-h1; else :; fi - @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi + @test -f $@ || rm -f stamp-h1 + @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -417,22 +482,25 @@ uninstall-pkgconfigDATA: dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -447,57 +515,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -513,12 +536,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -530,15 +548,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - list='$(SOURCES) $(HEADERS) config.h.in $(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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -547,9 +561,31 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscope: cscope.files + test ! -s cscope.files \ + || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) +clean-cscope: + -rm -f cscope.files +cscope.files: clean-cscope cscopelist +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) @@ -617,39 +653,41 @@ distdir: $(DISTFILES) || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 - $(am__remove_distdir) + $(am__post_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) + $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-tarZ: distdir + @echo WARNING: "Support for shar distribution archives is" \ + "deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z - $(am__remove_distdir) + $(am__post_remove_distdir) dist-shar: distdir + @echo WARNING: "Support for distribution archives compressed with" \ + "legacy program 'compress' is deprecated." >&2 + @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz - $(am__remove_distdir) + $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) - $(am__remove_distdir) + $(am__post_remove_distdir) -dist dist-all: distdir - tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz - $(am__remove_distdir) +dist dist-all: + $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' + $(am__post_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 @@ -660,8 +698,6 @@ distcheck: dist 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*) \ @@ -673,18 +709,19 @@ distcheck: dist *.zip*) \ unzip $(distdir).zip ;;\ esac - chmod -R a-w $(distdir); chmod u+w $(distdir) - mkdir $(distdir)/_build - mkdir $(distdir)/_inst + chmod -R a-w $(distdir) + chmod u+w $(distdir) + mkdir $(distdir)/_build $(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" \ + && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ + --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ @@ -707,7 +744,7 @@ distcheck: dist && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 - $(am__remove_distdir) + $(am__post_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' @@ -846,25 +883,24 @@ ps-am: uninstall-am: uninstall-pkgconfigDATA -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ - ctags-recursive install-am install-strip tags-recursive - -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am am--refresh check check-am clean clean-generic \ - clean-libtool ctags ctags-recursive dist dist-all dist-bzip2 \ - dist-gzip dist-lzip dist-lzma dist-shar dist-tarZ dist-xz \ - dist-zip distcheck distclean distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am 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-man \ - install-pdf install-pdf-am install-pkgconfigDATA install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs installdirs-am maintainer-clean \ +.MAKE: $(am__recursive_targets) all install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ + am--refresh check check-am clean clean-cscope clean-generic \ + clean-libtool cscope cscopelist-am ctags ctags-am dist \ + dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ + dist-xz dist-zip distcheck distclean distclean-generic \ + distclean-hdr distclean-libtool distclean-tags distcleancheck \ + distdir distuninstallcheck dvi dvi-am html html-am info \ + info-am install install-am 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-man install-pdf install-pdf-am install-pkgconfigDATA \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am uninstall-pkgconfigDATA + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am uninstall-pkgconfigDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/NEWS b/NEWS index 7aec806..99ba0dd 100644 --- a/NEWS +++ b/NEWS @@ -1,7 +1,159 @@ -0.20.5 +0.20.12 +======= + +Changes since 0.20.11: + +- Several documentation fixes. +- Fix warning from clang. +- Prevent a critical if there's no DBus available and a DBus-based context + manager is used. +- Don't try to use a DBus context manager if we don't have a system bus. +- Use g_return_val_if_fail. +- Fix a small leak of CallbackData in GUPnPServiceProxy. +- Add a gupnp_service_proxy_add_notify_full variant to be nice to + gobject-introspection. +- Several code cleanups. +- Fix a reference leak in ACL. +- Make "document" property of GUPnPDeviceInfo readable. +- Add gupnp_service_proxy_add_raw_notify which can be used to get the raw + xmlDoc received through notification. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=701446 + - https://bugzilla.gnome.org/show_bug.cgi?id=706123 + - https://bugzilla.gnome.org/show_bug.cgi?id=706127 + - https://bugzilla.gnome.org/show_bug.cgi?id=727709 + - https://bugzilla.gnome.org/show_bug.cgi?id=729827 + - https://bugzilla.gnome.org/show_bug.cgi?id=730359 + - https://bugzilla.gnome.org/show_bug.cgi?id=730690 + +All contributors to this release: + - Jens Georg + - Philip Withnall + +0.20.11 +======= + +Changes since 0.20.10: + +- Disable the Unix context manager on Android. +- Fix Windows compilation. +- Fix a memory leak in Linux context manager. +- Fix libuuid dependencies in pkg-config files. +- Implement a simple ACL infrastructure. + + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=711027 + - https://bugzilla.gnome.org/show_bug.cgi?id=723715 + - https://bugzilla.gnome.org/show_bug.cgi?id=727539 + - https://bugzilla.gnome.org/show_bug.cgi?id=728889 + +All contributors to this release: + - Philip Withnall + - Jens Georg + - Olivier Crête + - Luciana Fujii + +0.20.10 +======= + +Changes since 0.20.9: + +- Make sure ResourceFactory creates proxies with the correct GType. +- Make it possible to unsubscribe from a service proxy during a call-back. +- Disable managed RootDevices on WL change in addition to ControlPoints. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=678701 + - https://bugzilla.gnome.org/show_bug.cgi?id=690400 + - https://bugzilla.gnome.org/show_bug.cgi?id=711332 + +All contributors to this release: + - Jussi Kukkonen + - Jens Georg + +0.20.9 +====== + +Changes since 0.20.8: + +- Enforce HTTP 1.1 for device description requests. +- Add libuuid to Requires.private of pkg-config file. +- Deprecate gupnp_service_proxy_{begin,send}_action_hash as they cannot + guarantee the argument order. +- Add gupnp_service_info_get_introspection_async_full() that makes it possible + to cancel an introspcetion request using GCancellable. +- Fix a crash when running with GSSDP < 0.14.6. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=704867 + - https://bugzilla.gnome.org/show_bug.cgi?id=710491 + - https://bugzilla.gnome.org/show_bug.cgi?id=711027 + - https://bugzilla.gnome.org/show_bug.cgi?id=711167 + - https://bugzilla.gnome.org/show_bug.cgi?id=720369 + - https://bugzilla.gnome.org/show_bug.cgi?id=720372 + +All contributors to this release: + - Jussi Kukkonen + - Jens Georg + - Philip Withnall + - Parthiban Balasubramanian + +0.20.8 +====== + +Changes since 0.20.7: +- Minor compilation and style fixes in the Linux CM. +- Add gupnp_white_list_add_entryv utility function. +- Use "port" property to set "msearch-port" property on base class. +- Other style fixes + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=711015 + +All contributors to this release: + - Jens Georg + +0.20.7 +====== + +Changes since 0.20.6: +- Fix GCC warnings about local includes. +- Do not hand out libxml2-allocated strings. +- Fix a crash when a notification host was not available. +- Always call action call-back asynchronously, even when there was an error. +- Add performance measurement options to light-server/-client. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=669729 + - https://bugzilla.gnome.org/show_bug.cgi?id=703263 + - https://bugzilla.gnome.org/show_bug.cgi?id=708162 + - https://bugzilla.gnome.org/show_bug.cgi?id=708575 + - https://bugzilla.gnome.org/show_bug.cgi?id=708751 + +All contributors to this release: + - Jens Georg + - Andrzej Bieniek + - Emanuele Aina + +0.20.6 ====== Changes since 0.20.5: + - Don't do excessive network rescans. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=706996 + +All contributors to this release: + - Ludovic Ferrandis + - Jens Georg + +0.20.5 +====== + +Changes since 0.20.4: - Add some missing G_{BEGIN,END}_DECLS guards. - Fix uninitialized variable use introduced in previous version. - Add simple network device whitelisting infrastructure. diff --git a/aclocal.m4 b/aclocal.m4 index c5649ce..cfa324e 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -1,8 +1,7 @@ -# generated automatically by aclocal 1.11.6 -*- Autoconf -*- +# generated automatically by aclocal 1.14.1 -*- Autoconf -*- + +# Copyright (C) 1996-2013 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, -# Inc. # This file 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. @@ -12,13 +11,14 @@ # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. +m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl 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'.])]) +To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) @@ -180,25 +180,22 @@ else fi[]dnl ])# PKG_CHECK_MODULES -# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software -# Foundation, Inc. +# Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file 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. -# serial 1 - # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.11' +[am__api_version='1.14' 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.6], [], +m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -214,24 +211,22 @@ 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.6])dnl +[AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. -# serial 1 - # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets -# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to -# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to +# '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and @@ -250,7 +245,7 @@ _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually -# harmless because $srcdir is `.', but things will broke when you +# harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, @@ -276,22 +271,19 @@ am_aux_dir=`cd $ac_aux_dir && pwd` # AM_CONDITIONAL -*- Autoconf -*- -# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file 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. -# serial 9 - # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], -[AC_PREREQ(2.52)dnl - ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], - [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +[AC_PREREQ([2.52])dnl + m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl @@ -310,16 +302,14 @@ AC_CONFIG_COMMANDS_PRE( Usually this means the macro was only invoked conditionally.]]) fi])]) -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -# 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. -# serial 12 -# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing @@ -329,7 +319,7 @@ fi])]) # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. -# NAME is "CC", "CXX", "GCJ", or "OBJC". +# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was @@ -342,12 +332,13 @@ AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl -ifelse([$1], CC, [depcc="$CC" am_compiler_list=], - [$1], CXX, [depcc="$CXX" am_compiler_list=], - [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], - [$1], UPC, [depcc="$UPC" am_compiler_list=], - [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], - [depcc="$$1" am_compiler_list=]) +m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], + [$1], [CXX], [depcc="$CXX" am_compiler_list=], + [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], + [$1], [UPC], [depcc="$UPC" am_compiler_list=], + [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], @@ -355,8 +346,8 @@ AC_CACHE_CHECK([dependency style of $depcc], # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -396,16 +387,16 @@ AC_CACHE_CHECK([dependency style of $depcc], : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -414,8 +405,8 @@ AC_CACHE_CHECK([dependency style of $depcc], test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -423,7 +414,7 @@ AC_CACHE_CHECK([dependency style of $depcc], fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -471,7 +462,7 @@ AM_CONDITIONAL([am__fastdep$1], [ # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. -# This macro is AC_REQUIREd in _AM_DEPENDENCIES +# This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl @@ -481,9 +472,13 @@ AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], -[AC_ARG_ENABLE(dependency-tracking, -[ --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors]) +[AC_ARG_ENABLE([dependency-tracking], [dnl +AS_HELP_STRING( + [--enable-dependency-tracking], + [do not reject slow dependency extractors]) +AS_HELP_STRING( + [--disable-dependency-tracking], + [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' @@ -498,20 +493,18 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl # Generate code to set up dependency tracking. -*- Autoconf -*- -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. -#serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -524,7 +517,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -536,21 +529,19 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` @@ -568,7 +559,7 @@ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking -# is enabled. FIXME. This creates each `.P' file that we will +# is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], @@ -578,18 +569,21 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # Do all the work for Automake. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2008, 2009 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file 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. -# serial 16 - # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. +dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. +m4_define([AC_PROG_CC], +m4_defn([AC_PROG_CC]) +[_AM_PROG_CC_C_O +]) + # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -602,7 +596,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], -[AC_PREREQ([2.62])dnl +[AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl @@ -631,31 +625,40 @@ AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], -[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl +[AC_DIAGNOSE([obsolete], + [$0: two- and three-arguments forms are deprecated.]) +m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, +m4_if( + m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), + [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, -[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) - AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl +[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) + AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl -AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) -AM_MISSING_PROG(AUTOCONF, autoconf) -AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) -AM_MISSING_PROG(AUTOHEADER, autoheader) -AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) +AM_MISSING_PROG([AUTOCONF], [autoconf]) +AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) +AM_MISSING_PROG([AUTOHEADER], [autoheader]) +AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl -AC_REQUIRE([AM_PROG_MKDIR_P])dnl +AC_REQUIRE([AC_PROG_MKDIR_P])dnl +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl @@ -666,34 +669,78 @@ _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], - [_AM_DEPENDENCIES(CC)], - [define([AC_PROG_CC], - defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl + [_AM_DEPENDENCIES([CC])], + [m4_define([AC_PROG_CC], + m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], - [_AM_DEPENDENCIES(CXX)], - [define([AC_PROG_CXX], - defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl + [_AM_DEPENDENCIES([CXX])], + [m4_define([AC_PROG_CXX], + m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl + [_AM_DEPENDENCIES([OBJC])], + [m4_define([AC_PROG_OBJC], + m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl +AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], + [_AM_DEPENDENCIES([OBJCXX])], + [m4_define([AC_PROG_OBJCXX], + m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) -_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl -dnl The `parallel-tests' driver may need to know about EXEEXT, so add the -dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro -dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. +AC_REQUIRE([AM_SILENT_RULES])dnl +dnl The testsuite driver may need to know about EXEEXT, so add the +dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This +dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl -]) -dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) + fi +fi]) + +dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) - # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -715,15 +762,12 @@ for _am_header in $config_headers :; do done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) -# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation, -# Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. -# serial 1 - # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. @@ -737,16 +781,14 @@ if test x"${install_sh}" != xset; then install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi -AC_SUBST(install_sh)]) +AC_SUBST([install_sh])]) -# Copyright (C) 2003, 2005 Free Software Foundation, Inc. +# Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file 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. -# serial 2 - # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], @@ -763,20 +805,17 @@ AC_SUBST([am__leading_dot])]) # Add --enable-maintainer-mode option to configure. -*- Autoconf -*- # From Jim Meyering -# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004, 2005, 2008, -# 2011 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file 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. -# serial 5 - # AM_MAINTAINER_MODE([DEFAULT-MODE]) # ---------------------------------- # Control maintainer-specific portions of Makefiles. -# Default is to disable them, unless `enable' is passed literally. -# For symmetry, `disable' may be passed as well. Anyway, the user +# Default is to disable them, unless 'enable' is passed literally. +# For symmetry, 'disable' may be passed as well. Anyway, the user # can override the default with the --enable/--disable switch. AC_DEFUN([AM_MAINTAINER_MODE], [m4_case(m4_default([$1], [disable]), @@ -787,10 +826,11 @@ AC_DEFUN([AM_MAINTAINER_MODE], AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode's default is 'disable' unless 'enable' is passed AC_ARG_ENABLE([maintainer-mode], -[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful - (and sometimes confusing) to the casual installer], - [USE_MAINTAINER_MODE=$enableval], - [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) + [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode], + am_maintainer_other[ make rules and dependencies not useful + (and sometimes confusing) to the casual installer])], + [USE_MAINTAINER_MODE=$enableval], + [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes])) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE @@ -798,18 +838,14 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) -AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) - # Check to see how 'make' treats includes. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. -# serial 4 - # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. @@ -827,7 +863,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -854,15 +890,12 @@ rm -f confinc confmf # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file 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. -# serial 6 - # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], @@ -870,11 +903,10 @@ AC_DEFUN([AM_MISSING_PROG], $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) - # AM_MISSING_HAS_RUN # ------------------ -# Define MISSING if not defined so far and test if it supports --run. -# If it does, set am_missing_run to use it, otherwise, to nothing. +# Define MISSING if not defined so far and test if it is modern enough. +# If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl @@ -887,54 +919,22 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - AC_MSG_WARN([`missing' script is too old or missing]) + AC_MSG_WARN(['missing' script is too old or missing]) fi ]) -# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation, -# Inc. -# -# This file 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. - -# serial 1 - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - # Helper functions for option handling. -*- Autoconf -*- -# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software -# Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. -# serial 5 - # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], @@ -944,7 +944,7 @@ AC_DEFUN([_AM_MANGLE_OPTION], # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], -[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) +[m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ @@ -958,13 +958,58 @@ AC_DEFUN([_AM_SET_OPTIONS], AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file 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. -# serial 1 +# _AM_PROG_CC_C_O +# --------------- +# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC +# to automatically call this. +AC_DEFUN([_AM_PROG_CC_C_O], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +AC_REQUIRE_AUX_FILE([compile])dnl +AC_LANG_PUSH([C])dnl +AC_CACHE_CHECK( + [whether $CC understands -c and -o together], + [am_cv_prog_cc_c_o], + [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i]) +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +AC_LANG_POP([C])]) + +# For backward compatibility. +AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) + +# Copyright (C) 2001-2013 Free Software Foundation, Inc. +# +# This file 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. # AM_RUN_LOG(COMMAND) # ------------------- @@ -979,22 +1024,16 @@ AC_DEFUN([AM_RUN_LOG], # Check to make sure that the build environment is sane. -*- Autoconf -*- -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 -# Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file 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. -# serial 5 - # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -1005,32 +1044,40 @@ case `pwd` in esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) - AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; + AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$[*]" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$[*]" != "X $srcdir/configure conftest.file" \ - && test "$[*]" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken -alias in your environment]) - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken + alias in your environment]) + fi + if test "$[2]" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$[2]" = conftest.file ) then @@ -1040,31 +1087,50 @@ else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi -AC_MSG_RESULT(yes)]) +AC_MSG_RESULT([yes]) +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi +AC_CONFIG_COMMANDS_PRE( + [AC_MSG_CHECKING([that generated files are newer than configure]) + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + AC_MSG_RESULT([done])]) +rm -f conftest.file +]) -# Copyright (C) 2009, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file 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. -# serial 2 - # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT -# (`yes' being less verbose, `no' or empty being verbose). +# ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], -[AC_ARG_ENABLE([silent-rules], -[ --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0')]) -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; +[AC_ARG_ENABLE([silent-rules], [dnl +AS_HELP_STRING( + [--enable-silent-rules], + [less verbose build output (undo: "make V=1")]) +AS_HELP_STRING( + [--disable-silent-rules], + [verbose build output (undo: "make V=0")])dnl +]) +case $enable_silent_rules in @%:@ ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl -dnl A few `make' implementations (e.g., NonStop OS and NextStep) +dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} @@ -1082,7 +1148,7 @@ else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then - dnl Using `$V' instead of `$(V)' breaks IRIX make. + dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else @@ -1099,44 +1165,40 @@ AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) -# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc. +# Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file 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. -# serial 1 - # AM_PROG_INSTALL_STRIP # --------------------- -# One issue with vendor `install' (even GNU) is that you can't +# One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we -# always use install-sh in `make install-strip', and initialize +# always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. -dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +# will honor the 'STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) -# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc. +# Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file 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. -# serial 3 - # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. @@ -1150,18 +1212,16 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- -# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc. +# Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file 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. -# serial 2 - # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. +# FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory @@ -1171,76 +1231,114 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], + + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff --git a/build-aux/compile b/build-aux/compile new file mode 100755 index 0000000..531136b --- /dev/null +++ b/build-aux/compile @@ -0,0 +1,347 @@ +#! /bin/sh +# Wrapper for compilers which do not understand '-c -o'. + +scriptversion=2012-10-14.11; # UTC + +# Copyright (C) 1999-2013 Free Software Foundation, Inc. +# Written by Tom Tromey . +# +# 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, 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +nl=' +' + +# We need space, tab and new line, in precisely that order. Quoting is +# there to prevent tools from complaining about whitespace usage. +IFS=" "" $nl" + +file_conv= + +# func_file_conv build_file lazy +# Convert a $build file to $host form and store it in $file +# Currently only supports Windows hosts. If the determined conversion +# type is listed in (the comma separated) LAZY, no conversion will +# take place. +func_file_conv () +{ + file=$1 + case $file in + / | /[!/]*) # absolute file, and not a UNC file + if test -z "$file_conv"; then + # lazily determine how to convert abs files + case `uname -s` in + MINGW*) + file_conv=mingw + ;; + CYGWIN*) + file_conv=cygwin + ;; + *) + file_conv=wine + ;; + esac + fi + case $file_conv/,$2, in + *,$file_conv,*) + ;; + mingw/*) + file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` + ;; + cygwin/*) + file=`cygpath -m "$file" || echo "$file"` + ;; + wine/*) + file=`winepath -w "$file" || echo "$file"` + ;; + esac + ;; + 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 + if test -f "$dir/lib$lib.a"; then + found=yes + lib=$dir/lib$lib.a + 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 () +{ + # Assume a capable shell + lib_path= + shared=: + linker_opts= + for arg + do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + eat=1 + case $2 in + *.o | *.[oO][bB][jJ]) + func_file_conv "$2" + set x "$@" -Fo"$file" + shift + ;; + *) + func_file_conv "$2" + set x "$@" -Fe"$file" + shift + ;; + 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*) + func_cl_dashl "${1#-l}" + set x "$@" "$lib" + shift + ;; + -L) + eat=1 + func_cl_dashL "$2" + ;; + -L*) + func_cl_dashL "${1#-L}" + ;; + -static) + shared=false + ;; + -Wl,*) + arg=${1#-Wl,} + save_ifs="$IFS"; IFS=',' + for flag in $arg; do + IFS="$save_ifs" + linker_opts="$linker_opts $flag" + done + IFS="$save_ifs" + ;; + -Xlinker) + eat=1 + linker_opts="$linker_opts $2" + ;; + -*) + set x "$@" "$1" + shift + ;; + *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) + func_file_conv "$1" + set x "$@" -Tp"$file" + shift + ;; + *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) + func_file_conv "$1" mingw + set x "$@" "$file" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift + done + if test -n "$linker_opts"; then + linker_opts="-link$linker_opts" + fi + exec "$@" $linker_opts + exit 1 +} + +eat= + +case $1 in + '') + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; + -h | --h*) + cat <<\EOF +Usage: compile [--help] [--version] PROGRAM [ARGS] + +Wrapper for compilers which do not understand '-c -o'. +Remove '-o dest.o' from ARGS, run PROGRAM with the remaining +arguments, and rename the output as expected. + +If you are trying to build a whole package this is not the +right script to run: please start by reading the file 'INSTALL'. + +Report bugs to . +EOF + exit $? + ;; + -v | --v*) + echo "compile $scriptversion" + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; +esac + +ofile= +cfile= + +for arg +do + if test -n "$eat"; then + eat= + else + case $1 in + -o) + # configure might choose to run compile as 'compile cc -o foo foo.c'. + # So we strip '-o arg' only if arg is an object. + eat=1 + case $2 in + *.o | *.obj) + ofile=$2 + ;; + *) + set x "$@" -o "$2" + shift + ;; + esac + ;; + *.c) + cfile=$1 + set x "$@" "$1" + shift + ;; + *) + set x "$@" "$1" + shift + ;; + esac + fi + shift +done + +if test -z "$ofile" || test -z "$cfile"; then + # If no '-o' option was seen then we might have been invoked from a + # pattern rule where we don't need one. That is ok -- this is a + # normal compilation that the losing compiler can handle. If no + # '.c' file was seen then we are probably linking. That is also + # ok. + exec "$@" +fi + +# Name of file we expect compiler to create. +cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` + +# Create the lock directory. +# Note: use '[/\\:.-]' here to ensure that we don't use the same name +# that we are using for the .o file. Also, base the name on the expected +# object file name, since that is what matters with a parallel build. +lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d +while true; do + if mkdir "$lockdir" >/dev/null 2>&1; then + break + fi + sleep 1 +done +# FIXME: race condition here if user kills between mkdir and trap. +trap "rmdir '$lockdir'; exit 1" 1 2 15 + +# Run the compile. +"$@" +ret=$? + +if test -f "$cofile"; then + test "$cofile" = "$ofile" || mv "$cofile" "$ofile" +elif test -f "${cofile}bj"; then + test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" +fi + +rmdir "$lockdir" +exit $ret + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/build-aux/config.guess b/build-aux/config.guess index d622a44..b79252d 100755 --- a/build-aux/config.guess +++ b/build-aux/config.guess @@ -1,14 +1,12 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright 1992-2013 Free Software Foundation, Inc. -timestamp='2012-02-10' +timestamp='2013-06-10' # This file 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 +# the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but @@ -22,19 +20,17 @@ timestamp='2012-02-10' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner. Please send patches (context -# diff format) to and include a ChangeLog -# entry. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). # -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD +# +# Please send patches with a ChangeLog entry to config-patches@gnu.org. + me=`echo "$0" | sed -e 's,.*/,,'` @@ -54,9 +50,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -138,6 +132,27 @@ UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown +case "${UNAME_SYSTEM}" in +Linux|GNU|GNU/*) + # If the system lacks a compiler, then just pick glibc. + # We could probably try harder. + LIBC=gnu + + eval $set_cc_for_build + cat <<-EOF > $dummy.c + #include + #if defined(__UCLIBC__) + LIBC=uclibc + #elif defined(__dietlibc__) + LIBC=dietlibc + #else + LIBC=gnu + #endif + EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + ;; +esac + # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -200,6 +215,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; + *:Bitrig:*:*) + UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} + exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} @@ -302,7 +321,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) + arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) @@ -801,6 +820,9 @@ EOF i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; + *:MINGW64*:*) + echo ${UNAME_MACHINE}-pc-mingw64 + exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; @@ -852,21 +874,21 @@ EOF exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -879,59 +901,54 @@ EOF EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + if test "$?" = 0 ; then LIBC="gnulibc1" ; fi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; + arc:Linux:*:* | arceb:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else - echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-gnu + echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) - LIBC=gnu - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" + echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -950,54 +967,63 @@ EOF #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; + or1k:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} + exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) - echo sparc-unknown-linux-gnu + echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; + PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; + *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu + echo powerpc-unknown-linux-${LIBC} + exit ;; + ppc64le:Linux:*:*) + echo powerpc64le-unknown-linux-${LIBC} + exit ;; + ppcle:Linux:*:*) + echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux + echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu + echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1201,6 +1227,9 @@ EOF BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; + x86_64:Haiku:*:*) + echo x86_64-unknown-haiku + exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; @@ -1227,19 +1256,21 @@ EOF exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - i386) - eval $set_cc_for_build - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - UNAME_PROCESSOR="x86_64" - fi - fi ;; - unknown) UNAME_PROCESSOR=powerpc ;; - esac + eval $set_cc_for_build + if test "$UNAME_PROCESSOR" = unknown ; then + UNAME_PROCESSOR=powerpc + fi + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + case $UNAME_PROCESSOR in + i386) UNAME_PROCESSOR=x86_64 ;; + powerpc) UNAME_PROCESSOR=powerpc64 ;; + esac + fi + fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1256,7 +1287,7 @@ EOF NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; - NSE-?:NONSTOP_KERNEL:*:*) + NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) @@ -1330,9 +1361,6 @@ EOF exit ;; esac -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - eval $set_cc_for_build cat >$dummy.c <. @@ -26,11 +20,12 @@ timestamp='2012-04-18' # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. +# the same distribution terms that you use for the rest of that +# program. This Exception is an additional permission under section 7 +# of the GNU General Public License, version 3 ("GPLv3"). -# Please send patches to . Submit a context -# diff and a properly formatted GNU ChangeLog entry. +# Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. @@ -73,9 +68,7 @@ Report bugs and patches to ." version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, -2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 -Free Software Foundation, Inc. +Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +116,7 @@ esac maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ - linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) @@ -156,7 +149,7 @@ case $os in -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray | -microblaze) + -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; @@ -259,10 +252,12 @@ case $basic_machine in | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | be32 | be64 \ + | arc | arceb \ + | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ + | avr | avr32 \ + | be32 | be64 \ | bfin \ - | c4x | clipper \ + | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -273,7 +268,7 @@ case $basic_machine in | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ + | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ @@ -291,16 +286,17 @@ case $basic_machine in | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ + | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 \ + | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ - | or32 \ + | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -370,13 +366,13 @@ case $basic_machine in | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | clipper-* | craynv-* | cydra-* \ + | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -389,7 +385,8 @@ case $basic_machine in | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -407,12 +404,13 @@ case $basic_machine in | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* \ + | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -788,11 +786,15 @@ case $basic_machine in basic_machine=ns32k-utek os=-sysv ;; - microblaze) + microblaze*) basic_machine=microblaze-xilinx ;; + mingw64) + basic_machine=x86_64-pc + os=-mingw64 + ;; mingw32) - basic_machine=i386-pc + basic_machine=i686-pc os=-mingw32 ;; mingw32ce) @@ -828,7 +830,7 @@ case $basic_machine in basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i386-pc + basic_machine=i686-pc os=-msys ;; mvs) @@ -1019,7 +1021,11 @@ case $basic_machine in basic_machine=i586-unknown os=-pw32 ;; - rdos) + rdos | rdos64) + basic_machine=x86_64-pc + os=-rdos + ;; + rdos32) basic_machine=i386-pc os=-rdos ;; @@ -1346,21 +1352,21 @@ case $os in -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* \ + | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ + | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-android* \ - | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1492,9 +1498,6 @@ case $os in -aros*) os=-aros ;; - -kaos*) - os=-kaos - ;; -zvmoe) os=-zvmoe ;; @@ -1543,6 +1546,9 @@ case $basic_machine in c4x-* | tic4x-*) os=-coff ;; + c8051-*) + os=-elf + ;; hexagon-*) os=-elf ;; @@ -1586,6 +1592,9 @@ case $basic_machine in mips*-*) os=-elf ;; + or1k-*) + os=-elf + ;; or32-*) os=-coff ;; diff --git a/build-aux/depcomp b/build-aux/depcomp index 25a39e6..4ebd5b3 100755 --- a/build-aux/depcomp +++ b/build-aux/depcomp @@ -1,10 +1,9 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-03-27.16; # UTC +scriptversion=2013-05-30.07; # UTC -# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, -# 2011, 2012 Free Software Foundation, Inc. +# Copyright (C) 1999-2013 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,9 +27,9 @@ scriptversion=2012-03-27.16; # UTC case $1 in '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; + echo "$0: No command. Try '$0 --help' for more information." 1>&2 + exit 1; + ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] @@ -57,11 +56,65 @@ EOF ;; esac +# Get the directory component of the given path, and save it in the +# global variables '$dir'. Note that this directory component will +# be either empty or ending with a '/' character. This is deliberate. +set_dir_from () +{ + case $1 in + */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; + *) dir=;; + esac +} + +# Get the suffix-stripped basename of the given path, and save it the +# global variable '$base'. +set_base_from () +{ + base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` +} + +# If no dependency file was actually created by the compiler invocation, +# we still have to create a dummy depfile, to avoid errors with the +# Makefile "include basename.Plo" scheme. +make_dummy_depfile () +{ + echo "#dummy" > "$depfile" +} + +# Factor out some common post-processing of the generated depfile. +# Requires the auxiliary global variable '$tmpdepfile' to be set. +aix_post_process_depfile () +{ + # If the compiler actually managed to produce a dependency file, + # post-process it. + if test -f "$tmpdepfile"; then + # Each line is of the form 'foo.o: dependency.h'. + # Do two passes, one to just change these to + # $object: dependency.h + # and one to simply output + # dependency.h: + # which is needed to avoid the deleted-header problem. + { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" + sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" + } > "$depfile" + rm -f "$tmpdepfile" + else + make_dummy_depfile + fi +} + # A tabulation character. tab=' ' # A newline character. nl=' ' +# Character ranges might be problematic outside the C locale. +# These definitions help. +upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ +lower=abcdefghijklmnopqrstuvwxyz +digits=0123456789 +alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 @@ -75,6 +128,9 @@ tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" +# Avoid interferences from the environment. +gccflag= dashmflag= + # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case @@ -86,32 +142,32 @@ if test "$depmode" = hp; then fi if test "$depmode" = dashXmstdout; then - # This is just like dashmstdout with a different argument. - dashmflag=-xM - depmode=dashmstdout + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then - # This is just like msvisualcpp but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvisualcpp + # This is just like msvisualcpp but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then - # This is just like msvc7 but w/o cygpath translation. - # Just convert the backslash-escaped backslashes to single forward - # slashes to satisfy depend.m4 - cygpath_u='sed s,\\\\,/,g' - depmode=msvc7 + # This is just like msvc7 but w/o cygpath translation. + # Just convert the backslash-escaped backslashes to single forward + # slashes to satisfy depend.m4 + cygpath_u='sed s,\\\\,/,g' + 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 + # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. + gccflag=-qmakedep=gcc,-MF + depmode=gcc fi case "$depmode" in @@ -134,8 +190,7 @@ gcc3) done "$@" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -143,13 +198,17 @@ gcc3) ;; gcc) +## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. +## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. +## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like -## -MM, not -M (despite what the docs say). +## -MM, not -M (despite what the docs say). Also, it might not be +## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then @@ -157,15 +216,14 @@ gcc) fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" - alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz -## The second -e expression handles DOS-style file names with drive letters. + # 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. @@ -174,15 +232,15 @@ gcc) ## 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 ' ' "$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. ## 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 "s|.*$object$||" -e '/:$/d' \ - | sed -e 's/$/ :/' >> "$depfile" + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -200,8 +258,7 @@ sgi) "$@" -MDupdate "$tmpdepfile" fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -209,7 +266,6 @@ sgi) if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" - # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in @@ -217,19 +273,15 @@ sgi) # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ - tr "$nl" ' ' >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ + | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" - # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ - | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ - >> "$depfile" + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> "$depfile" else - # The sourcefile does not contain any dependencies, so just - # store a dummy comment line, to avoid errors with the Makefile - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" ;; @@ -247,9 +299,8 @@ aix) # 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|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u @@ -262,9 +313,7 @@ aix) "$@" -M fi stat=$? - - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi @@ -273,65 +322,113 @@ aix) do test -f "$tmpdepfile" && break done - if test -f "$tmpdepfile"; then - # 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:'. - sed -e "s,^.*\.[a-z]*:,$object:," < "$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 - # "include basename.Plo" scheme. - echo "#dummy" > "$depfile" + aix_post_process_depfile + ;; + +tcc) + # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 + # FIXME: That version still under development at the moment of writing. + # Make that this statement remains true also for stable, released + # versions. + # It will wrap lines (doesn't matter whether long or short) with a + # trailing '\', as in: + # + # foo.o : \ + # foo.c \ + # foo.h \ + # + # It will put a trailing '\' even on the last line, and will use leading + # spaces rather than leading tabs (at least since its commit 0394caf7 + # "Emit spaces for -MD"). + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile" + exit $stat fi + rm -f "$depfile" + # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. + # We have to change lines of the first kind to '$object: \'. + sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" + # And for each line of the second kind, we have to emit a 'dep.h:' + # dummy dependency, to avoid the deleted-header problem. + sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; -icc) - # 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 - # sub/foo.o: sub/foo.c - # sub/foo.o: sub/foo.h - # sub/foo.c: - # sub/foo.h: - # ICC 7.1 will output +## The order of this option in the case statement is important, since the +## shell code in configure will try each of these formats in the order +## listed in this file. A plain '-MD' option would be understood by many +## compilers, so we must ensure this comes after the gcc and icc options. +pgcc) + # Portland's C compiler understands '-MD'. + # Will always output deps to 'file.d' where file is the root name of the + # source file under compilation, even if file resides in a subdirectory. + # The object file name does not affect the name of the '.d' file. + # pgcc 10.2 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 : - else + set_dir_from "$object" + # Use the source, not the object, to determine the base name, since + # that's sadly what pgcc will do too. + set_base_from "$source" + tmpdepfile=$base.d + + # For projects that build the same source file twice into different object + # files, the pgcc approach of using the *source* file root name can cause + # problems in parallel builds. Use a locking strategy to avoid stomping on + # the same $tmpdepfile. + lockdir=$base.d-lock + trap " + echo '$0: caught signal, cleaning up...' >&2 + rmdir '$lockdir' + exit 1 + " 1 2 13 15 + numtries=100 + i=$numtries + while test $i -gt 0; do + # mkdir is a portable test-and-set. + if mkdir "$lockdir" 2>/dev/null; then + # This process acquired the lock. + "$@" -MD + stat=$? + # Release the lock. + rmdir "$lockdir" + break + else + # If the lock is being held by a different process, wait + # until the winning process is done or we timeout. + while test -d "$lockdir" && test $i -gt 0; do + sleep 1 + i=`expr $i - 1` + done + fi + i=`expr $i - 1` + done + trap - 1 2 13 15 + if test $i -le 0; then + echo "$0: failed to acquire lock after $numtries attempts" >&2 + echo "$0: check lockdir '$lockdir'" >&2 + exit 1 + fi + + if test $stat -ne 0; then rm -f "$tmpdepfile" 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 -e "s/^[ $tab][ $tab]*/ /" -e "s,^[^:]*:,$object :," \ - < "$tmpdepfile" > "$depfile" - sed ' - s/[ '"$tab"'][ '"$tab"']*/ /g - s/^ *// - s/ *\\*$// - s/^[^:]*: *// - /^$/d - /:$/d - s/$/ :/ - ' < "$tmpdepfile" >> "$depfile" + # `$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" rm -f "$tmpdepfile" ;; @@ -342,9 +439,8 @@ hp2) # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + set_dir_from "$object" + set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d @@ -355,8 +451,7 @@ hp2) "$@" +Maked fi stat=$? - if test $stat -eq 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi @@ -366,76 +461,61 @@ hp2) test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" + sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ - s/^ *// - s/ \\*$// - s/$/:/ - p - }' "$tmpdepfile" >> "$depfile" + s/^ *// + s/ \\*$// + s/$/:/ + p + }' "$tmpdepfile" >> "$depfile" else - echo "#dummy" > "$depfile" + make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; 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'. - # 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. - # Subdirectories are respected. - dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` - test "x$dir" = "x$object" && dir= - base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` - - if test "$libtool" = yes; then - # With Tru64 cc, shared objects can also be used to make a - # static library. This mechanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - sed -e 's,^.*\.[a-z]*:['"$tab"' ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" - else - echo "#dummy" > "$depfile" - fi - rm -f "$tmpdepfile" - ;; + # The Tru64 compiler uses -MD to generate dependencies as a side + # 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. + # Subdirectories are respected. + set_dir_from "$object" + set_base_from "$object" + + if test "$libtool" = yes; then + # Libtool generates 2 separate objects for the 2 libraries. These + # two compilations output dependencies in $dir.libs/$base.o.d and + # in $dir$base.o.d. We have to check for both files, because + # one of the two compilations can be disabled. We should prefer + # $dir$base.o.d over $dir.libs/$base.o.d because the latter is + # automatically cleaned when .libs/ is deleted, while ignoring + # the former would cause a distcleancheck panic. + tmpdepfile1=$dir$base.o.d # libtool 1.5 + tmpdepfile2=$dir.libs/$base.o.d # Likewise. + tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 + "$@" -Wc,-MD + else + tmpdepfile1=$dir$base.d + tmpdepfile2=$dir$base.d + tmpdepfile3=$dir$base.d + "$@" -MD + fi + + stat=$? + if test $stat -ne 0; then + rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + exit $stat + fi + + for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" + do + test -f "$tmpdepfile" && break + done + # Same post-processing that is required for AIX mode. + aix_post_process_depfile + ;; msvc7) if test "$libtool" = yes; then @@ -446,8 +526,7 @@ msvc7) "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" - if test "$stat" = 0; then : - else + if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi @@ -473,6 +552,7 @@ $ { G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; @@ -524,13 +604,14 @@ dashmstdout) # 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. "$@" $dashmflag | - sed 's:^['"$tab"' ]*[^:'"$tab"' ][^:][^:]*\:['"$tab"' ]*:'"$object"'\: :' > "$tmpdepfile" + sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" - 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" + # Some versions of the HPUX 10.20 sed can't process this sed invocation + # correctly. Breaking it into two sed invocations is a workaround. + tr ' ' "$nl" < "$tmpdepfile" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; @@ -583,10 +664,12 @@ 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 ' ' "$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" + # Some versions of the HPUX 10.20 sed can't process the last invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed '1,2d' "$tmpdepfile" \ + | tr ' ' "$nl" \ + | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ + | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; @@ -622,10 +705,10 @@ cpp) esac done - "$@" -E | - sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" + "$@" -E \ + | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ + | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" @@ -657,15 +740,15 @@ msvisualcpp) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") - set fnord "$@" - shift - shift - ;; + set fnord "$@" + shift + shift + ;; *) - set fnord "$@" "$arg" - shift - shift - ;; + set fnord "$@" "$arg" + shift + shift + ;; esac done "$@" -E 2>/dev/null | diff --git a/build-aux/install-sh b/build-aux/install-sh index a9244eb..377bb86 100755 --- a/build-aux/install-sh +++ b/build-aux/install-sh @@ -1,7 +1,7 @@ #!/bin/sh # install - install a program, script, or datafile -scriptversion=2011-01-19.21; # UTC +scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the @@ -35,7 +35,7 @@ scriptversion=2011-01-19.21; # UTC # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it +# 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written @@ -156,7 +156,7 @@ while test $# -ne 0; do -s) stripcmd=$stripprog;; -t) dst_arg=$2 - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -190,7 +190,7 @@ if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then fi shift # arg dst_arg=$arg - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac @@ -202,7 +202,7 @@ if test $# -eq 0; then echo "$0: no input file specified." >&2 exit 1 fi - # It's OK to call `install-sh -d' without argument. + # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi @@ -240,7 +240,7 @@ fi for src do - # Protect names problematic for `test' and other utilities. + # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac @@ -354,7 +354,7 @@ do if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or - # other-writeable bit of parent directory when it shouldn't. + # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh index b9205ee..a356aca 100644 --- a/build-aux/ltmain.sh +++ b/build-aux/ltmain.sh @@ -70,7 +70,7 @@ # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.2ubuntu1 +# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1.7ubuntu1 # automake: $automake_version # autoconf: $autoconf_version # @@ -80,7 +80,7 @@ PROGRAM=libtool PACKAGE=libtool -VERSION="2.4.2 Debian-2.4.2-1.2ubuntu1" +VERSION="2.4.2 Debian-2.4.2-1.7ubuntu1" TIMESTAMP="" package_revision=1.3337 diff --git a/build-aux/missing b/build-aux/missing index 86a8fc3..db98974 100755 --- a/build-aux/missing +++ b/build-aux/missing @@ -1,11 +1,10 @@ #! /bin/sh -# Common stub for a few missing GNU programs while installing. +# Common wrapper for a few potentially missing GNU programs. -scriptversion=2012-01-06.13; # UTC +scriptversion=2013-10-28.13; # UTC -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, -# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. +# Originally written by Fran,cois Pinard , 1996. # 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 @@ -26,68 +25,40 @@ scriptversion=2012-01-06.13; # UTC # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "Try '$0 --help' for more information" exit 1 fi -run=: -sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' -sed_minuso='s/.* -o \([^ ]*\).*/\1/p' - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi +case $1 in -msg="missing on your system" + --is-lightweight) + # Used by our autoconf macros to check whether the available missing + # script is modern enough. + exit 0 + ;; -case $1 in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; + --run) + # Back-compat with the calling convention used by older automake. + shift + ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. +Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due +to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - autom4te touch the output file, or create a stub one - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - yacc create \`y.tab.[ch]', if possible, from existing .[ch] + aclocal autoconf autoheader autom4te automake makeinfo + bison yacc flex lex help2man -Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and -\`g' are ignored when checking the name. +Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and +'g' are ignored when checking the name. Send bug reports to ." exit $? @@ -99,228 +70,141 @@ Send bug reports to ." ;; -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" + echo 1>&2 "$0: unknown '$1' option" + echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac -# normalize program name to check for. -program=`echo "$1" | sed ' - s/^gnu-//; t - s/^gnu//; t - s/^g//; t'` - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). This is about non-GNU programs, so use $1 not -# $program. -case $1 in - lex*|yacc*) - # Not GNU programs, they don't have --version. - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case $program in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case $f in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te*) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison*|yacc*) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if test ! -f y.tab.h; then - echo >y.tab.h - fi - if test ! -f y.tab.c; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex*|flex*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if test $# -ne 1; then - eval LASTARG=\${$#} - case $LASTARG in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if test -f "$SRCFILE"; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if test ! -f lex.yy.c; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit $? - fi - ;; - - makeinfo*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n "$sed_output"` - test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n ' - /^@setfilename/{ - s/.* \([^ ]*\) *$/\1/ - p - q - }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; +# Run the given program, remember its exit status. +"$@"; st=$? + +# If it succeeded, we are done. +test $st -eq 0 && exit 0 + +# Also exit now if we it failed (or wasn't found), and '--version' was +# passed; such an option is passed most likely to detect whether the +# program is present and works. +case $2 in --version|--help) exit $st;; esac + +# Exit code 63 means version mismatch. This often happens when the user +# tries to use an ancient version of a tool on a file that requires a +# minimum version. +if test $st -eq 63; then + msg="probably too old" +elif test $st -eq 127; then + # Program was missing. + msg="missing on your system" +else + # Program was found and executed, but failed. Give up. + exit $st +fi - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 +perl_URL=http://www.perl.org/ +flex_URL=http://flex.sourceforge.net/ +gnu_software_URL=http://www.gnu.org/software + +program_details () +{ + case $1 in + aclocal|automake) + echo "The '$1' program is part of the GNU Automake package:" + echo "<$gnu_software_URL/automake>" + echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/autoconf>" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + autoconf|autom4te|autoheader) + echo "The '$1' program is part of the GNU Autoconf package:" + echo "<$gnu_software_URL/autoconf/>" + echo "It also requires GNU m4 and Perl in order to run:" + echo "<$gnu_software_URL/m4/>" + echo "<$perl_URL>" + ;; + esac +} + +give_advice () +{ + # Normalize program name to check for. + normalized_program=`echo "$1" | sed ' + s/^gnu-//; t + s/^gnu//; t + s/^g//; t'` + + printf '%s\n' "'$1' is $msg." + + configure_deps="'configure.ac' or m4 files included by 'configure.ac'" + case $normalized_program in + autoconf*) + echo "You should only need it if you modified 'configure.ac'," + echo "or m4 files included by it." + program_details 'autoconf' + ;; + autoheader*) + echo "You should only need it if you modified 'acconfig.h' or" + echo "$configure_deps." + program_details 'autoheader' + ;; + automake*) + echo "You should only need it if you modified 'Makefile.am' or" + echo "$configure_deps." + program_details 'automake' + ;; + aclocal*) + echo "You should only need it if you modified 'acinclude.m4' or" + echo "$configure_deps." + program_details 'aclocal' + ;; + autom4te*) + echo "You might have modified some maintainer files that require" + echo "the 'autom4te' program to be rebuilt." + program_details 'autom4te' + ;; + bison*|yacc*) + echo "You should only need it if you modified a '.y' file." + echo "You may want to install the GNU Bison package:" + echo "<$gnu_software_URL/bison/>" + ;; + lex*|flex*) + echo "You should only need it if you modified a '.l' file." + echo "You may want to install the Fast Lexical Analyzer package:" + echo "<$flex_URL>" + ;; + help2man*) + echo "You should only need it if you modified a dependency" \ + "of a man page." + echo "You may want to install the GNU Help2man package:" + echo "<$gnu_software_URL/help2man/>" ;; -esac - -exit 0 + makeinfo*) + echo "You should only need it if you modified a '.texi' file, or" + echo "any other file indirectly affecting the aspect of the manual." + echo "You might want to install the Texinfo package:" + echo "<$gnu_software_URL/texinfo/>" + echo "The spurious makeinfo call might also be the consequence of" + echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" + echo "want to install GNU make:" + echo "<$gnu_software_URL/make/>" + ;; + *) + echo "You might have modified some files without having the proper" + echo "tools for further handling them. Check the 'README' file, it" + echo "often tells you about the needed prerequisites for installing" + echo "this package. You may also peek at any GNU archive site, in" + echo "case some other package contains this missing '$1' program." + ;; + esac +} + +give_advice "$1" | sed -e '1s/^/WARNING: /' \ + -e '2,$s/^/ /' >&2 + +# Propagate the correct exit status (expected to be 127 for a program +# not found, 63 for a program that failed due to version mismatch). +exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) diff --git a/build-aux/test-driver b/build-aux/test-driver new file mode 100755 index 0000000..d306056 --- /dev/null +++ b/build-aux/test-driver @@ -0,0 +1,139 @@ +#! /bin/sh +# test-driver - basic testsuite driver script. + +scriptversion=2013-07-13.22; # UTC + +# Copyright (C) 2011-2013 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 +# the Free Software Foundation; either version 2, 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, see . + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# This file is maintained in Automake, please report +# bugs to or send patches to +# . + +# Make unconditional expansion of undefined variables an error. This +# helps a lot in preventing typo-related bugs. +set -u + +usage_error () +{ + echo "$0: $*" >&2 + print_usage >&2 + exit 2 +} + +print_usage () +{ + cat <$log_file 2>&1 +estatus=$? +if test $enable_hard_errors = no && test $estatus -eq 99; then + estatus=1 +fi + +case $estatus:$expect_failure in + 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; + 0:*) col=$grn res=PASS recheck=no gcopy=no;; + 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; + 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; + *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; + *:*) col=$red res=FAIL recheck=yes gcopy=yes;; +esac + +# Report outcome to console. +echo "${col}${res}${std}: $test_name" + +# Register the test result, and other relevant metadata. +echo ":test-result: $res" > $trs_file +echo ":global-test-result: $res" >> $trs_file +echo ":recheck: $recheck" >> $trs_file +echo ":copy-in-global-log: $gcopy" >> $trs_file + +# Local Variables: +# mode: shell-script +# sh-indentation: 2 +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff --git a/config.h.in b/config.h.in index a7745b9..14e3391 100644 --- a/config.h.in +++ b/config.h.in @@ -6,6 +6,9 @@ /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE +/* Define to 1 if you have the header file. */ +#undef HAVE_IFADDRS_H + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H diff --git a/configure b/configure index e874272..68d70d0 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gupnp 0.20.5. +# Generated by GNU Autoconf 2.69 for gupnp 0.20.12. # # Report bugs to . # @@ -651,8 +651,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gupnp' PACKAGE_TARNAME='gupnp' -PACKAGE_VERSION='0.20.5' -PACKAGE_STRING='gupnp 0.20.5' +PACKAGE_VERSION='0.20.12' +PACKAGE_STRING='gupnp 0.20.12' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp' PACKAGE_URL='http://www.gupnp.org/' @@ -708,11 +708,14 @@ GTK_DOC_BUILD_HTML_FALSE GTK_DOC_BUILD_HTML_TRUE ENABLE_GTK_DOC_FALSE ENABLE_GTK_DOC_TRUE +HAVE_GTK_DOC_FALSE +HAVE_GTK_DOC_TRUE GTKDOC_DEPS_LIBS GTKDOC_DEPS_CFLAGS HTML_DIR GTKDOC_MKPDF GTKDOC_REBASE +GTKDOC_CHECK_PATH GTKDOC_CHECK HAVE_VAPIGEN_FALSE HAVE_VAPIGEN_TRUE @@ -735,10 +738,11 @@ CONNMAN_LIBS CONNMAN_CFLAGS USE_CONNMAN_FALSE USE_CONNMAN_TRUE -GIO_LIBS -GIO_CFLAGS USE_NETWORK_MANAGER_FALSE USE_NETWORK_MANAGER_TRUE +HAVE_IFADDRS_H +HAVE_IFADDRS_H_FALSE +HAVE_IFADDRS_H_TRUE HAVE_NETLINK HAVE_NETLINK_FALSE HAVE_NETLINK_TRUE @@ -751,6 +755,7 @@ LIBGUPNP_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG +UUID_LIBS OTOOL64 OTOOL LIPO @@ -790,13 +795,13 @@ CPPFLAGS LDFLAGS CFLAGS CC +MAINT +MAINTAINER_MODE_FALSE +MAINTAINER_MODE_TRUE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V -MAINT -MAINTAINER_MODE_FALSE -MAINTAINER_MODE_TRUE am__untar am__tar AMTAR @@ -873,8 +878,8 @@ SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking -enable_maintainer_mode enable_silent_rules +enable_maintainer_mode enable_dependency_tracking enable_largefile enable_shared @@ -908,8 +913,6 @@ LIBGUPNP_CFLAGS LIBGUPNP_LIBS GTHREAD_CFLAGS GTHREAD_LIBS -GIO_CFLAGS -GIO_LIBS CONNMAN_CFLAGS CONNMAN_LIBS GTKDOC_DEPS_CFLAGS @@ -1454,7 +1457,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 gupnp 0.20.5 to adapt to many kinds of systems. +\`configure' configures gupnp 0.20.12 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1525,7 +1528,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gupnp 0.20.5:";; + short | recursive ) echo "Configuration of gupnp 0.20.12:";; esac cat <<\_ACEOF @@ -1533,12 +1536,15 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-maintainer-mode disable make rules and dependencies not useful - (and sometimes confusing) to the casual installer - --enable-silent-rules less verbose build output (undo: `make V=1') - --disable-silent-rules verbose build output (undo: `make V=0') - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors + --enable-silent-rules less verbose build output (undo: "make V=1") + --disable-silent-rules verbose build output (undo: "make V=0") + --disable-maintainer-mode + disable make rules and dependencies not useful (and + sometimes confusing) to the casual installer + --enable-dependency-tracking + do not reject slow dependency extractors + --disable-dependency-tracking + speeds up one-time build --disable-largefile omit support for large files --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] @@ -1586,8 +1592,6 @@ Some influential environment variables: C compiler flags for GTHREAD, overriding pkg-config GTHREAD_LIBS linker flags for GTHREAD, overriding pkg-config - GIO_CFLAGS C compiler flags for GIO, overriding pkg-config - GIO_LIBS linker flags for GIO, overriding pkg-config CONNMAN_CFLAGS C compiler flags for CONNMAN, overriding pkg-config CONNMAN_LIBS @@ -1664,7 +1668,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gupnp configure 0.20.5 +gupnp configure 0.20.12 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1938,11 +1942,102 @@ $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func + +# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES +# ------------------------------------------------------- +# Tests whether HEADER exists, giving a warning if it cannot be compiled using +# the include files in INCLUDES and setting the cache variable VAR +# accordingly. +ac_fn_c_check_header_mongrel () +{ + as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + if eval \${$3+:} false; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +else + # Is the header compilable? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 +$as_echo_n "checking $2 usability... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +$4 +#include <$2> +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + ac_header_compiler=yes +else + ac_header_compiler=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 +$as_echo "$ac_header_compiler" >&6; } + +# Is the header present? +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 +$as_echo_n "checking $2 presence... " >&6; } +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include <$2> +_ACEOF +if ac_fn_c_try_cpp "$LINENO"; then : + ac_header_preproc=yes +else + ac_header_preproc=no +fi +rm -f conftest.err conftest.i conftest.$ac_ext +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 +$as_echo "$ac_header_preproc" >&6; } + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( + yes:no: ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 +$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} + ;; + no:yes:* ) + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 +$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 +$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 +$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 +$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 +$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} +( $as_echo "## ------------------------------------------------------------------------------------ ## +## Report this to http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp ## +## ------------------------------------------------------------------------------------ ##" + ) | sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 +$as_echo_n "checking for $2... " >&6; } +if eval \${$3+:} false; then : + $as_echo_n "(cached) " >&6 +else + eval "$3=\$ac_header_compiler" +fi +eval ac_res=\$$3 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 +$as_echo "$ac_res" >&6; } +fi + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno + +} # ac_fn_c_check_header_mongrel 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 gupnp $as_me 0.20.5, which was +It was created by gupnp $as_me 0.20.12, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2439,7 +2534,7 @@ test -n "$target_alias" && NONENONEs,x,x, && program_prefix=${target_alias}- -am__api_version='1.11' +am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or @@ -2536,9 +2631,6 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } -# Just in case -sleep 1 -echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' @@ -2549,32 +2641,40 @@ case `pwd` in esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac -# Do `set' in a subshell so we don't clobber the current shell's +# Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( - set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` - if test "$*" = "X"; then - # -L didn't work. - set X `ls -t "$srcdir/configure" conftest.file` - fi - rm -f conftest.file - if test "$*" != "X $srcdir/configure conftest.file" \ - && test "$*" != "X conftest.file $srcdir/configure"; then - - # If neither matched, then we have a broken ls. This can happen - # if, for instance, CONFIG_SHELL is bash and it inherits a - # broken ls alias from the environment. This has actually - # happened. Such a system could not be considered "sane". - as_fn_error $? "ls -t appears to fail. Make sure there is not a broken -alias in your environment" "$LINENO" 5 - fi - + am_has_slept=no + for am_try in 1 2; do + echo "timestamp, slept: $am_has_slept" > conftest.file + set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t "$srcdir/configure" conftest.file` + fi + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken + alias in your environment" "$LINENO" 5 + fi + if test "$2" = conftest.file || test $am_try -eq 2; then + break + fi + # Just in case. + sleep 1 + am_has_slept=yes + done test "$2" = conftest.file ) then @@ -2586,6 +2686,16 @@ Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } +# If we didn't sleep, we still need to ensure time stamps of config.status and +# generated files are strictly newer. +am_sleep_pid= +if grep 'slept: no' conftest.file >/dev/null 2>&1; then + ( sleep 1 ) & + am_sleep_pid=$! +fi + +rm -f conftest.file + test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. @@ -2608,12 +2718,12 @@ if test x"${MISSING+set}" != xset; then esac fi # Use eval to expand $SHELL -if eval "$MISSING --run true"; then - am_missing_run="$MISSING --run " +if eval "$MISSING --is-lightweight"; then + am_missing_run="$MISSING " else am_missing_run= - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 -$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 +$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then @@ -2625,10 +2735,10 @@ if test x"${install_sh}" != xset; then esac fi -# Installed binaries are usually stripped using `strip' when the user -# run `make install-strip'. However `strip' might not be the right +# Installed binaries are usually stripped using 'strip' when the user +# run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake -# will honor the `STRIP' environment variable to overrule this program. +# will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. @@ -2767,12 +2877,6 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -2855,6 +2959,45 @@ else fi rmdir .tst 2>/dev/null +# Check whether --enable-silent-rules was given. +if test "${enable_silent_rules+set}" = set; then : + enableval=$enable_silent_rules; +fi + +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=1;; +esac +am_make=${MAKE-make} +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 +$as_echo_n "checking whether $am_make supports nested variables... " >&6; } +if ${am_cv_make_support_nested_variables+:} false; then : + $as_echo_n "(cached) " >&6 +else + if $as_echo 'TRUE=$(BAR$(V)) +BAR0=false +BAR1=true +V=1 +am__doit: + @$(TRUE) +.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then + am_cv_make_support_nested_variables=yes +else + am_cv_make_support_nested_variables=no +fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 +$as_echo "$am_cv_make_support_nested_variables" >&6; } +if test $am_cv_make_support_nested_variables = yes; then + AM_V='$(V)' + AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' +else + AM_V=$AM_DEFAULT_VERBOSITY + AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY +fi +AM_BACKSLASH='\' + if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." @@ -2877,7 +3020,7 @@ fi # Define the identity of the package. PACKAGE='gupnp' - VERSION='0.20.5' + VERSION='0.20.12' cat >>confdefs.h <<_ACEOF @@ -2905,6 +3048,12 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} +# For better backward compatibility. To be removed once Automake 1.9.x +# dies out for good. For more background, see: +# +# +mkdir_p='$(MKDIR_P)' + # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used @@ -2912,86 +3061,125 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR='$${TAR-tar}' -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 -$as_echo_n "checking how to create a ustar tar archive... " >&6; } -# Loop over all known methods to create a tar archive until one works. +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' -_am_tools=${am_cv_prog_tar_ustar-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - { echo "$as_me:$LINENO: $_am_tar --version" >&5 + +# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 +$as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } + if test $am_uid -le $am_max_uid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 +$as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } + if test $am_gid -le $am_max_gid; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + _am_tools=none + fi + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 +$as_echo_n "checking how to create a ustar tar archive... " >&6; } + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_ustar-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break - done - am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x ustar -w "$$tardir"' - am__tar_='pax -L -x ustar -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H ustar -L' - am__tar_='find "$tardir" -print | cpio -o -H ustar -L' - am__untar='cpio -i -H ustar -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac + done + am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x ustar -w "$$tardir"' + am__tar_='pax -L -x ustar -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H ustar -L' + am__tar_='find "$tardir" -print | cpio -o -H ustar -L' + am__untar='cpio -i -H ustar -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_ustar}" && break + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_ustar}" && break - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - rm -rf conftest.dir - if test -s conftest.tar; then - { echo "$as_me:$LINENO: $am__untar &5 + rm -rf conftest.dir + if test -s conftest.tar; then + { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } - grep GrepMe conftest.dir/file >/dev/null 2>&1 && break - fi -done -rm -rf conftest.dir + { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 + (cat conftest.dir/file) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + grep GrepMe conftest.dir/file >/dev/null 2>&1 && break + fi + done + rm -rf conftest.dir -if ${am_cv_prog_tar_ustar+:} false; then : + if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } @@ -2999,6 +3187,48 @@ $as_echo "$am_cv_prog_tar_ustar" >&6; } +# POSIX will say in a future version that running "rm -f" with no argument +# is OK; and we want to be able to make that assumption in our Makefile +# recipes. So use an aggressive probe to check that the usage we want is +# actually supported "in the wild" to an acceptable degree. +# See automake bug#10828. +# To make any issue more visible, cause the running configure to be aborted +# by default if the 'rm' program in use doesn't match our expectations; the +# user can still override this though. +if rm -f && rm -fr && rm -rf; then : OK; else + cat >&2 <<'END' +Oops! + +Your 'rm' program seems unable to run without file operands specified +on the command line, even when the '-f' option is present. This is contrary +to the behaviour of most rm programs out there, and not conforming with +the upcoming POSIX standard: + +Please tell bug-automake@gnu.org about your system, including the value +of your $PATH and any error possibly output before this message. This +can help us improve future automake versions. + +END + if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then + echo 'Configuration will proceed anyway, since you have set the' >&2 + echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 + echo >&2 + else + cat >&2 <<'END' +Aborting the configuration process, to ensure you take notice of the issue. + +You can download and install GNU coreutils to get an 'rm' implementation +that behaves properly: . + +If you want to complete the configuration process using your problematic +'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM +to "yes", and re-run configure. + +END + as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 + fi +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } # Check whether --enable-maintainer-mode was given. @@ -3027,10 +3257,10 @@ if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi -case $enable_silent_rules in -yes) AM_DEFAULT_VERBOSITY=0;; -no) AM_DEFAULT_VERBOSITY=1;; -*) AM_DEFAULT_VERBOSITY=0;; +case $enable_silent_rules in # ((( + yes) AM_DEFAULT_VERBOSITY=0;; + no) AM_DEFAULT_VERBOSITY=1;; + *) AM_DEFAULT_VERBOSITY=0;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 @@ -3851,6 +4081,65 @@ ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 +$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } +if ${am_cv_prog_cc_c_o+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF + # Make sure it works both with $CC and with simple cc. + # Following AC_PROG_CC_C_O, we do the test twice because some + # compilers refuse to overwrite an existing .o file with -o, + # though they will create one. + am_cv_prog_cc_c_o=yes + for am_i in 1 2; do + if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 + ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } \ + && test -f conftest2.$ac_objext; then + : OK + else + am_cv_prog_cc_c_o=no + break + fi + done + rm -f core conftest* + unset am_i +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 +$as_echo "$am_cv_prog_cc_c_o" >&6; } +if test "$am_cv_prog_cc_c_o" != yes; then + # Losing compiler, so override with the script. + # FIXME: It is wrong to rewrite CC. + # But if we don't then we get into trouble of one sort or another. + # A longer-term fix would be to have automake use am__CC in this case, + # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" + CC="$am_aux_dir/compile $CC" +fi +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" @@ -3870,7 +4159,7 @@ am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf -# Ignore all kinds of additional output from `make'. +# Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include @@ -3926,8 +4215,8 @@ else # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up - # making a dummy file named `D' -- because `-MD' means `put the output - # in D'. + # making a dummy file named 'D' -- because '-MD' means "put the output + # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're @@ -3962,16 +4251,16 @@ else : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c - # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with - # Solaris 8's {/usr,}/bin/sh. - touch sub/conftst$i.h + # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with + # Solaris 10 /bin/sh. + echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf - # We check with `-c' and `-o' for the sake of the "dashmstdout" + # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly - # handle `-M -o', and we need to detect this. Also, some Intel - # versions had trouble with output in subdirs + # handle '-M -o', and we need to detect this. Also, some Intel + # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in @@ -3980,8 +4269,8 @@ else test "$am__universal" = false || continue ;; nosideeffect) - # after this tag, mechanisms are not by side-effect, so they'll - # only be used when explicitly requested + # After this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else @@ -3989,7 +4278,7 @@ else fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) - # This compiler won't grok `-c -o', but also, the minuso test has + # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} @@ -4667,7 +4956,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4713,7 +5002,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4737,7 +5026,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4782,7 +5071,7 @@ else We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -4806,7 +5095,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ -#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) +#define LARGE_OFF_T ((((off_t) 1 << 31) << 31) - 1 + (((off_t) 1 << 31) << 31)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; @@ -7050,7 +7339,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -7075,7 +7364,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7094,7 +7386,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -11977,17 +12272,17 @@ case "$target_os" in os_win32=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: Win32" >&5 $as_echo "Win32" >&6; } - UUID= + UUID_LIBS= ;; darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 $as_echo "Darwin" >&6; } - UUID= + UUID_LIBS= ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $target_os" >&5 $as_echo "$target_os" >&6; } - UUID=uuid + UUID_LIBS=uuid ;; esac @@ -11998,6 +12293,7 @@ esac + if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. @@ -12120,30 +12416,30 @@ if test -n "$LIBGUPNP_CFLAGS"; then pkg_cv_LIBGUPNP_CFLAGS="$LIBGUPNP_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 \\ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0 \\ gio-2.0 \\ gmodule-2.0 \\ gssdp-1.0 >= 0.13.0 \\ libsoup-2.4 >= 2.28.2 \\ libxml-2.0 \\ - \$UUID\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 \ + \$UUID_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID") 2>&5 + $UUID_LIBS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUPNP_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.24.0 \ + pkg_cv_LIBGUPNP_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID" 2>/dev/null` + $UUID_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12155,30 +12451,30 @@ if test -n "$LIBGUPNP_LIBS"; then pkg_cv_LIBGUPNP_LIBS="$LIBGUPNP_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.24.0 \\ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28.0 \\ gio-2.0 \\ gmodule-2.0 \\ gssdp-1.0 >= 0.13.0 \\ libsoup-2.4 >= 2.28.2 \\ libxml-2.0 \\ - \$UUID\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.24.0 \ + \$UUID_LIBS\""; } >&5 + ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID") 2>&5 + $UUID_LIBS") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_LIBGUPNP_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.24.0 \ + pkg_cv_LIBGUPNP_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID" 2>/dev/null` + $UUID_LIBS" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12199,32 +12495,32 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.24.0 \ + LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID" 2>&1` + $UUID_LIBS" 2>&1` else - LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.24.0 \ + LIBGUPNP_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID" 2>&1` + $UUID_LIBS" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGUPNP_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.24.0 \ + as_fn_error $? "Package requirements (glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID) were not met: + $UUID_LIBS) were not met: $LIBGUPNP_PKG_ERRORS @@ -12410,6 +12706,30 @@ fi +for ac_header in ifaddrs.h +do : + ac_fn_c_check_header_mongrel "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" +if test "x$ac_cv_header_ifaddrs_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_IFADDRS_H 1 +_ACEOF + HAVE_IFADDRS_H=yes +else + HAVE_IFADDRS_H=no +fi + +done + + if test "x$HAVE_IFADDRS_H" = "xyes"; then + HAVE_IFADDRS_H_TRUE= + HAVE_IFADDRS_H_FALSE='#' +else + HAVE_IFADDRS_H_TRUE='#' + HAVE_IFADDRS_H_FALSE= +fi + + + for ac_header in linux/wireless.h do : ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" " #ifdef HAVE_SYS_SOCKET_H @@ -12440,99 +12760,6 @@ else USE_NETWORK_MANAGER_FALSE= fi -if test "x$with_context_manager" = "xnetwork-manager"; then : - -pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GIO" >&5 -$as_echo_n "checking for GIO... " >&6; } - -if test -n "$GIO_CFLAGS"; then - pkg_cv_GIO_CFLAGS="$GIO_CFLAGS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_CFLAGS=`$PKG_CONFIG --cflags "gio-2.0 >= 2.26" 2>/dev/null` - test "x$?" != "x0" && pkg_failed=yes -else - pkg_failed=yes -fi - else - pkg_failed=untried -fi -if test -n "$GIO_LIBS"; then - pkg_cv_GIO_LIBS="$GIO_LIBS" - elif test -n "$PKG_CONFIG"; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gio-2.0 >= 2.26\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gio-2.0 >= 2.26") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - pkg_cv_GIO_LIBS=`$PKG_CONFIG --libs "gio-2.0 >= 2.26" 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 - GIO_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1` - else - GIO_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gio-2.0 >= 2.26" 2>&1` - fi - # Put the nasty error message in config.log where it belongs - echo "$GIO_PKG_ERRORS" >&5 - - as_fn_error $? "Package requirements (gio-2.0 >= 2.26) were not met: - -$GIO_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 GIO_CFLAGS -and GIO_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 GIO_CFLAGS -and GIO_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } -else - GIO_CFLAGS=$pkg_cv_GIO_CFLAGS - GIO_LIBS=$pkg_cv_GIO_LIBS - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - -fi -fi if test "x$with_context_manager" = "xconnman"; then USE_CONNMAN_TRUE= @@ -12553,12 +12780,12 @@ if test -n "$CONNMAN_CFLAGS"; then pkg_cv_CONNMAN_CFLAGS="$CONNMAN_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28 connman >= 0.80\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28 connman >= 0.80") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"connman >= 0.80\""; } >&5 + ($PKG_CONFIG --exists --print-errors "connman >= 0.80") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CONNMAN_CFLAGS=`$PKG_CONFIG --cflags "glib-2.0 >= 2.28 connman >= 0.80" 2>/dev/null` + pkg_cv_CONNMAN_CFLAGS=`$PKG_CONFIG --cflags "connman >= 0.80" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12570,12 +12797,12 @@ if test -n "$CONNMAN_LIBS"; then pkg_cv_CONNMAN_LIBS="$CONNMAN_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"glib-2.0 >= 2.28 connman >= 0.80\""; } >&5 - ($PKG_CONFIG --exists --print-errors "glib-2.0 >= 2.28 connman >= 0.80") 2>&5 + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"connman >= 0.80\""; } >&5 + ($PKG_CONFIG --exists --print-errors "connman >= 0.80") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_CONNMAN_LIBS=`$PKG_CONFIG --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>/dev/null` + pkg_cv_CONNMAN_LIBS=`$PKG_CONFIG --libs "connman >= 0.80" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -12596,14 +12823,14 @@ else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - CONNMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>&1` + CONNMAN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "connman >= 0.80" 2>&1` else - CONNMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "glib-2.0 >= 2.28 connman >= 0.80" 2>&1` + CONNMAN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "connman >= 0.80" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CONNMAN_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.28 connman >= 0.80) were not met: + as_fn_error $? "Package requirements (connman >= 0.80) were not met: $CONNMAN_PKG_ERRORS @@ -12640,8 +12867,14 @@ fi USE_NETLINK=no if test "x$with_context_manager" = "xlinux"; then : if test "x$HAVE_NETLINK" = "xno"; then : - { $as_echo "$as_me:${as_lineno-$LINENO}: No rtnetlink found, falling back to static context manager" >&5 -$as_echo "$as_me: No rtnetlink found, falling back to static context manager" >&6;} + if test "x$HAVE_IFADDRS" = "xyes"; then : + { $as_echo "$as_me:${as_lineno-$LINENO}: No rtnetlink found +elif falling back to static context manager" >&5 +$as_echo "$as_me: No rtnetlink found; then : + falling back to static context manager" >&6;} +else + as_fn_error $? "No rtnetlink nor ifaddrs.h found" "$LINENO" 5 +fi else USE_NETLINK=yes fi @@ -12671,7 +12904,7 @@ else fi if test "x$enable_debug" = "xyes"; then - CFLAGS="$CFLAGS -g -Wall -Werror" + CFLAGS="$CFLAGS -g -Wall -Wextra -Werror" fi @@ -12876,16 +13109,78 @@ fi - # Extract the first word of "gtkdoc-check", so it can be a program name with args. + gtk_doc_requires="gtk-doc >= 1.14" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gtk-doc" >&5 +$as_echo_n "checking for gtk-doc... " >&6; } + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$gtk_doc_requires\""; } >&5 + ($PKG_CONFIG --exists --print-errors "$gtk_doc_requires") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + have_gtk_doc=yes +else + have_gtk_doc=no +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_gtk_doc" >&5 +$as_echo "$have_gtk_doc" >&6; } + + if test "$have_gtk_doc" = "no"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&5 +$as_echo "$as_me: WARNING: + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found." >&2;} + fi + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. set dummy gtkdoc-check; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_GTKDOC_CHECK+:} false; then : +if ${ac_cv_prog_GTKDOC_CHECK+:} false; then : $as_echo_n "(cached) " >&6 else - case $GTKDOC_CHECK in + if test -n "$GTKDOC_CHECK"; then + ac_cv_prog_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_GTKDOC_CHECK="gtkdoc-check.test" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +GTKDOC_CHECK=$ac_cv_prog_GTKDOC_CHECK +if test -n "$GTKDOC_CHECK"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 +$as_echo "$GTKDOC_CHECK" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + # Extract the first word of "gtkdoc-check", so it can be a program name with args. +set dummy gtkdoc-check; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_path_GTKDOC_CHECK_PATH+:} false; then : + $as_echo_n "(cached) " >&6 +else + case $GTKDOC_CHECK_PATH in [\\/]* | ?:[\\/]*) - ac_cv_path_GTKDOC_CHECK="$GTKDOC_CHECK" # Let the user override the test with a path. + ac_cv_path_GTKDOC_CHECK_PATH="$GTKDOC_CHECK_PATH" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -12895,7 +13190,7 @@ do test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_GTKDOC_CHECK="$as_dir/$ac_word$ac_exec_ext" + ac_cv_path_GTKDOC_CHECK_PATH="$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 fi @@ -12906,10 +13201,10 @@ IFS=$as_save_IFS ;; esac fi -GTKDOC_CHECK=$ac_cv_path_GTKDOC_CHECK -if test -n "$GTKDOC_CHECK"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK" >&5 -$as_echo "$GTKDOC_CHECK" >&6; } +GTKDOC_CHECK_PATH=$ac_cv_path_GTKDOC_CHECK_PATH +if test -n "$GTKDOC_CHECK_PATH"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GTKDOC_CHECK_PATH" >&5 +$as_echo "$GTKDOC_CHECK_PATH" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -13022,18 +13317,19 @@ else fi - if test x$enable_gtk_doc = xyes; then - if test -n "$PKG_CONFIG" && \ - { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gtk-doc >= 1.14\""; } >&5 - ($PKG_CONFIG --exists --print-errors "gtk-doc >= 1.14") 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; then - : -else - as_fn_error $? "You need to have gtk-doc >= 1.14 installed to build $PACKAGE_NAME" "$LINENO" 5 -fi - if test "x$PACKAGE_NAME" != "xglib"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 +$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 +$as_echo "$enable_gtk_doc" >&6; } + + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + as_fn_error $? " + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '$0'." "$LINENO" 5 + fi + + if test "x$PACKAGE_NAME" != "xglib"; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTKDOC_DEPS" >&5 @@ -13093,31 +13389,11 @@ fi # Put the nasty error message in config.log where it belongs echo "$GTKDOC_DEPS_PKG_ERRORS" >&5 - as_fn_error $? "Package requirements (glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0) were not met: - -$GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS -and GTKDOC_DEPS_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 GTKDOC_DEPS_CFLAGS -and GTKDOC_DEPS_LIBS to avoid the need to call pkg-config. -See the pkg-config man page for more details. - -To get pkg-config, see . -See \`config.log' for more details" "$LINENO" 5; } + : else GTKDOC_DEPS_CFLAGS=$pkg_cv_GTKDOC_DEPS_CFLAGS GTKDOC_DEPS_LIBS=$pkg_cv_GTKDOC_DEPS_LIBS @@ -13125,14 +13401,8 @@ else $as_echo "yes" >&6; } fi - fi fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build gtk-doc documentation" >&5 -$as_echo_n "checking whether to build gtk-doc documentation... " >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_gtk_doc" >&5 -$as_echo "$enable_gtk_doc" >&6; } - # Check whether --enable-gtk-doc-html was given. if test "${enable_gtk_doc_html+set}" = set; then : enableval=$enable_gtk_doc_html; @@ -13152,6 +13422,18 @@ fi enable_gtk_doc_pdf=no fi + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + + + if test x$have_gtk_doc = xyes; then + HAVE_GTK_DOC_TRUE= + HAVE_GTK_DOC_FALSE='#' +else + HAVE_GTK_DOC_TRUE='#' + HAVE_GTK_DOC_FALSE= +fi if test x$enable_gtk_doc = xyes; then ENABLE_GTK_DOC_TRUE= @@ -13306,6 +13588,14 @@ LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 +$as_echo_n "checking that generated files are newer than configure... " >&6; } + if test -n "$am_sleep_pid"; then + # Hide warnings about reused PIDs. + wait $am_sleep_pid 2>/dev/null + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 +$as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' @@ -13334,6 +13624,10 @@ if test -z "${HAVE_NETLINK_TRUE}" && test -z "${HAVE_NETLINK_FALSE}"; then as_fn_error $? "conditional \"HAVE_NETLINK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_IFADDRS_H_TRUE}" && test -z "${HAVE_IFADDRS_H_FALSE}"; then + as_fn_error $? "conditional \"HAVE_IFADDRS_H\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${USE_NETWORK_MANAGER_TRUE}" && test -z "${USE_NETWORK_MANAGER_FALSE}"; then as_fn_error $? "conditional \"USE_NETWORK_MANAGER\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -13354,6 +13648,10 @@ if test -z "${HAVE_VAPIGEN_TRUE}" && test -z "${HAVE_VAPIGEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_VAPIGEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${HAVE_GTK_DOC_TRUE}" && test -z "${HAVE_GTK_DOC_FALSE}"; then + as_fn_error $? "conditional \"HAVE_GTK_DOC\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${ENABLE_GTK_DOC_TRUE}" && test -z "${ENABLE_GTK_DOC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_GTK_DOC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -13771,7 +14069,7 @@ 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 gupnp $as_me 0.20.5, which was +This file was extended by gupnp $as_me 0.20.12, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13838,7 +14136,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gupnp config.status 0.20.5 +gupnp config.status 0.20.12 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -14854,7 +15152,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { - # Autoconf 2.62 quotes --file arguments for eval, but not when files + # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in @@ -14867,7 +15165,7 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. - # We used to match only the files named `Makefile.in', but + # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. @@ -14901,21 +15199,19 @@ $as_echo X"$mf" | continue fi # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. + # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ - sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || diff --git a/configure.ac b/configure.ac index 0d7e91f..5dd40fb 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([gupnp], - [0.20.5], + [0.20.12], [http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp], [gupnp], [http://www.gupnp.org/]) @@ -34,25 +34,26 @@ case "$target_os" in mingw*|cygwin*) os_win32=yes AC_MSG_RESULT(Win32) - UUID= + UUID_LIBS= ;; darwin*) AC_MSG_RESULT(Darwin) - UUID= + UUID_LIBS= ;; *) AC_MSG_RESULT($target_os) - UUID=uuid + UUID_LIBS=uuid ;; esac +AC_SUBST([UUID_LIBS]) -PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.24.0 \ +PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.28.0 \ gio-2.0 \ gmodule-2.0 \ gssdp-1.0 >= 0.13.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ - $UUID) + $UUID_LIBS) PKG_CHECK_MODULES(GTHREAD, gthread-2.0) AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes") @@ -88,6 +89,12 @@ AC_CHECK_HEADERS([sys/socket.h linux/rtnetlink.h], AM_CONDITIONAL([HAVE_NETLINK], [test "x$HAVE_NETLINK" = "xyes"]) AC_SUBST(HAVE_NETLINK) +AC_CHECK_HEADERS([ifaddrs.h], + [ HAVE_IFADDRS_H=yes ], + [ HAVE_IFADDRS_H=no ]) +AM_CONDITIONAL([HAVE_IFADDRS_H], [test "x$HAVE_IFADDRS_H" = "xyes"]) +AC_SUBST(HAVE_IFADDRS_H) + AC_CHECK_HEADERS([linux/wireless.h], [], [], [ #ifdef HAVE_SYS_SOCKET_H #include @@ -99,20 +106,20 @@ AC_MSG_RESULT([${with_context_manager}]) AM_CONDITIONAL([USE_NETWORK_MANAGER], [test "x$with_context_manager" = "xnetwork-manager"]) -AS_IF([test "x$with_context_manager" = "xnetwork-manager"], - [PKG_CHECK_MODULES(GIO, gio-2.0 >= 2.26)]) AM_CONDITIONAL([USE_CONNMAN], [test "x$with_context_manager" = "xconnman"]) if test "x$with_context_manager" = "xconnman"; then - PKG_CHECK_MODULES(CONNMAN, glib-2.0 >= 2.28 connman >= 0.80) + PKG_CHECK_MODULES(CONNMAN, connman >= 0.80) fi USE_NETLINK=no AS_IF([test "x$with_context_manager" = "xlinux"], [AS_IF([test "x$HAVE_NETLINK" = "xno"], - [AC_MSG_NOTICE([No rtnetlink found, falling back to static context manager])], + [AS_IF([test "x$HAVE_IFADDRS" = "xyes"], + AC_MSG_NOTICE([No rtnetlink found, falling back to static context manager]), + AC_MSG_ERROR([No rtnetlink nor ifaddrs.h found]))], [USE_NETLINK=yes]) ],[]) @@ -128,7 +135,7 @@ AC_ARG_ENABLE(debug, AS_HELP_STRING([--enable-debug], [enable debugging]),, enable_debug=no) if test "x$enable_debug" = "xyes"; then - CFLAGS="$CFLAGS -g -Wall -Werror" + CFLAGS="$CFLAGS -g -Wall -Wextra -Werror" fi GOBJECT_INTROSPECTION_CHECK([0.6.4]) diff --git a/doc/Makefile.in b/doc/Makefile.in index 65cf76b..fa953ef 100644 --- a/doc/Makefile.in +++ b/doc/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -21,23 +20,51 @@ # Everything below here is generic # #################################### VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -57,8 +84,8 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/version.xml.in $(top_srcdir)/gtk-doc.make +DIST_COMMON = $(top_srcdir)/gtk-doc.make $(srcdir)/Makefile.in \ + $(srcdir)/Makefile.am $(srcdir)/version.xml.in subdir = doc ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ @@ -72,12 +99,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = version.xml CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -85,6 +118,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -113,17 +147,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -176,6 +210,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -370,11 +405,42 @@ REPORT_FILES = \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = -@ENABLE_GTK_DOC_TRUE@@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test +@GTK_DOC_BUILD_HTML_FALSE@HTML_BUILD_STAMP = +@GTK_DOC_BUILD_HTML_TRUE@HTML_BUILD_STAMP = html-build.stamp +@GTK_DOC_BUILD_PDF_FALSE@PDF_BUILD_STAMP = +@GTK_DOC_BUILD_PDF_TRUE@PDF_BUILD_STAMP = pdf-build.stamp + +#### setup #### +GTK_DOC_V_SETUP = $(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_ = $(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0 = @echo " DOC Preparing build"; + +#### scan #### +GTK_DOC_V_SCAN = $(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_ = $(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0 = @echo " DOC Scanning header files"; +GTK_DOC_V_INTROSPECT = $(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_ = $(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0 = @echo " DOC Introspecting gobjects"; + +#### xml #### +GTK_DOC_V_XML = $(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_ = $(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0 = @echo " DOC Building XML"; + +#### html #### +GTK_DOC_V_HTML = $(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_ = $(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0 = @echo " DOC Building HTML"; +GTK_DOC_V_XREF = $(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_ = $(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0 = @echo " DOC Fixing cross-references"; + +#### pdf #### +GTK_DOC_V_PDF = $(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_ = $(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0 = @echo " DOC Building PDF"; # Files not to distribute # for --rebuild-types in $(SCAN_OPTIONS), e.g. $(DOC_MODULE).types @@ -429,11 +495,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -471,6 +537,7 @@ distdir: $(DISTFILES) dist-hook check-am: all-am check: check-am +@ENABLE_GTK_DOC_FALSE@all-local: all-am: Makefile all-local installdirs: install: install-am @@ -574,53 +641,55 @@ uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am all-local check check-am clean clean-generic \ - clean-libtool clean-local dist-hook distclean \ - distclean-generic distclean-libtool distclean-local distdir \ - dvi dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-data-local install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic \ + clean-libtool clean-local cscopelist-am ctags-am dist-hook \ + distclean distclean-generic distclean-libtool distclean-local \ + distdir dvi dvi-am html html-am info info-am install \ + install-am install-data install-data-am install-data-local \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am uninstall uninstall-am \ - uninstall-local + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-local -@ENABLE_GTK_DOC_TRUE@all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -@ENABLE_GTK_DOC_FALSE@all-local: +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +@ENABLE_GTK_DOC_TRUE@all-local: all-gtk-doc docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) $(REPORT_FILES): sgml-build.stamp -#### setup #### - setup-build.stamp: - -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - echo ' DOC Preparing build'; \ + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi - @touch setup-build.stamp - -#### scan #### + $(AM_V_at)touch setup-build.stamp -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo ' DOC Scanning header files' - @_source_dir='' ; \ +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - echo " DOC Introspecting gobjects"; \ + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ @@ -635,32 +704,25 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) test -f $$i || touch $$i ; \ done \ fi - @touch scan-build.stamp + $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true -#### xml #### - sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) - @echo ' DOC Building XML' - @_source_dir='' ; \ + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - @touch sgml-build.stamp + $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true -#### html #### - html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building HTML' - @rm -rf html - @mkdir html - @mkhtml_options=""; \ + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ @@ -681,16 +743,12 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; - @echo ' DOC Fixing cross-references' - @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - @touch html-build.stamp - -#### pdf #### + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building PDF' - @rm -f $(DOC_MODULE).pdf - @mkpdf_options=""; \ + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ @@ -707,13 +765,16 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - @touch pdf-build.stamp + $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ @@ -722,7 +783,7 @@ distclean-local: rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ fi -maintainer-clean-local: clean +maintainer-clean-local: @rm -rf xml html install-data-local: @@ -758,12 +819,14 @@ uninstall-local: # # Require gtk-doc when making dist # -@ENABLE_GTK_DOC_TRUE@dist-check-gtkdoc: -@ENABLE_GTK_DOC_FALSE@dist-check-gtkdoc: -@ENABLE_GTK_DOC_FALSE@ @echo "*** gtk-doc must be installed and enabled in order to make dist" -@ENABLE_GTK_DOC_FALSE@ @false - -dist-hook: dist-check-gtkdoc dist-hook-local +@HAVE_GTK_DOC_TRUE@dist-check-gtkdoc: docs +@HAVE_GTK_DOC_FALSE@dist-check-gtkdoc: +@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc is needed to run 'make dist'. ***" +@HAVE_GTK_DOC_FALSE@ @echo "*** gtk-doc was not found when 'configure' ran. ***" +@HAVE_GTK_DOC_FALSE@ @echo "*** please install gtk-doc and rerun 'configure'. ***" +@HAVE_GTK_DOC_FALSE@ @false + +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/html @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ diff --git a/doc/gupnp-docs.xml b/doc/gupnp-docs.xml index d7fb919..17ce5f7 100644 --- a/doc/gupnp-docs.xml +++ b/doc/gupnp-docs.xml @@ -69,12 +69,18 @@ + + + Network context handling + + + + Utility Functions - - + diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt index e0cd73c..81df876 100644 --- a/doc/gupnp-sections.txt +++ b/doc/gupnp-sections.txt @@ -85,7 +85,10 @@ gupnp_service_proxy_end_action_hash gupnp_service_proxy_end_action_list gupnp_service_proxy_cancel_action gupnp_service_proxy_add_notify +gupnp_service_proxy_add_notify_full +gupnp_service_proxy_add_raw_notify gupnp_service_proxy_remove_notify +gupnp_service_proxy_remove_raw_notify gupnp_service_proxy_set_subscribed gupnp_service_proxy_get_subscribed @@ -180,9 +183,12 @@ gupnp_context_set_subscription_timeout gupnp_context_get_subscription_timeout gupnp_context_get_default_language gupnp_context_set_default_language +gupnp_context_add_server_handler gupnp_context_host_path gupnp_context_host_path_for_agent gupnp_context_unhost_path +gupnp_context_get_acl +gupnp_context_set_acl GUPnPContextClass GUPNP_CONTEXT @@ -278,6 +284,7 @@ gupnp_service_info_get_control_url gupnp_service_info_get_event_subscription_url gupnp_service_info_get_introspection gupnp_service_info_get_introspection_async +gupnp_service_info_get_introspection_async_full GUPnPServiceInfoClass GUPNP_SERVICE_INFO @@ -451,6 +458,7 @@ gupnp_windows_context_manager_get_type GUPnPWhiteList GUPnPWhiteList gupnp_white_list_add_entry +gupnp_white_list_add_entryv gupnp_white_list_check_context gupnp_white_list_clear gupnp_white_list_set_enabled @@ -471,3 +479,20 @@ GUPnPWhiteListClass GUPnPWhiteListPrivate + +
+gupnp-acl +GUPnPAcl +GUPnPAcl +GUPnPAclInterface +gupnp_acl_can_sync +gupnp_acl_is_allowed +gupnp_acl_is_allowed_async +gupnp_acl_is_allowed_finish + +gupnp_acl_get_type +GUPNP_ACL +GUPNP_ACL_GET_INTERFACE +GUPNP_IS_ACL +GUPNP_TYPE_ACL +
diff --git a/doc/gupnp.types b/doc/gupnp.types index f8f6b0d..f5b7bab 100644 --- a/doc/gupnp.types +++ b/doc/gupnp.types @@ -1,5 +1,6 @@ #include +gupnp_acl_get_type gupnp_context_get_type gupnp_context_manager_get_type gupnp_control_point_get_type @@ -21,3 +22,4 @@ gupnp_time_get_type gupnp_time_tz_get_type gupnp_uri_get_type gupnp_uuid_get_type +gupnp_white_list_get_type diff --git a/doc/html/GUPnPAcl.html b/doc/html/GUPnPAcl.html new file mode 100644 index 0000000..082f1b9 --- /dev/null +++ b/doc/html/GUPnPAcl.html @@ -0,0 +1,413 @@ + + + + +GUPnP Reference Manual: GUPnPAcl + + + + + + + + + + + + + + + + +
+
+
+ + +
+

GUPnPAcl

+

GUPnPAcl — Object providing a simple access control list for +GUPnP.

+
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + +
+gboolean + +gupnp_acl_can_sync () +
+gboolean + +gupnp_acl_is_allowed () +
+void + +gupnp_acl_is_allowed_async () +
+gboolean + +gupnp_acl_is_allowed_finish () +
+
+
+

Types and Values

+
++++ + + + + + + + + + + +
 GUPnPAcl
structGUPnPAclInterface
+
+
+

Object Hierarchy

+
    GInterface
+    ╰── GUPnPAcl
+
+
+
+

Prerequisites

+

+GUPnPAcl requires + GObject.

+
+
+

Description

+

GUPnPAcl provides either synchronous or asynchronous functions to check +whether a peer sould be able to access a resource or not.

+
+
+

Functions

+
+

gupnp_acl_can_sync ()

+
gboolean
+gupnp_acl_can_sync (GUPnPAcl *self);
+

Check whether gupnp_acl_is_allowed_async() is supported.

+
+

Parameters

+
+++++ + + + + + +

self

A GUPnPAcl +returns +TRUE, if gupnp_acl_is_allowed_async() is supported, FALSE +otherwise.

 
+
+

Since 0.20.11

+
+
+
+

gupnp_acl_is_allowed ()

+
gboolean
+gupnp_acl_is_allowed (GUPnPAcl *self,
+                      GUPnPDevice *device,
+                      GUPnPService *service,
+                      const char *path,
+                      const char *address,
+                      const char *agent);
+

Check whether an IP address is allowed to access this resource.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

self

an instance of GUPnPAcl

 

device

The GUPnPDevice associated with path +or NULL if +unknown.

[allow-none]

service

The GUPnPService associated with path +or NULL if +unknown.

[allow-none]

path

The path being served.

 

address

IP address of the peer.

 

agent

The User-Agent header of the peer or NULL if not +unknown. +returns +TRUE if the peer is allowed, FALSE otherwise.

[allow-none]
+
+

Since 0.20.11

+
+
+
+

gupnp_acl_is_allowed_async ()

+
void
+gupnp_acl_is_allowed_async (GUPnPAcl *self,
+                            GUPnPDevice *device,
+                            GUPnPService *service,
+                            const char *path,
+                            const char *address,
+                            const char *agent,
+                            GCancellable *cancellable,
+                            GAsyncReadyCallback callback,
+                            gpointer user_data);
+

Optional. Check asynchronously whether an IP address is allowed to access +this resource. Use this function if the process of verifying the access right +is expected to take some time, for example when using D-Bus etc.

+

If this function is supported, gupnp_acl_can_sync() should return TRUE.

+

Use gupnp_acl_is_allowed_finish() to retrieve the result.

+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

self

a GUPnPAcl

 

device

The GUPnPDevice associated with path +or NULL if +unknown.

[allow-none]

service

The GUPnPService associated with path +or NULL if +unknown.

[allow-none]

path

The path being served.

 

address

IP address of the peer

 

agent

The User-Agent header of the peer or NULL if not +unknown.

[allow-none]

cancellable

A GCancellable which can be used to cancel the +operation.

[allow-none]

callback

Callback to call after the function is done.

 

user_data

Some user data.

 
+
+

Since 0.20.11

+
+
+
+

gupnp_acl_is_allowed_finish ()

+
gboolean
+gupnp_acl_is_allowed_finish (GUPnPAcl *self,
+                             GAsyncResult *res,
+                             GError **error);
+
+

Parameters

+
+++++ + + + + + + + + + + + + + + + + + +

self

An instance of GUPnPAcl

 

res

GAsyncResult obtained from the callback in gupnp_acl_is_allowed_async()

 

error

A return location for a GError describing the failure +returns +TRUE if the authentication was successful, FALSE otherwise and on +error. Check error +for details.

[allow-none]
+
+

Since 0.20.11

+
+
+
+

Types and Values

+
+

GUPnPAcl

+
typedef struct _GUPnPAcl GUPnPAcl;
+

Handle to an object implementing the GUPnPAclInterface interface.

+
+
+
+

struct GUPnPAclInterface

+
struct GUPnPAclInterface {
+    GTypeInterface parent;
+
+    gboolean (*is_allowed) (GUPnPAcl     *self,
+                            GUPnPDevice  *device,
+                            GUPnPService *service,
+                            const char   *path,
+                            const char   *address,
+                            const char   *agent);
+
+    void     (*is_allowed_async) (GUPnPAcl           *self,
+                                  GUPnPDevice        *device,
+                                  GUPnPService       *service,
+                                  const char         *path,
+                                  const char         *address,
+                                  const char         *agent,
+                                  GCancellable       *cancellable,
+                                  GAsyncReadyCallback callback,
+                                  gpointer            user_data);
+
+    gboolean (*is_allowed_finish) (GUPnPAcl      *self,
+                                   GAsyncResult  *res,
+                                   GError       **error);
+
+    gboolean (*can_sync)          (GUPnPAcl *self);
+};
+
+

Implement a simple access control list for GUPnP.

+
+

Members

+
+++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + +

GTypeInterface parent;

The parent interface.

 

is_allowed ()

Check whether access to the resource is granted.

 

is_allowed_async ()

Asynchronously check whether the access is granted.

 

is_allowed_finish ()

Conclude the is_allowed_async +operation.

 

can_sync ()

Whether the ACL can do sync queries.

 
+
+

Since 0.20.11

+
+
+
+ + + \ No newline at end of file diff --git a/doc/html/GUPnPContext.html b/doc/html/GUPnPContext.html index dd20240..4ae2597 100644 --- a/doc/html/GUPnPContext.html +++ b/doc/html/GUPnPContext.html @@ -2,36 +2,29 @@ -GUPnPContext - +GUPnP Reference Manual: GUPnPContext + - - + + - + - - - - - - - - - - + + + + + + +
@@ -39,464 +32,818 @@

GUPnPContext

GUPnPContext — Context object wrapping shared networking bits.

- +
-
-

Synopsis

-
struct              GUPnPContext;
-GUPnPContext *      gupnp_context_new                   (GMainContext *main_context,
-                                                         const char *iface,
-                                                         guint port,
-                                                         GError **error);
-const char *        gupnp_context_get_host_ip           (GUPnPContext *context);
-guint               gupnp_context_get_port              (GUPnPContext *context);
-SoupServer *        gupnp_context_get_server            (GUPnPContext *context);
-SoupSession *       gupnp_context_get_session           (GUPnPContext *context);
-void                gupnp_context_set_subscription_timeout
-                                                        (GUPnPContext *context,
-                                                         guint timeout);
-guint               gupnp_context_get_subscription_timeout
-                                                        (GUPnPContext *context);
-const char *        gupnp_context_get_default_language  (GUPnPContext *context);
-void                gupnp_context_set_default_language  (GUPnPContext *context,
-                                                         const char *language);
-void                gupnp_context_host_path             (GUPnPContext *context,
-                                                         const char *local_path,
-                                                         const char *server_path);
-gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
-                                                         const char *local_path,
-                                                         const char *server_path,
-                                                         GRegex *user_agent);
-void                gupnp_context_unhost_path           (GUPnPContext *context,
-                                                         const char *server_path);
-
-
-
-

Object Hierarchy

-
-  GObject
-   +----GSSDPClient
-         +----GUPnPContext
-
-
-

Implemented Interfaces

-

-GUPnPContext implements - GInitable.

-
-
-

Properties

-
-  "default-language"         gchar*                : Read / Write / Construct
-  "port"                     guint                 : Read / Write / Construct Only
-  "server"                   SoupServer*           : Read
-  "session"                  SoupSession*          : Read
-  "subscription-timeout"     guint                 : Read / Write / Construct Only
-
-
-
-

Description

-

-GUPnPContext wraps the networking bits that are used by the various -GUPnP classes. It automatically starts a web server on demand. -

-

-For debugging, it is possible to see the messages being sent and received by -exporting GUPNP_DEBUG. -

-
-
-

Details

-
-

struct GUPnPContext

-
struct GUPnPContext;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_context_new ()

-
GUPnPContext *      gupnp_context_new                   (GMainContext *main_context,
-                                                         const char *iface,
-                                                         guint port,
-                                                         GError **error);
-

-Create a new GUPnPContext with the specified main_context, iface and -port. -

-
-+

Functions

+
++++ - - + - - + - - + + - - + - - + + - -

main_context :

Deprecated: 0.17.2: Always set to NULL. If you -want to use a different context, use g_main_context_push_thread_default(). [allow-none] + +GUPnPContext * + +gupnp_context_new ()

iface :

The network interface to use, or NULL to -auto-detect. [allow-none] +const char * + +gupnp_context_get_host_ip ()

port :

Port to run on, or 0 if you don't care what port is used. +guint + +gupnp_context_get_port () +

error :

A location to store a GError, or NULL + +SoupServer * + +gupnp_context_get_server ()

Returns :

A new GUPnPContext object, or NULL on an error +SoupSession * + +gupnp_context_get_session () +
-
-
-
-

gupnp_context_get_host_ip ()

-
const char *        gupnp_context_get_host_ip           (GUPnPContext *context);
-
-

Warning

-

gupnp_context_get_host_ip has been deprecated since version 0.12.7 and should not be used in newly-written code. The "host-ip" property has moved to the base class -GSSDPClient so newer applications should use -gssdp_client_get_host_ip instead.

-
-

-Get the IP address we advertise ourselves as using. -

-
-- - - + - - + + - -

context :

A GUPnPContext + +void + +gupnp_context_set_subscription_timeout ()

Returns :

The IP address. This string should not be freed. +guint + +gupnp_context_get_subscription_timeout () +
-
-
-
-

gupnp_context_get_port ()

-
guint               gupnp_context_get_port              (GUPnPContext *context);
-

-Get the port that the SOAP server is running on. -

-
-- - - + - - + + + + + + + + + + + + + + + + + + - -

context :

A GUPnPContext +const char * + +gupnp_context_get_default_language ()

Returns :

The port the SOAP server is running on. +void + +gupnp_context_set_default_language () +
+void + +gupnp_context_add_server_handler () +
+void + +gupnp_context_host_path () +
+gboolean + +gupnp_context_host_path_for_agent () +
+void + +gupnp_context_unhost_path () +
-
-
-
-

gupnp_context_get_server ()

-
SoupServer *        gupnp_context_get_server            (GUPnPContext *context);
-

-Get the SoupServer HTTP server that GUPnP is using. -

-
-- - - + - - +

context :

A GUPnPContext + +GUPnPAcl * + +gupnp_context_get_acl ()

Returns :

The SoupServer used by GUPnP. Do not unref this when finished. [transfer none] + +void + +gupnp_context_set_acl ()
-
-
-

gupnp_context_get_session ()

-
SoupSession *       gupnp_context_get_session           (GUPnPContext *context);
-

-Get the SoupSession object that GUPnP is using. -

-
-+
+

Properties

+
+++++ - - + + + - - + + + + + + + + + + + + + + + + + + + + + + +

context :

A GUPnPContext - +GUPnPAcl *aclRead / Write / Construct

Returns :

The SoupSession used by GUPnP. Do not unref -this when finished. [transfer none] - +gchar *default-languageRead / Write / Construct
guintportRead / Write / Construct Only
+SoupServer *serverRead
+SoupSession *sessionRead
guintsubscription-timeoutRead / Write / Construct Only
-
-
-

gupnp_context_set_subscription_timeout ()

-
void                gupnp_context_set_subscription_timeout
-                                                        (GUPnPContext *context,
-                                                         guint timeout);
+
+

Types and Values

+
++++ + + + + +
structGUPnPContext
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GSSDPClient
+        ╰── GUPnPContext
+
+
+
+

Implemented Interfaces

-Sets the event subscription timeout to timeout. Use 0 if you don't -want subscriptions to time out. Note that any client side subscriptions -will automatically be renewed. -

-
-+GUPnPContext implements + GInitable.

+ +
+

Description

+

GUPnPContext wraps the networking bits that are used by the various +GUPnP classes. It automatically starts a web server on demand.

+

For debugging, it is possible to see the messages being sent and received by +exporting GUPNP_DEBUG.

+
+
+

Functions

+
+

gupnp_context_new ()

+
GUPnPContext *
+gupnp_context_new (GMainContext *main_context,
+                   const char *iface,
+                   guint port,
+                   GError **error);
+

Create a new GUPnPContext with the specified main_context +, iface + and +port +.

+
+

Parameters

+
+++++ - - + + + + + + + + + + + + + - - + + +

context :

A GUPnPContext -

main_context

Deprecated: 0.17.2: Always set to NULL. If you +want to use a different context, use g_main_context_push_thread_default().

[allow-none]

iface

The network interface to use, or NULL to +auto-detect.

[allow-none]

port

Port to run on, or 0 if you don't care what port is used.

 

timeout :

Event subscription timeout in seconds

error

A location to store a GError, or NULL

 
+
+

Returns

+

A new GUPnPContext object, or NULL on an error

+

+
+

-

gupnp_context_get_subscription_timeout ()

-
guint               gupnp_context_get_subscription_timeout
-                                                        (GUPnPContext *context);
-

-Get the event subscription timeout (in seconds), or 0 meaning there is no -timeout. -

-
-+

gupnp_context_get_host_ip ()

+
const char *
+gupnp_context_get_host_ip (GUPnPContext *context);
+
+

gupnp_context_get_host_ip has been deprecated since version 0.12.7 and should not be used in newly-written code.

+

The "host-ip" property has moved to the base class +GSSDPClient so newer applications should use +gssdp_client_get_host_ip instead.

+
+

Get the IP address we advertise ourselves as using.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The IP address. This string should not be freed.

+

+
+
+
+
+

gupnp_context_get_port ()

+
guint
+gupnp_context_get_port (GUPnPContext *context);
+

gupnp_context_get_port is deprecated and should not be used in newly-written code.

+

Get the port that the SOAP server is running on.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The port the SOAP server is running on.

+

+
+
+
+
+

gupnp_context_get_server ()

+
SoupServer *
+gupnp_context_get_server (GUPnPContext *context);
+

Get the SoupServer HTTP server that GUPnP is using.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The SoupServer used by GUPnP. Do not unref this when finished.

+

[transfer none]

+
+
+
+
+

gupnp_context_get_session ()

+
SoupSession *
+gupnp_context_get_session (GUPnPContext *context);
+

Get the SoupSession object that GUPnP is using.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The SoupSession used by GUPnP. Do not unref +this when finished.

+

[transfer none]

+
+

Since 0.12.3

+
+
+
+

gupnp_context_set_subscription_timeout ()

+
void
+gupnp_context_set_subscription_timeout
+                               (GUPnPContext *context,
+                                guint timeout);
+

Sets the event subscription timeout to timeout +. Use 0 if you don't +want subscriptions to time out. Note that any client side subscriptions +will automatically be renewed.

+
+

Parameters

+
+++++ - - + + + - - + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

Returns :

The event subscription timeout in seconds.

timeout

Event subscription timeout in seconds

 
+

-

gupnp_context_get_default_language ()

-
const char *        gupnp_context_get_default_language  (GUPnPContext *context);
-

-Get the default Content-Language header for this context. -

-
-+

gupnp_context_get_subscription_timeout ()

+
guint
+gupnp_context_get_subscription_timeout
+                               (GUPnPContext *context);
+

Get the event subscription timeout (in seconds), or 0 meaning there is no +timeout.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The event subscription timeout in seconds.

+

+
+
+
+
+

gupnp_context_get_default_language ()

+
const char *
+gupnp_context_get_default_language (GUPnPContext *context);
+

Get the default Content-Language header for this context.

+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The default content of the Content-Language +header.

+

[transfer none]

+
+

Since 0.17.0

+
+
+
+

gupnp_context_set_default_language ()

+
void
+gupnp_context_set_default_language (GUPnPContext *context,
+                                    const char *language);
+

Set the default language for the Content-Length header to language +.

+

If the client sends an Accept-Language header the UPnP HTTP server +is required to send a Content-Language header in return. If there are +no files hosted in languages which match the requested ones the +Content-Language header is set to this value. The default value is "en".

+
+

Parameters

+
+++++ - - + + + - - + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

Returns :

The default content of the Content-Language -header. [transfer none] -

language

A language tag as defined in RFC 2616 3.10

 
+

Since 0.17.0

+

-

gupnp_context_set_default_language ()

-
void                gupnp_context_set_default_language  (GUPnPContext *context,
-                                                         const char *language);
-

-Set the default language for the Content-Length header to language. -

-

-If the client sends an Accept-Language header the UPnP HTTP server -is required to send a Content-Language header in return. If there are -no files hosted in languages which match the requested ones the -Content-Language header is set to this value. The default value is "en". -

-
-+

gupnp_context_add_server_handler ()

+
void
+gupnp_context_add_server_handler (GUPnPContext *context,
+                                  gboolean use_acl,
+                                  const char *path,
+                                  SoupServerCallback callback,
+                                  gpointer user_data,
+                                  GDestroyNotify destroy);
+

Add a SoupServerCallback to the GUPnPContext's SoupServer.

+
+

Parameters

+
+++++ - - + + + + + + + + + + + + + + + + + + - - + + + + + + + +

context :

A GUPnPContext -

context

a GUPnPContext

 

use_acl

TRUE, if the path should query the GUPnPContext::acl before +serving the resource, FALSE otherwise.

 

path

the toplevel path for the handler.

 

callback

callback to invoke for requests under path +

 

language :

A language tag as defined in RFC 2616 3.10

user_data

the user_data passed to callback +

 

destroy

A GDestroyNotify for user_data +or NULL if none.

[allow-none]
+

Since 0.20.11

+
-

gupnp_context_host_path ()

-
void                gupnp_context_host_path             (GUPnPContext *context,
-                                                         const char *local_path,
-                                                         const char *server_path);
-

-Start hosting local_path at server_path. Files with the path -local_path.LOCALE (if they exist) will be served up when LOCALE is -specified in the request's Accept-Language header. -

-
-+

gupnp_context_host_path ()

+
void
+gupnp_context_host_path (GUPnPContext *context,
+                         const char *local_path,
+                         const char *server_path);
+

Start hosting local_path + at server_path +. Files with the path +local_path.LOCALE + (if they exist) will be served up when LOCALE is +specified in the request's Accept-Language header.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

local_path :

Path to the local file or folder to be hosted

local_path

Path to the local file or folder to be hosted

 

server_path :

Web server path where local_path should be hosted

server_path

Web server path where local_path +should be hosted

 
+
-

gupnp_context_host_path_for_agent ()

-
gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
-                                                         const char *local_path,
-                                                         const char *server_path,
-                                                         GRegex *user_agent);
-

-Use this method to serve different local path to specific user-agent(s). The -path server_path must already be hosted by context. -

-
-+

gupnp_context_host_path_for_agent ()

+
gboolean
+gupnp_context_host_path_for_agent (GUPnPContext *context,
+                                   const char *local_path,
+                                   const char *server_path,
+                                   GRegex *user_agent);
+

Use this method to serve different local path to specific user-agent(s). The +path server_path + must already be hosted by context +.

+
+

Parameters

+
+++++ - - + + + + + + + + - - + + + - - + + + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

local_path

Path to the local file or folder to be hosted

 

local_path :

Path to the local file or folder to be hosted

server_path

Web server path already being hosted

 

server_path :

Web server path already being hosted

user_agent

The user-agent as a GRegex.

 
+
+
+

Returns

+

TRUE on success, FALSE otherwise.

+

+
+

Since 0.13.3

+ +
+
+

gupnp_context_unhost_path ()

+
void
+gupnp_context_unhost_path (GUPnPContext *context,
+                           const char *server_path);
+

Stop hosting the file or folder at server_path +.

+
+

Parameters

+
+++++ + - - + + + - - + + +

user_agent :

The user-agent as a GRegex.

context

A GUPnPContext

 

Returns :

-TRUE on success, FALSE otherwise.

server_path

Web server path where the file or folder is hosted

 
+

-

gupnp_context_unhost_path ()

-
void                gupnp_context_unhost_path           (GUPnPContext *context,
-                                                         const char *server_path);
-

-Stop hosting the file or folder at server_path. -

-
-+

gupnp_context_get_acl ()

+
GUPnPAcl *
+gupnp_context_get_acl (GUPnPContext *context);
+
+

Parameters

+
+++++ + + + + + +

context

A GUPnPContext

 
+
+
+

Returns

+

The access control list associated with this context or NULL +if no acl is set.

+

[transfer none]

+
+

Since 0.20.11

+ +
+
+

gupnp_context_set_acl ()

+
void
+gupnp_context_set_acl (GUPnPContext *context,
+                       GUPnPAcl *acl);
+
+

Parameters

+
+++++ - - + + + - - + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

server_path :

Web server path where the file or folder is hosted

acl

The new access control list or NULL to remove the +current list.

[allow-none]
+

Since 0.20.11

+
+ +
+

Types and Values

+
+

struct GUPnPContext

+
struct GUPnPContext;
+

This struct contains private data only, and should be accessed using the +functions below.

+

Property Details

-

The "default-language" property

-
  "default-language"         gchar*                : Read / Write / Construct
-

-The content of the Content-Language header id the client +

The “acl” property

+
  “acl”                      GUPnPAcl *
+

An access control list.

+

Flags: Read / Write / Construct

+

Since 0.20.11

+
+
+
+

The “default-language” property

+
  “default-language”         gchar *
+

The content of the Content-Language header id the client sends Accept-Language and no language-specific pages to serve -exist. The property defaults to 'en'. -

+exist. The property defaults to 'en'.

+

Flags: Read / Write / Construct

Default value: "en"

+

Since 0.17.0


-

The "port" property

-
  "port"                     guint                 : Read / Write / Construct Only
-

-The port to run on. Set to 0 if you don't care what port to run on. -

+

The “port” property

+
  “port”                     guint
+

The port to run on. Set to 0 if you don't care what port to run on.

+

Flags: Read / Write / Construct Only

Default value: 0


-

The "server" property

-
  "server"                   SoupServer*           : Read
-

-The SoupServer HTTP server used by GUPnP. -

+

The “server” property

+
  “server”                   SoupServer *
+

The SoupServer HTTP server used by GUPnP.

+

Flags: Read


-

The "session" property

-
  "session"                  SoupSession*          : Read
-

-The SoupSession object used by GUPnP. -

+

The “session” property

+
  “session”                  SoupSession *
+

The SoupSession object used by GUPnP.

+

Flags: Read


-

The "subscription-timeout" property

-
  "subscription-timeout"     guint                 : Read / Write / Construct Only
-

-The preferred subscription timeout: the number of seconds after +

The “subscription-timeout” property

+
  “subscription-timeout”     guint
+

The preferred subscription timeout: the number of seconds after which subscriptions are renewed. Set to '0' if subscriptions -are never to time out. -

+ +are never to time out.

+

Flags: Read / Write / Construct Only

Allowed values: <= 604800

Default value: 1800

@@ -504,6 +851,6 @@ are never to time out.
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPContextManager.html b/doc/html/GUPnPContextManager.html index 97b7da3..38ba138 100644 --- a/doc/html/GUPnPContextManager.html +++ b/doc/html/GUPnPContextManager.html @@ -2,374 +2,529 @@ -GUPnPContextManager - +GUPnP Reference Manual: GUPnPContextManager + - + - - + + - - - - - - - - - - + + + + + + +
- +

GUPnPContextManager

-

GUPnPContextManager — Manages GUPnPContext objects.

+

GUPnPContextManager — Manages GUPnPContext objects.

-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPContextManager
-
+

Functions

+

Properties

-
-  "main-context"             gpointer              : Read / Write / Construct Only
-  "port"                     guint                 : Read / Write / Construct Only
-  "white-list"               GUPnPWhiteList*       : Read
-
+
+++++ + + + + + + + + + + + + + + + + + +
gpointermain-contextRead / Write / Construct Only
guintportRead / Write / Construct Only
+GUPnPWhiteList *white-listRead

Signals

-
-  "context-available"                              : Run First
-  "context-unavailable"                            : Run First
+
+++++ + + + + + + + + + + + + +
voidcontext-availableRun First
voidcontext-unavailableRun First
+
+
+

Types and Values

+
++++ + + + + +
structGUPnPContextManager
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPContextManager
 

Description

-

-A Utility class that takes care of creation and destruction of +

A Utility class that takes care of creation and destruction of GUPnPContext objects for all available network interfaces as they go up -(connect) and down (disconnect), respectively. -

+(connect) and down (disconnect), respectively.

-

Details

+

Functions

-

struct GUPnPContextManager

-
struct GUPnPContextManager;
-

-This struct contains private data only, and should be accessed using the -functions below. -

+

gupnp_context_manager_new ()

+
GUPnPContextManager *
+gupnp_context_manager_new (GMainContext *main_context,
+                           guint port);
+
+

gupnp_context_manager_new has been deprecated since version 0.17.2 and should not be used in newly-written code.

+

Use gupnp_context_manager_create().

-
-
-

gupnp_context_manager_new ()

-
GUPnPContextManager * gupnp_context_manager_new         (GMainContext *main_context,
-                                                         guint port);
-
-

Warning

-

gupnp_context_manager_new has been deprecated since version 0.17.2 and should not be used in newly-written code. Use gupnp_context_manager_create().

-
-

-Same as gupnp_context_manager_create(). -

-
-+

Same as gupnp_context_manager_create().

+
+

Parameters

+
+++++ - - + - - - - +g_main_context_push_thread_default() instead.

+ - - + + +

main_context :

Deprecated: 0.17.2: NULL. If you want to use +

main_context

Deprecated: 0.17.2: NULL. If you want to use a different main context use -g_main_context_push_thread_default() instead. [allow-none] -

port :

Port to create contexts for, or 0 if you don't care what port is used.[allow-none]

Returns :

A new GUPnPContextManager object. [transfer full] -

port

Port to create contexts for, or 0 if you don't care what port is used.

 
+
+

Returns

+

A new GUPnPContextManager object.

+

[transfer full]

+
+

Since 0.13.0

+

-

gupnp_context_manager_create ()

-
GUPnPContextManager * gupnp_context_manager_create      (guint port);
-

-Factory-method to create a new GUPnPContextManager. The final type of the +

gupnp_context_manager_create ()

+
GUPnPContextManager *
+gupnp_context_manager_create (guint port);
+

Factory-method to create a new GUPnPContextManager. The final type of the GUPnPContextManager depends on the compile-time selection or - in case of NetworkManager - on its availability during runtime. If it is not available, -the implementation falls back to the basic Unix context manager instead. -

-
-- - - - - - - - - - +the implementation falls back to the basic Unix context manager instead.

+
+

Parameters

+

port :

Port to create contexts for, or 0 if you don't care what port is used.

Returns :

A new GUPnPContextManager object. [transfer full] -
+++++ + + + + +

port

Port to create contexts for, or 0 if you don't care what port is used.

 
+
+

Returns

+

A new GUPnPContextManager object.

+

[transfer full]

+
+

Since 0.17.2

+

-

gupnp_context_manager_rescan_control_points ()

-
void                gupnp_context_manager_rescan_control_points
-                                                        (GUPnPContextManager *manager);
-

-This function starts a rescan on every control point managed by manager. +

gupnp_context_manager_rescan_control_points ()

+
void
+gupnp_context_manager_rescan_control_points
+                               (GUPnPContextManager *manager);
+

This function starts a rescan on every control point managed by manager +. Only the active control points send discovery messages. This function should be called when servers are suspected to have -disappeared. -

-
-+disappeared.

+
+

Parameters

+
+++++ - - + + +

manager :

A GUPnPContextManager -

manager

A GUPnPContextManager

 
+

Since 0.20.3

+

-

gupnp_context_manager_manage_control_point ()

-
void                gupnp_context_manager_manage_control_point
-                                                        (GUPnPContextManager *manager,
-                                                         GUPnPControlPoint *control_point);
-

-By calling this function, you are asking manager to keep a reference to -control_point until it's associated GUPnPContext is no longer available. +

gupnp_context_manager_manage_control_point ()

+
void
+gupnp_context_manager_manage_control_point
+                               (GUPnPContextManager *manager,
+                                GUPnPControlPoint *control_point);
+

By calling this function, you are asking manager + to keep a reference to +control_point + until it's associated GUPnPContext is no longer available. You usually want to call this function from -"context-available" handler after you create a -GUPnPControlPoint object for the newly available context. -

-
-+“context-available” handler after you create a +GUPnPControlPoint object for the newly available context.

+
+

Parameters

+
+++++ - - + + + - - + + +

manager :

A GUPnPContextManager -

manager

A GUPnPContextManager

 

control_point :

The GUPnPControlPoint to be taken care of

control_point

The GUPnPControlPoint to be taken care of

 
+

Since 0.13.0

+
-

gupnp_context_manager_manage_root_device ()

-
void                gupnp_context_manager_manage_root_device
-                                                        (GUPnPContextManager *manager,
-                                                         GUPnPRootDevice *root_device);
-

-By calling this function, you are asking manager to keep a reference to -root_device when it's associated GUPnPContext is no longer available. You +

gupnp_context_manager_manage_root_device ()

+
void
+gupnp_context_manager_manage_root_device
+                               (GUPnPContextManager *manager,
+                                GUPnPRootDevice *root_device);
+

By calling this function, you are asking manager + to keep a reference to +root_device + when it's associated GUPnPContext is no longer available. You usually want to call this function from -"context-available" handler after you create a -GUPnPRootDevice object for the newly available context. -

-
-+“context-available” handler after you create a +GUPnPRootDevice object for the newly available context.

+
+

Parameters

+
+++++ - - + + + - - + + +

manager :

A GUPnPContextManager -

manager

A GUPnPContextManager

 

root_device :

The GUPnPRootDevice to be taken care of

root_device

The GUPnPRootDevice to be taken care of

 
+

Since 0.13.0

+
-

gupnp_context_manager_get_port ()

-
guint               gupnp_context_manager_get_port      (GUPnPContextManager *manager);
-

-Get the network port associated with this context manager. -

-
-- - - - - - - - - - +

gupnp_context_manager_get_port ()

+
guint
+gupnp_context_manager_get_port (GUPnPContextManager *manager);
+

Get the network port associated with this context manager.

+
+

Parameters

+

manager :

A GUPnPContextManager -

Returns :

The network port asssociated with this context manager.
+++++ + + + + +

manager

A GUPnPContextManager

 
+
+

Returns

+

The network port asssociated with this context manager.

+

+
+

Since 0.19.1

+
-

gupnp_context_manager_get_white_list ()

-
GUPnPWhiteList *    gupnp_context_manager_get_white_list
-                                                        (GUPnPContextManager *manager);
-

-Get the GUPnPWhiteList associated with manager. -

-
-- - - - - - - - - - +

gupnp_context_manager_get_white_list ()

+
GUPnPWhiteList *
+gupnp_context_manager_get_white_list (GUPnPContextManager *manager);
+

Get the GUPnPWhiteList associated with manager +.

+
+

Parameters

+

manager :

A GUPnPContextManager -

Returns :

The GUPnPWhiteList asssociated with this -context manager. [transfer none] -
+++++ + + + + +

manager

A GUPnPContextManager

 
+
+

Returns

+

The GUPnPWhiteList asssociated with this +context manager.

+

[transfer none]

+
+ + +
+

Types and Values

+
+

struct GUPnPContextManager

+
struct GUPnPContextManager;
+

This struct contains private data only, and should be accessed using the +functions below.

+

Property Details

-

The "main-context" property

-
  "main-context"             gpointer              : Read / Write / Construct Only
+

The “main-context” property

+
  “main-context”             gpointer

GMainContext to pass to created GUPnPContext objects.

+

Flags: Read / Write / Construct Only


-

The "port" property

-
  "port"                     guint                 : Read / Write / Construct Only
-

-Port the contexts listen on, or 0 if you don't care what -port is used by GUPnPContext objects created by this object. -

+

The “port” property

+
  “port”                     guint
+

Port the contexts listen on, or 0 if you don't care what +port is used by GUPnPContext objects created by this object.

+

Flags: Read / Write / Construct Only

Default value: 0


-

The "white-list" property

-
  "white-list"               GUPnPWhiteList*       : Read
-

-The white list to use. -

+

The “white-list” property

+
  “white-list”               GUPnPWhiteList *
+

The white list to use.

+

Flags: Read

Signal Details

-

The "context-available" signal

-
void                user_function                      (GUPnPContextManager *context_manager,
-                                                        GUPnPContext        *context,
-                                                        gpointer             user_data)            : Run First
-

-Signals the availability of new GUPnPContext. -

-
-+

The “context-available” signal

+
void
+user_function (GUPnPContextManager *context_manager,
+               GUPnPContext        *context,
+               gpointer             user_data)
+

Signals the availability of new GUPnPContext.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

context_manager :

The GUPnPContextManager that received the signal

context_manager

The GUPnPContextManager that received the signal

 

context :

The now available GUPnPContext -

context

The now available GUPnPContext

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run First

+

-

The "context-unavailable" signal

-
void                user_function                      (GUPnPContextManager *context_manager,
-                                                        GUPnPContext        *context,
-                                                        gpointer             user_data)            : Run First
-

-Signals the unavailability of a GUPnPContext. -

-
-+

The “context-unavailable” signal

+
void
+user_function (GUPnPContextManager *context_manager,
+               GUPnPContext        *context,
+               gpointer             user_data)
+

Signals the unavailability of a GUPnPContext.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

context_manager :

The GUPnPContextManager that received the signal

context_manager

The GUPnPContextManager that received the signal

 

context :

The now unavailable GUPnPContext -

context

The now unavailable GUPnPContext

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run First

+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPControlPoint.html b/doc/html/GUPnPControlPoint.html index ee7e7d6..bd968d2 100644 --- a/doc/html/GUPnPControlPoint.html +++ b/doc/html/GUPnPControlPoint.html @@ -2,36 +2,29 @@ -GUPnPControlPoint - +GUPnP Reference Manual: GUPnPControlPoint + - + - - - - - - - - - - + + + + + + +
@@ -39,371 +32,526 @@

GUPnPControlPoint

GUPnPControlPoint — Class for resource discovery.

- +
-
-

Object Hierarchy

-
-  GObject
-   +----GSSDPResourceBrowser
-         +----GUPnPControlPoint
-
+

Functions

+

Properties

-
-  "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only
-
+
+++++ + + + + + +
+GUPnPResourceFactory *resource-factoryRead / Write / Construct Only
+
+

Types and Values

+
++++ + + + + +
structGUPnPControlPoint
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GSSDPResourceBrowser
+        ╰── GUPnPControlPoint
 

Description

-

-GUPnPControlPoint handles device and service discovery. After creating -a control point and activating it using gssdp_resource_browser_set_active(), +

GUPnPControlPoint handles device and service discovery. After creating +a control point and activating it using gssdp_resource_browser_set_active(), the ::device-proxy-available, ::service-proxy-available, ::device-proxy-unavailable and ::service-proxy-unavailable signals will be emitted whenever the availability of a device or service matching -the specified discovery target changes. -

+the specified discovery target changes.

-

Details

+

Functions

-

struct GUPnPControlPoint

-
struct GUPnPControlPoint;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_control_point_new ()

-
GUPnPControlPoint * gupnp_control_point_new             (GUPnPContext *context,
-                                                         const char *target);
-

-Create a new GUPnPControlPoint with the specified context and target. -

-

-target should be a service or device name, such as +

gupnp_control_point_new ()

+
GUPnPControlPoint *
+gupnp_control_point_new (GUPnPContext *context,
+                         const char *target);
+

Create a new GUPnPControlPoint with the specified context + and target +.

+

target + should be a service or device name, such as urn:schemas-upnp-org:service:WANIPConnection:1 or -urn:schemas-upnp-org:device:MediaRenderer:1. -

-
-+urn:schemas-upnp-org:device:MediaRenderer:1.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

context :

A GUPnPContext -

context

A GUPnPContext

 

target :

The search target

Returns :

A new GUPnPControlPoint object.

target

The search target

 
+
+

Returns

+

A new GUPnPControlPoint object.

+

+
+

-

gupnp_control_point_new_full ()

-
GUPnPControlPoint * gupnp_control_point_new_full        (GUPnPContext *context,
-                                                         GUPnPResourceFactory *factory,
-                                                         const char *target);
-

-Create a new GUPnPControlPoint with the specified context, factory and -target. -

-

-target should be a service or device name, such as +

gupnp_control_point_new_full ()

+
GUPnPControlPoint *
+gupnp_control_point_new_full (GUPnPContext *context,
+                              GUPnPResourceFactory *factory,
+                              const char *target);
+

Create a new GUPnPControlPoint with the specified context +, factory + and +target +.

+

target + should be a service or device name, such as urn:schemas-upnp-org:service:WANIPConnection:1 or -urn:schemas-upnp-org:device:MediaRenderer:1. -

-
-+urn:schemas-upnp-org:device:MediaRenderer:1.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

context :

A GUPnPContext -

factory :

A GUPnPResourceFactory -

context

A GUPnPContext

 

target :

The search target

factory

A GUPnPResourceFactory

 

Returns :

A new GUPnPControlPoint object.

target

The search target

 
+
+

Returns

+

A new GUPnPControlPoint object.

+

+
+

-

gupnp_control_point_get_resource_factory ()

-
GUPnPResourceFactory * gupnp_control_point_get_resource_factory
-                                                        (GUPnPControlPoint *control_point);
-

-Get the GUPnPResourceFactory used by the control_point. -

-
-- - - - - - - - - - +

gupnp_control_point_get_resource_factory ()

+
GUPnPResourceFactory *
+gupnp_control_point_get_resource_factory
+                               (GUPnPControlPoint *control_point);
+

Get the GUPnPResourceFactory used by the control_point +.

+
+

Parameters

+

control_point :

A GUPnPControlPoint -

Returns :

A GUPnPResourceFactory. [transfer none] -
+++++ + + + + +

control_point

A GUPnPControlPoint

 
+
+

Returns

+

A GUPnPResourceFactory.

+

[transfer none]

+
+
-

gupnp_control_point_get_context ()

-
GUPnPContext *      gupnp_control_point_get_context     (GUPnPControlPoint *control_point);
-

-Get the GUPnPControlPoint associated with control_point. -

-
-- - - - - - - - - - +

gupnp_control_point_get_context ()

+
GUPnPContext *
+gupnp_control_point_get_context (GUPnPControlPoint *control_point);
+

Get the GUPnPControlPoint associated with control_point +.

+
+

Parameters

+

control_point :

A GUPnPControlPoint -

Returns :

The GUPnPContext. [transfer none] -
+++++ + + + + +

control_point

A GUPnPControlPoint

 
+
+

Returns

+

The GUPnPContext.

+

[transfer none]

+
+
-

gupnp_control_point_list_device_proxies ()

-
const GList *       gupnp_control_point_list_device_proxies
-                                                        (GUPnPControlPoint *control_point);
-

-Get the GList of discovered GUPnPDeviceProxy objects. Do not free the list -nor its elements. -

-
-- - - - - - - - - - +

gupnp_control_point_list_device_proxies ()

+
const GList *
+gupnp_control_point_list_device_proxies
+                               (GUPnPControlPoint *control_point);
+

Get the GList of discovered GUPnPDeviceProxy objects. Do not free the list +nor its elements.

+
+

Parameters

+

control_point :

A GUPnPControlPoint -

Returns :

a GList of -GUPnPDeviceProxy objects. [element-type GUPnP.DeviceProxy][transfer none] -
+++++ + + + + +

control_point

A GUPnPControlPoint

 
+
+

Returns

+

a GList of +GUPnPDeviceProxy objects.

+

[element-type GUPnP.DeviceProxy][transfer none]

+
+
-

gupnp_control_point_list_service_proxies ()

-
const GList *       gupnp_control_point_list_service_proxies
-                                                        (GUPnPControlPoint *control_point);
-

-Get the GList of discovered GUPnPServiceProxy objects. Do not free the -list nor its elements. -

-
-- - - - - - - - - - +

gupnp_control_point_list_service_proxies ()

+
const GList *
+gupnp_control_point_list_service_proxies
+                               (GUPnPControlPoint *control_point);
+

Get the GList of discovered GUPnPServiceProxy objects. Do not free the +list nor its elements.

+
+

Parameters

+

control_point :

A GUPnPControlPoint -

Returns :

a GList -of GUPnPServiceProxy objects. [element-type GUPnP.ServiceProxy][transfer none] -
+++++ + + + + +

control_point

A GUPnPControlPoint

 
+
+

Returns

+

a GList +of GUPnPServiceProxy objects.

+

[element-type GUPnP.ServiceProxy][transfer none]

+
+ + +
+

Types and Values

+
+

struct GUPnPControlPoint

+
struct GUPnPControlPoint;
+

This struct contains private data only, and should be accessed using the +functions below.

+

Property Details

-

The "resource-factory" property

-
  "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only
-

-The resource factory to use. Set to NULL for default factory. -

+

The “resource-factory” property

+
  “resource-factory”         GUPnPResourceFactory *
+

The resource factory to use. Set to NULL for default factory.

+

Flags: Read / Write / Construct Only

Signal Details

-

The "device-proxy-available" signal

-
void                user_function                      (GUPnPControlPoint *control_point,
-                                                        GUPnPDeviceProxy  *proxy,
-                                                        gpointer           user_data)          : Run Last
-

-The ::device-proxy-available signal is emitted whenever a new -device has become available. -

-
-+

The “device-proxy-available” signal

+
void
+user_function (GUPnPControlPoint *control_point,
+               GUPnPDeviceProxy  *proxy,
+               gpointer           user_data)
+

The ::device-proxy-available signal is emitted whenever a new +device has become available.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

control_point :

The GUPnPControlPoint that received the signal

control_point

The GUPnPControlPoint that received the signal

 

proxy :

The now available GUPnPDeviceProxy -

proxy

The now available GUPnPDeviceProxy

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+

-

The "device-proxy-unavailable" signal

-
void                user_function                      (GUPnPControlPoint *control_point,
-                                                        GUPnPDeviceProxy  *proxy,
-                                                        gpointer           user_data)          : Run Last
-

-The ::device-proxy-unavailable signal is emitted whenever a -device is not available any more. -

-
-+

The “device-proxy-unavailable” signal

+
void
+user_function (GUPnPControlPoint *control_point,
+               GUPnPDeviceProxy  *proxy,
+               gpointer           user_data)
+

The ::device-proxy-unavailable signal is emitted whenever a +device is not available any more.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

control_point :

The GUPnPControlPoint that received the signal

control_point

The GUPnPControlPoint that received the signal

 

proxy :

The now unavailable GUPnPDeviceProxy -

proxy

The now unavailable GUPnPDeviceProxy

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+
-

The "service-proxy-available" signal

-
void                user_function                      (GUPnPControlPoint *control_point,
-                                                        GUPnPServiceProxy *proxy,
-                                                        gpointer           user_data)          : Run Last
-

-The ::service-proxy-available signal is emitted whenever a new -service has become available. -

-
-+

The “service-proxy-available” signal

+
void
+user_function (GUPnPControlPoint *control_point,
+               GUPnPServiceProxy *proxy,
+               gpointer           user_data)
+

The ::service-proxy-available signal is emitted whenever a new +service has become available.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

control_point :

The GUPnPControlPoint that received the signal

control_point

The GUPnPControlPoint that received the signal

 

proxy :

The now available GUPnPServiceProxy -

proxy

The now available GUPnPServiceProxy

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+
-

The "service-proxy-unavailable" signal

-
void                user_function                      (GUPnPControlPoint *control_point,
-                                                        GUPnPServiceProxy *proxy,
-                                                        gpointer           user_data)          : Run Last
-

-The ::service-proxy-unavailable signal is emitted whenever a -service is not available any more. -

-
-+

The “service-proxy-unavailable” signal

+
void
+user_function (GUPnPControlPoint *control_point,
+               GUPnPServiceProxy *proxy,
+               gpointer           user_data)
+

The ::service-proxy-unavailable signal is emitted whenever a +service is not available any more.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

control_point :

The GUPnPControlPoint that received the signal

control_point

The GUPnPControlPoint that received the signal

 

proxy :

The now unavailable GUPnPServiceProxy -

proxy

The now unavailable GUPnPServiceProxy

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPDevice.html b/doc/html/GUPnPDevice.html index 8c7b8fc..66a57a9 100644 --- a/doc/html/GUPnPDevice.html +++ b/doc/html/GUPnPDevice.html @@ -2,34 +2,28 @@ -GUPnPDevice - +GUPnP Reference Manual: GUPnPDevice + - + - - - - - - - - - - + + + + + + +
@@ -37,61 +31,76 @@

GUPnPDevice

GUPnPDevice — Class for device implementations.

- +
-
-

Synopsis

-
struct              GUPnPDevice;
-
+
+

Properties

+
+++++ + + + + + +
+GUPnPRootDevice *root-deviceRead / Write / Construct Only
-

Object Hierarchy

-
-  GObject
-   +----GUPnPDeviceInfo
-         +----GUPnPDevice
-               +----GUPnPRootDevice
-
+

Types and Values

+
++++ + + + + +
 GUPnPDevice
-

Properties

-
-  "root-device"              GUPnPRootDevice*      : Read / Write / Construct Only
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPDeviceInfo
+        ╰── GUPnPDevice
+            ╰── GUPnPRootDevice
 

Description

-

-GUPnPDevice allows for retrieving a device's subdevices +

GUPnPDevice allows for retrieving a device's subdevices and services. GUPnPDevice implements the GUPnPDeviceInfo -interface. -

+interface.

+
+
+

Functions

-

Details

+

Types and Values

-

struct GUPnPDevice

-
struct GUPnPDevice;
-

-This struct contains private data only, and should be accessed using the -functions below. -

+

GUPnPDevice

+
typedef struct _GUPnPDevice GUPnPDevice;
+

This struct contains private data only, and should be accessed using the +functions below.

Property Details

-

The "root-device" property

-
  "root-device"              GUPnPRootDevice*      : Read / Write / Construct Only
-

-The containing GUPnPRootDevice, or NULL if this is the root -device. -

+

The “root-device” property

+
  “root-device”              GUPnPRootDevice *
+

The containing GUPnPRootDevice, or NULL if this is the root +device.

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/GUPnPDeviceInfo.html b/doc/html/GUPnPDeviceInfo.html index 92bb465..c5b8b04 100644 --- a/doc/html/GUPnPDeviceInfo.html +++ b/doc/html/GUPnPDeviceInfo.html @@ -2,34 +2,28 @@ -GUPnPDeviceInfo - +GUPnP Reference Manual: GUPnPDeviceInfo + - + - - - - - - - - - - + + + + + + +
@@ -37,888 +31,1242 @@

GUPnPDeviceInfo

GUPnPDeviceInfo — Base abstract class for querying device information.

- +
-
-

Synopsis

-
struct              GUPnPDeviceInfo;
-GUPnPResourceFactory * gupnp_device_info_get_resource_factory
-                                                        (GUPnPDeviceInfo *device_info);
-GUPnPContext *      gupnp_device_info_get_context       (GUPnPDeviceInfo *info);
-const char *        gupnp_device_info_get_location      (GUPnPDeviceInfo *info);
-const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);
-const char *        gupnp_device_info_get_udn           (GUPnPDeviceInfo *info);
-const char *        gupnp_device_info_get_device_type   (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_manufacturer  (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_manufacturer_url
-                                                        (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_model_description
-                                                        (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_model_name    (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_model_number  (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_model_url     (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_serial_number (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_presentation_url
-                                                        (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_upc           (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_icon_url      (GUPnPDeviceInfo *info,
-                                                         const char *requested_mime_type,
-                                                         int requested_depth,
-                                                         int requested_width,
-                                                         int requested_height,
-                                                         gboolean prefer_bigger,
-                                                         char **mime_type,
-                                                         int *depth,
-                                                         int *width,
-                                                         int *height);
-GList *             gupnp_device_info_list_dlna_capabilities
-                                                        (GUPnPDeviceInfo *info);
-GList *             gupnp_device_info_list_dlna_device_class_identifier
-                                                        (GUPnPDeviceInfo *info);
-char *              gupnp_device_info_get_description_value
-                                                        (GUPnPDeviceInfo *info,
-                                                         const char *element);
-GList *             gupnp_device_info_list_devices      (GUPnPDeviceInfo *info);
-GList *             gupnp_device_info_list_device_types (GUPnPDeviceInfo *info);
-GUPnPDeviceInfo *   gupnp_device_info_get_device        (GUPnPDeviceInfo *info,
-                                                         const char *type);
-GList *             gupnp_device_info_list_services     (GUPnPDeviceInfo *info);
-GList *             gupnp_device_info_list_service_types
-                                                        (GUPnPDeviceInfo *info);
-GUPnPServiceInfo *  gupnp_device_info_get_service       (GUPnPDeviceInfo *info,
-                                                         const char *type);
-
-
-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPDeviceInfo
-         +----GUPnPDevice
-         +----GUPnPDeviceProxy
-
-
-

Properties

-
-  "context"                  GUPnPContext*         : Read / Write / Construct Only
-  "device-type"              gchar*                : Read / Write / Construct Only
-  "document"                 GUPnPXMLDoc*          : Write / Construct Only
-  "element"                  gpointer              : Write / Construct Only
-  "location"                 gchar*                : Read / Write / Construct Only
-  "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only
-  "udn"                      gchar*                : Read / Write / Construct Only
-  "url-base"                 SoupURI*              : Read / Write / Construct Only
-
-
-
-

Description

-

-The GUPnPDeviceInfo base abstract class provides methods for querying -device information. -

-
-
-

Details

-
-

struct GUPnPDeviceInfo

-
struct GUPnPDeviceInfo;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_device_info_get_resource_factory ()

-
GUPnPResourceFactory * gupnp_device_info_get_resource_factory
-                                                        (GUPnPDeviceInfo *device_info);
-

-Get the GUPnPResourceFactory used by the device_info. -

-
-+

Functions

+
++++ - - + - - + - -

device_info :

A GUPnPDeviceInfo + +GUPnPResourceFactory * + +gupnp_device_info_get_resource_factory ()

Returns :

A GUPnPResourceFactory. [transfer none] + +GUPnPContext * + +gupnp_device_info_get_context ()
-
-
-
-

gupnp_device_info_get_context ()

-
GUPnPContext *      gupnp_device_info_get_context       (GUPnPDeviceInfo *info);
-

-Get the associated GUPnPContext. -

-
-- - - + - - + - -

info :

A GUPnPDeviceInfo +const char * + +gupnp_device_info_get_location ()

Returns :

A GUPnPContext. [transfer none] +const SoupURI * + +gupnp_device_info_get_url_base ()
-
-
-
-

gupnp_device_info_get_location ()

-
const char *        gupnp_device_info_get_location      (GUPnPDeviceInfo *info);
-

-Get the location of the device description file. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo +const char * + +gupnp_device_info_get_udn ()

Returns :

A constant string.const char * + +gupnp_device_info_get_device_type () +
-
-
-
-

gupnp_device_info_get_url_base ()

-
const SoupURI *     gupnp_device_info_get_url_base      (GUPnPDeviceInfo *info);
-

-Get the URL base of this device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_friendly_name ()

Returns :

A SoupURI. +char * + +gupnp_device_info_get_manufacturer () +
-
-
-
-

gupnp_device_info_get_udn ()

-
const char *        gupnp_device_info_get_udn           (GUPnPDeviceInfo *info);
-

-Get the Unique Device Name of the device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_manufacturer_url ()

Returns :

A constant string. +char * + +gupnp_device_info_get_model_description () +
-
-
-
-

gupnp_device_info_get_device_type ()

-
const char *        gupnp_device_info_get_device_type   (GUPnPDeviceInfo *info);
-

-Get the UPnP device type. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_model_name ()

Returns :

A constant string, or NULL. +char * + +gupnp_device_info_get_model_number () +
-
-
-
-

gupnp_device_info_get_friendly_name ()

-
char *              gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);
-

-Get the friendly name of the device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_model_url ()

Returns :

A string, or NULL. g_free() after use. +char * + +gupnp_device_info_get_serial_number () +
-
-
-
-

gupnp_device_info_get_manufacturer ()

-
char *              gupnp_device_info_get_manufacturer  (GUPnPDeviceInfo *info);
-

-Get the manufacturer of the device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_presentation_url ()

Returns :

A string, or NULL. g_free() after use. +char * + +gupnp_device_info_get_upc () +
-
-
-
-

gupnp_device_info_get_manufacturer_url ()

-
char *              gupnp_device_info_get_manufacturer_url
-                                                        (GUPnPDeviceInfo *info);
-

-Get a URL pointing to the manufacturer's website. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +char * + +gupnp_device_info_get_icon_url ()

Returns :

A string, or NULL. g_free() after use. +GList * + +gupnp_device_info_list_dlna_capabilities () +
-
-
-
-

gupnp_device_info_get_model_description ()

-
char *              gupnp_device_info_get_model_description
-                                                        (GUPnPDeviceInfo *info);
-

-Get the description of the device model. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +GList * + +gupnp_device_info_list_dlna_device_class_identifier ()

Returns :

A string, or NULL. g_free() after use. +char * + +gupnp_device_info_get_description_value () +
-
-
-
-

gupnp_device_info_get_model_name ()

-
char *              gupnp_device_info_get_model_name    (GUPnPDeviceInfo *info);
-

-Get the model name of the device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +GList * + +gupnp_device_info_list_devices ()

Returns :

A string, or NULL. g_free() after use. +GList * + +gupnp_device_info_list_device_types () +
-
-
-
-

gupnp_device_info_get_model_number ()

-
char *              gupnp_device_info_get_model_number  (GUPnPDeviceInfo *info);
-

-Get the model number of the device. -

-
-- - - + - - + + - -

info :

A GUPnPDeviceInfo + +GUPnPDeviceInfo * + +gupnp_device_info_get_device ()

Returns :

A string, or NULL. g_free() after use. +GList * + +gupnp_device_info_list_services () +
-
-
-
-

gupnp_device_info_get_model_url ()

-
char *              gupnp_device_info_get_model_url     (GUPnPDeviceInfo *info);
-

-Get a URL pointing to the device model's website. -

-
-- - - + - - + +

info :

A GUPnPDeviceInfo + +GList * + +gupnp_device_info_list_service_types ()

Returns :

A string, or NULL. g_free() after use. +GUPnPServiceInfo * + +gupnp_device_info_get_service () +
-
-
-

gupnp_device_info_get_serial_number ()

-
char *              gupnp_device_info_get_serial_number (GUPnPDeviceInfo *info);
-

-Get the serial number of the device. -

-
-+
+

Properties

+
+++++ - - + + + - - + + + - -

info :

A GUPnPDeviceInfo - +GUPnPContext *contextRead / Write / Construct Only

Returns :

A string, or NULL. g_free() after use. +gchar *device-typeRead / Write / Construct Only
-
-
-
-

gupnp_device_info_get_presentation_url ()

-
char *              gupnp_device_info_get_presentation_url
-                                                        (GUPnPDeviceInfo *info);
-

-Get a URL pointing to the device's presentation page, for web-based -administration. -

-
-- - - + + + - - + + + - -

info :

A GUPnPDeviceInfo - +GUPnPXMLDoc *documentRead / Write / Construct Only

Returns :

A string, or NULL. g_free() after use.gpointerelementWrite / Construct Only
-
-
-
-

gupnp_device_info_get_upc ()

-
char *              gupnp_device_info_get_upc           (GUPnPDeviceInfo *info);
-

-Get the Universal Product Code of the device. -

-
-- - - + + + + + + + + + + + + + - - + + +

info :

A GUPnPDeviceInfo - +gchar *locationRead / Write / Construct Only
+GUPnPResourceFactory *resource-factoryRead / Write / Construct Only
+gchar *udnRead / Write / Construct Only

Returns :

A string, or NULL. g_free() after use. +SoupURI *url-baseRead / Write / Construct Only
+
+

Types and Values

+
++++ + + + + +
structGUPnPDeviceInfo
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPDeviceInfo
+        ├── GUPnPDevice
+        ╰── GUPnPDeviceProxy
+
+
+
+

Description

+

The GUPnPDeviceInfo base abstract class provides methods for querying +device information.

+
+
+

Functions

+
+

gupnp_device_info_get_resource_factory ()

+
GUPnPResourceFactory *
+gupnp_device_info_get_resource_factory
+                               (GUPnPDeviceInfo *device_info);
+

Get the GUPnPResourceFactory used by the device_info +.

+
+

Parameters

+
+++++ + + + + + +

device_info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A GUPnPResourceFactory.

+

[transfer none]

+
+

-

gupnp_device_info_get_icon_url ()

-
char *              gupnp_device_info_get_icon_url      (GUPnPDeviceInfo *info,
-                                                         const char *requested_mime_type,
-                                                         int requested_depth,
-                                                         int requested_width,
-                                                         int requested_height,
-                                                         gboolean prefer_bigger,
-                                                         char **mime_type,
-                                                         int *depth,
-                                                         int *width,
-                                                         int *height);
-

-Get a URL pointing to the icon most closely matching the -given criteria, or NULL. If requested_mime_type is set, only icons with -this mime type will be returned. If requested_depth is set, only icons with -this or lower depth will be returned. If requested_width and/or -requested_height are set, only icons that are this size or smaller are -returned, unless prefer_bigger is set, in which case the next biggest icon -will be returned. The returned strings should be freed. -

-
-+

gupnp_device_info_get_context ()

+
GUPnPContext *
+gupnp_device_info_get_context (GUPnPDeviceInfo *info);
+

Get the associated GUPnPContext.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A GUPnPContext.

+

[transfer none]

+
+
+
+
+

gupnp_device_info_get_location ()

+
const char *
+gupnp_device_info_get_location (GUPnPDeviceInfo *info);
+

Get the location of the device description file.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A constant string.

+

+
+
+
+
+

gupnp_device_info_get_url_base ()

+
const SoupURI *
+gupnp_device_info_get_url_base (GUPnPDeviceInfo *info);
+

Get the URL base of this device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A SoupURI.

+

+
+
+
+
+

gupnp_device_info_get_udn ()

+
const char *
+gupnp_device_info_get_udn (GUPnPDeviceInfo *info);
+

Get the Unique Device Name of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A constant string.

+

+
+
+
+
+

gupnp_device_info_get_device_type ()

+
const char *
+gupnp_device_info_get_device_type (GUPnPDeviceInfo *info);
+

Get the UPnP device type.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A constant string, or NULL.

+

+
+
+
+
+

gupnp_device_info_get_friendly_name ()

+
char *
+gupnp_device_info_get_friendly_name (GUPnPDeviceInfo *info);
+

Get the friendly name of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_manufacturer ()

+
char *
+gupnp_device_info_get_manufacturer (GUPnPDeviceInfo *info);
+

Get the manufacturer of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_manufacturer_url ()

+
char *
+gupnp_device_info_get_manufacturer_url
+                               (GUPnPDeviceInfo *info);
+

Get a URL pointing to the manufacturer's website.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_model_description ()

+
char *
+gupnp_device_info_get_model_description
+                               (GUPnPDeviceInfo *info);
+

Get the description of the device model.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_model_name ()

+
char *
+gupnp_device_info_get_model_name (GUPnPDeviceInfo *info);
+

Get the model name of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_model_number ()

+
char *
+gupnp_device_info_get_model_number (GUPnPDeviceInfo *info);
+

Get the model number of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_model_url ()

+
char *
+gupnp_device_info_get_model_url (GUPnPDeviceInfo *info);
+

Get a URL pointing to the device model's website.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_serial_number ()

+
char *
+gupnp_device_info_get_serial_number (GUPnPDeviceInfo *info);
+

Get the serial number of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_presentation_url ()

+
char *
+gupnp_device_info_get_presentation_url
+                               (GUPnPDeviceInfo *info);
+

Get a URL pointing to the device's presentation page, for web-based +administration.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_upc ()

+
char *
+gupnp_device_info_get_upc (GUPnPDeviceInfo *info);
+

Get the Universal Product Code of the device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPDeviceInfo

 
+
+
+

Returns

+

A string, or NULL. g_free() after use.

+

+
+
+
+
+

gupnp_device_info_get_icon_url ()

+
char *
+gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info,
+                                const char *requested_mime_type,
+                                int requested_depth,
+                                int requested_width,
+                                int requested_height,
+                                gboolean prefer_bigger,
+                                char **mime_type,
+                                int *depth,
+                                int *width,
+                                int *height);
+

Get a URL pointing to the icon most closely matching the +given criteria, or NULL. If requested_mime_type + is set, only icons with +this mime type will be returned. If requested_depth + is set, only icons with +this or lower depth will be returned. If requested_width + and/or +requested_height + are set, only icons that are this size or smaller are +returned, unless prefer_bigger + is set, in which case the next biggest icon +will be returned. The returned strings should be freed.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + +use.

+ - - + + + - - + + + - - - - - - + + +

info :

A GUPnPDeviceInfo -

info

A GUPnPDeviceInfo

 

requested_mime_type :

The requested file -format, or NULL for any. [allow-none][transfer none] -

requested_mime_type

The requested file +format, or NULL for any.

[allow-none][transfer none]

requested_depth :

The requested color depth, or -1 for any

requested_depth

The requested color depth, or -1 for any

 

requested_width :

The requested width, or -1 for any

requested_width

The requested width, or -1 for any

 

requested_height :

The requested height, or -1 for any

requested_height

The requested height, or -1 for any

 

prefer_bigger :

-TRUE if a bigger, rather than a smaller icon should be -returned if no exact match could be found

prefer_bigger

TRUE if a bigger, rather than a smaller icon should be +returned if no exact match could be found

 

mime_type :

The location where to store the the format +

mime_type

The location where to store the the format of the returned icon, or NULL. The returned string should be freed after -use. [out][allow-none] -

[out][allow-none]

depth :

(out) (allow-none) : The location where to store the depth of the -returned icon, or NULL -

depth

(out) (allow-none) : The location where to store the depth of the +returned icon, or NULL

 

width :

(out) (allow-none) : The location where to store the width of the -returned icon, or NULL -

width

(out) (allow-none) : The location where to store the width of the +returned icon, or NULL

 

height :

(out) (allow-none) : The location where to store the height of the -returned icon, or NULL -

Returns :

a string, or NULL. g_free() after use. [transfer full] -

height

(out) (allow-none) : The location where to store the height of the +returned icon, or NULL

 
+
+

Returns

+

a string, or NULL. g_free() after use.

+

[transfer full]

+
+

-

gupnp_device_info_list_dlna_capabilities ()

-
GList *             gupnp_device_info_list_dlna_capabilities
-                                                        (GUPnPDeviceInfo *info);
-

-Get a GList of strings that represent the device capabilities as announced -in the device description file using the <dlna:X_DLNACAP> element. -

-
-- - - - - - - - - - +

gupnp_device_info_list_dlna_capabilities ()

+
GList *
+gupnp_device_info_list_dlna_capabilities
+                               (GUPnPDeviceInfo *info);
+

Get a GList of strings that represent the device capabilities as announced +in the device description file using the <dlna:X_DLNACAP> element.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

a GList of newly allocated strings or -NULL if the device description doesn't contain the <dlna:X_DLNACAP> -element. [transfer full][element-type utf8] -
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

a GList of newly allocated strings or +NULL if the device description doesn't contain the <dlna:X_DLNACAP> +element.

+

[transfer full][element-type utf8]

+
+

Since 0.13.0

+

-

gupnp_device_info_list_dlna_device_class_identifier ()

-
GList *             gupnp_device_info_list_dlna_device_class_identifier
-                                                        (GUPnPDeviceInfo *info);
-

-Get a GList of strings that represent the device class and version as +

gupnp_device_info_list_dlna_device_class_identifier ()

+
GList *
+gupnp_device_info_list_dlna_device_class_identifier
+                               (GUPnPDeviceInfo *info);
+

Get a GList of strings that represent the device class and version as announced in the device description file using the <dlna:X_DLNADOC> -element. -

-
-- - - - - - - - - - +element.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

a GList of newly allocated strings or -NULL if the device description doesn't contain the <dlna:X_DLNADOC> -element. [transfer full][element-type utf8] -
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

a GList of newly allocated strings or +NULL if the device description doesn't contain the <dlna:X_DLNADOC> +element.

+

[transfer full][element-type utf8]

+
+

Since 0.20.4

+

-

gupnp_device_info_get_description_value ()

-
char *              gupnp_device_info_get_description_value
-                                                        (GUPnPDeviceInfo *info,
-                                                         const char *element);
-

-This function provides generic access to the contents of arbitrary elements -in the device description file. -

-
-+

gupnp_device_info_get_description_value ()

+
char *
+gupnp_device_info_get_description_value
+                               (GUPnPDeviceInfo *info,
+                                const char *element);
+

This function provides generic access to the contents of arbitrary elements +in the device description file.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

info :

A GUPnPDeviceInfo -

element :

Name of the description element to retrieve

info

A GUPnPDeviceInfo

 

Returns :

a newly allocated string or NULL if the device -description doesn't contain the given element -

element

Name of the description element to retrieve

 
+
+

Returns

+

a newly allocated string or NULL if the device +description doesn't contain the given element +

+

+
+

Since 0.13.0

+
-

gupnp_device_info_list_devices ()

-
GList *             gupnp_device_info_list_devices      (GUPnPDeviceInfo *info);
-

-Get a GList of new objects implementing GUPnPDeviceInfo -representing the devices directly contained in info. The returned list -should be g_list_free()'d and the elements should be g_object_unref()'d. -

-

-Note that devices are not cached internally, so that every time you +

gupnp_device_info_list_devices ()

+
GList *
+gupnp_device_info_list_devices (GUPnPDeviceInfo *info);
+

Get a GList of new objects implementing GUPnPDeviceInfo +representing the devices directly contained in info +. The returned list +should be g_list_free()'d and the elements should be g_object_unref()'d.

+

Note that devices are not cached internally, so that every time you call this function new objects are created. The application must cache any used devices if it wishes to keep them around and re-use -them. -

-
-- - - - - - - - - - +them.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

a GList of -new GUPnPDeviceInfo objects. [element-type GUPnP.DeviceInfo][transfer full] -
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

a GList of +new GUPnPDeviceInfo objects.

+

[element-type GUPnP.DeviceInfo][transfer full]

+
+
-

gupnp_device_info_list_device_types ()

-
GList *             gupnp_device_info_list_device_types (GUPnPDeviceInfo *info);
-

-Get a GList of strings representing the types of the devices -directly contained in info. -

-
-- - - - - - - - - - +

gupnp_device_info_list_device_types ()

+
GList *
+gupnp_device_info_list_device_types (GUPnPDeviceInfo *info);
+

Get a GList of strings representing the types of the devices +directly contained in info +.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

A GList of strings. The -elements should be g_free()'d and the list should be g_list_free()'d. [element-type utf8][transfer full] -
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

A GList of strings. The +elements should be g_free()'d and the list should be g_list_free()'d.

+

[element-type utf8][transfer full]

+
+
-

gupnp_device_info_get_device ()

-
GUPnPDeviceInfo *   gupnp_device_info_get_device        (GUPnPDeviceInfo *info,
-                                                         const char *type);
-

-Get the service with type type directly contained in info as +

gupnp_device_info_get_device ()

+
GUPnPDeviceInfo *
+gupnp_device_info_get_device (GUPnPDeviceInfo *info,
+                              const char *type);
+

Get the service with type type + directly contained in info + as a new object implementing GUPnPDeviceInfo, or NULL if no such device -was found. The returned object should be unreffed when done. -

-

-Note that devices are not cached internally, so that every time you call +was found. The returned object should be unreffed when done.

+

Note that devices are not cached internally, so that every time you call this function a new object is created. The application must cache any used -devices if it wishes to keep them around and re-use them. -

-
-+devices if it wishes to keep them around and re-use them.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

info :

A GUPnPDeviceInfo -

info

A GUPnPDeviceInfo

 

type :

The type of the device to be retrieved.

Returns :

A new GUPnPDeviceInfo. [transfer full][allow-none] -

type

The type of the device to be retrieved.

 
+
+

Returns

+

A new GUPnPDeviceInfo.

+

[transfer full][allow-none]

+
+
-

gupnp_device_info_list_services ()

-
GList *             gupnp_device_info_list_services     (GUPnPDeviceInfo *info);
-

-Get a GList of new objects implementing GUPnPServiceInfo representing the -services directly contained in info. The returned list should be -g_list_free()'d and the elements should be g_object_unref()'d. -

-

-Note that services are not cached internally, so that every time you call +

gupnp_device_info_list_services ()

+
GList *
+gupnp_device_info_list_services (GUPnPDeviceInfo *info);
+

Get a GList of new objects implementing GUPnPServiceInfo representing the +services directly contained in info +. The returned list should be +g_list_free()'d and the elements should be g_object_unref()'d.

+

Note that services are not cached internally, so that every time you call function new objects are created. The application must cache any used -services if it wishes to keep them around and re-use them. -

-
-- - - - - - - - - - +services if it wishes to keep them around and re-use them.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

(element-type GUPnP.ServiceInfo) (transfer full) : A GList of -new GUPnPServiceInfo objects.
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

(element-type GUPnP.ServiceInfo) (transfer full) : A GList of +new GUPnPServiceInfo objects.

+

+
+
-

gupnp_device_info_list_service_types ()

-
GList *             gupnp_device_info_list_service_types
-                                                        (GUPnPDeviceInfo *info);
-

-Get a GList of strings representing the types of the services -directly contained in info. -

-
-- - - - - - - - - - +

gupnp_device_info_list_service_types ()

+
GList *
+gupnp_device_info_list_service_types (GUPnPDeviceInfo *info);
+

Get a GList of strings representing the types of the services +directly contained in info +.

+
+

Parameters

+

info :

A GUPnPDeviceInfo -

Returns :

A GList of strings. The -elements should be g_free()'d and the list should be g_list_free()'d. [element-type utf8][transfer full] -
+++++ + + + + +

info

A GUPnPDeviceInfo

 
+
+

Returns

+

A GList of strings. The +elements should be g_free()'d and the list should be g_list_free()'d.

+

[element-type utf8][transfer full]

+
+
-

gupnp_device_info_get_service ()

-
GUPnPServiceInfo *  gupnp_device_info_get_service       (GUPnPDeviceInfo *info,
-                                                         const char *type);
-

-Get the service with type type directly contained in info as a new object +

gupnp_device_info_get_service ()

+
GUPnPServiceInfo *
+gupnp_device_info_get_service (GUPnPDeviceInfo *info,
+                               const char *type);
+

Get the service with type type + directly contained in info + as a new object implementing GUPnPServiceInfo, or NULL if no such device was found. The -returned object should be unreffed when done. -

-

-Note that services are not cached internally, so that every time you call +returned object should be unreffed when done.

+

Note that services are not cached internally, so that every time you call this function a new object is created. The application must cache any used -services if it wishes to keep them around and re-use them. -

-
-+services if it wishes to keep them around and re-use them.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

info :

A GUPnPDeviceInfo -

type :

The type of the service to be retrieved.

info

A GUPnPDeviceInfo

 

Returns :

A GUPnPServiceInfo. [transfer full] -

type

The type of the service to be retrieved.

 
+
+

Returns

+

A GUPnPServiceInfo.

+

[transfer full]

+
+ + +
+

Types and Values

+
+

struct GUPnPDeviceInfo

+
struct GUPnPDeviceInfo;
+

This struct contains private data only, and should be accessed using the +functions below.

+

Property Details

-

The "context" property

-
  "context"                  GUPnPContext*         : Read / Write / Construct Only
-

-The GUPnPContext to use. -

+

The “context” property

+
  “context”                  GUPnPContext *
+

The GUPnPContext to use.

+

Flags: Read / Write / Construct Only


-

The "device-type" property

-
  "device-type"              gchar*                : Read / Write / Construct Only
-

-The device type. -

+

The “device-type” property

+
  “device-type”              gchar *
+

The device type.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "document" property

-
  "document"                 GUPnPXMLDoc*          : Write / Construct Only
-

-Private property. -

+

The “document” property

+
  “document”                 GUPnPXMLDoc *
+

Private property.

+

Flags: Read / Write / Construct Only

Stability Level: Private


-

The "element" property

-
  "element"                  gpointer              : Write / Construct Only
-

-Private property. -

+

The “element” property

+
  “element”                  gpointer
+

Private property.

+

Flags: Write / Construct Only

Stability Level: Private


-

The "location" property

-
  "location"                 gchar*                : Read / Write / Construct Only
-

-The location of the device description file. -

+

The “location” property

+
  “location”                 gchar *
+

The location of the device description file.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "resource-factory" property

-
  "resource-factory"         GUPnPResourceFactory*  : Read / Write / Construct Only
-

-The resource factory to use. Set to NULL for default factory. -

+

The “resource-factory” property

+
  “resource-factory”         GUPnPResourceFactory *
+

The resource factory to use. Set to NULL for default factory.

+

Flags: Read / Write / Construct Only


-

The "udn" property

-
  "udn"                      gchar*                : Read / Write / Construct Only
-

-The UDN of this device. -

+

The “udn” property

+
  “udn”                      gchar *
+

The UDN of this device.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "url-base" property

-
  "url-base"                 SoupURI*              : Read / Write / Construct Only
-

-The URL base (SoupURI). -

+

The “url-base” property

+
  “url-base”                 SoupURI *
+

The URL base (SoupURI).

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPDeviceProxy.html b/doc/html/GUPnPDeviceProxy.html index f862d98..36d6e47 100644 --- a/doc/html/GUPnPDeviceProxy.html +++ b/doc/html/GUPnPDeviceProxy.html @@ -2,32 +2,27 @@ -GUPnPDeviceProxy - +GUPnP Reference Manual: GUPnPDeviceProxy + - + - - - - - - - - - - + + + + + + +
@@ -35,42 +30,48 @@

GUPnPDeviceProxy

GUPnPDeviceProxy — Proxy class for remote devices.

- +
-
-

Synopsis

-
struct              GUPnPDeviceProxy;
-
+
+

Types and Values

+
++++ + + + + +
structGUPnPDeviceProxy

Object Hierarchy

-
-  GObject
-   +----GUPnPDeviceInfo
-         +----GUPnPDeviceProxy
+
    GObject
+    ╰── GUPnPDeviceInfo
+        ╰── GUPnPDeviceProxy
 

Description

-

-GUPnPDeviceProxy allows for retrieving proxies for a device's subdevices -and services. GUPnPDeviceProxy implements the GUPnPDeviceInfo interface. -

+

GUPnPDeviceProxy allows for retrieving proxies for a device's subdevices +and services. GUPnPDeviceProxy implements the GUPnPDeviceInfo interface.

+
+
+

Functions

-

Details

+

Types and Values

struct GUPnPDeviceProxy

struct GUPnPDeviceProxy;
-

-This struct contains private data only, and should be accessed using the -functions below. -

+

This struct contains private data only, and should be accessed using the +functions below.

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/GUPnPResourceFactory.html b/doc/html/GUPnPResourceFactory.html index 353a404..1468a58 100644 --- a/doc/html/GUPnPResourceFactory.html +++ b/doc/html/GUPnPResourceFactory.html @@ -2,32 +2,27 @@ -GUPnPResourceFactory - +GUPnP Reference Manual: GUPnPResourceFactory + - + - - - - - - - - - - + + + + + + +
@@ -35,222 +30,306 @@

GUPnPResourceFactory

GUPnPResourceFactory — Class for resource and resource proxy object creation.

- +
-
-

Synopsis

-
struct              GUPnPResourceFactory;
-GUPnPResourceFactory * gupnp_resource_factory_new       (void);
-GUPnPResourceFactory * gupnp_resource_factory_get_default
-                                                        (void);
-void                gupnp_resource_factory_register_resource_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type,
-                                                         GType type);
-gboolean            gupnp_resource_factory_unregister_resource_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type);
-void                gupnp_resource_factory_register_resource_proxy_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type,
-                                                         GType type);
-gboolean            gupnp_resource_factory_unregister_resource_proxy_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type);
-
+ +
+

Types and Values

+
++++ + + + + +
structGUPnPResourceFactory

Object Hierarchy

-
-  GObject
-   +----GUPnPResourceFactory
+
    GObject
+    ╰── GUPnPResourceFactory
 

Description

-

-GUPnPResourceFactory objects are used by GUPnPControlPoint, +

GUPnPResourceFactory objects are used by GUPnPControlPoint, GUPnPDeviceProxy and GUPnPDevice to create resource proxy and resource objects. Register UPnP type - GType pairs to have resource or resource proxy objects created with the specified GType whenever an object for a resource of the specified UPnP type is requested. The GTypes need to be derived from the relevant resource or resource proxy type (e.g. -a device proxy type needs to be derived from GUPnPDeviceProxy). -

+a device proxy type needs to be derived from GUPnPDeviceProxy).

-

Details

+

Functions

-

struct GUPnPResourceFactory

-
struct GUPnPResourceFactory;
-

-This struct contains private data only, and should be accessed using the -functions below. -

+

gupnp_resource_factory_new ()

+
GUPnPResourceFactory *
+gupnp_resource_factory_new (void);
+

Create a new GUPnPResourceFactory object.

+
+

Returns

+

A GUPnPResourceFactory object.

+

-
-
-

gupnp_resource_factory_new ()

-
GUPnPResourceFactory * gupnp_resource_factory_new       (void);
-

-Create a new GUPnPResourceFactory object. -

-
-- - - - -

Returns :

A GUPnPResourceFactory object.

-

gupnp_resource_factory_get_default ()

-
GUPnPResourceFactory * gupnp_resource_factory_get_default
-                                                        (void);
-

-Get the default singleton GUPnPResourceFactory object. -

-
-- - - - -

Returns :

A GUPnPResourceFactory object. [transfer none] -
+

gupnp_resource_factory_get_default ()

+
GUPnPResourceFactory *
+gupnp_resource_factory_get_default (void);
+

Get the default singleton GUPnPResourceFactory object.

+
+

Returns

+

A GUPnPResourceFactory +object.

+

[transfer none]

+

-

gupnp_resource_factory_register_resource_type ()

-
void                gupnp_resource_factory_register_resource_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type,
-                                                         GType type);
-

-Registers the GType type for the resource of UPnP type upnp_type. After -this call, the factory factory will create object of GType type each time -it is asked to create a resource object for UPnP type upnp_type. -

-

-Note: GType type must be a derived type of GUPNP_TYPE_DEVICE if resource is -a device or GUPNP_TYPE_SERVICE if its a service. -

-
-+

gupnp_resource_factory_register_resource_type ()

+
void
+gupnp_resource_factory_register_resource_type
+                               (GUPnPResourceFactory *factory,
+                                const char *upnp_type,
+                                GType type);
+

Registers the GType type + for the resource of UPnP type upnp_type +. After +this call, the factory factory + will create object of GType type + each time +it is asked to create a resource object for UPnP type upnp_type +.

+

Note: GType type + must be a derived type of GUPNP_TYPE_DEVICE if resource is +a device or GUPNP_TYPE_SERVICE if its a service.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

factory :

A GUPnPResourceFactory.

factory

A GUPnPResourceFactory.

 

upnp_type :

The UPnP type name of the resource.

upnp_type

The UPnP type name of the resource.

 

type :

The requested GType assignment for the resource.

type

The requested GType assignment for the resource.

 
+

-

gupnp_resource_factory_unregister_resource_type ()

-
gboolean            gupnp_resource_factory_unregister_resource_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type);
-

-Unregisters the GType assignment for the resource of UPnP type upnp_type. -

-
-+

gupnp_resource_factory_unregister_resource_type ()

+
gboolean
+gupnp_resource_factory_unregister_resource_type
+                               (GUPnPResourceFactory *factory,
+                                const char *upnp_type);
+

Unregisters the GType assignment for the resource of UPnP type upnp_type +.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

factory :

A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource.

factory

A GUPnPResourceFactory.

 

Returns :

-TRUE if GType assignment was removed successfully, FALSE -otherwise.

upnp_type

The UPnP type name of the resource.

 
+
+

Returns

+

TRUE if GType assignment was removed successfully, FALSE +otherwise.

+

+
+

-

gupnp_resource_factory_register_resource_proxy_type ()

-
void                gupnp_resource_factory_register_resource_proxy_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type,
-                                                         GType type);
-

-Registers the GType type for the proxy of resource of UPnP type upnp_type. -After this call, the factory factory will create object of GType type each -time it is asked to create a resource proxy object for UPnP type upnp_type. -

-

-Note: GType type must be a derived type of GUPNP_TYPE_DEVICE_PROXY if -resource is a device or GUPNP_TYPE_SERVICE_PROXY if its a service. -

-
-+

gupnp_resource_factory_register_resource_proxy_type ()

+
void
+gupnp_resource_factory_register_resource_proxy_type
+                               (GUPnPResourceFactory *factory,
+                                const char *upnp_type,
+                                GType type);
+

Registers the GType type + for the proxy of resource of UPnP type upnp_type +. +After this call, the factory factory + will create object of GType type + each +time it is asked to create a resource proxy object for UPnP type upnp_type +.

+

Note: GType type + must be a derived type of GUPNP_TYPE_DEVICE_PROXY if +resource is a device or GUPNP_TYPE_SERVICE_PROXY if its a service.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

factory :

A GUPnPResourceFactory.

factory

A GUPnPResourceFactory.

 

upnp_type :

The UPnP type name of the resource.

upnp_type

The UPnP type name of the resource.

 

type :

The requested GType assignment for the resource proxy.

type

The requested GType assignment for the resource proxy.

 
+

-

gupnp_resource_factory_unregister_resource_proxy_type ()

-
gboolean            gupnp_resource_factory_unregister_resource_proxy_type
-                                                        (GUPnPResourceFactory *factory,
-                                                         const char *upnp_type);
-

-Unregisters the GType assignment for the proxy of resource of UPnP type -upnp_type. -

-
-+

gupnp_resource_factory_unregister_resource_proxy_type ()

+
gboolean
+gupnp_resource_factory_unregister_resource_proxy_type
+                               (GUPnPResourceFactory *factory,
+                                const char *upnp_type);
+

Unregisters the GType assignment for the proxy of resource of UPnP type +upnp_type +.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + +

factory :

A GUPnPResourceFactory.

upnp_type :

The UPnP type name of the resource.

factory

A GUPnPResourceFactory.

 

Returns :

-TRUE if GType assignment was removed successfully, FALSE -otherwise.

upnp_type

The UPnP type name of the resource.

 
+
+

Returns

+

TRUE if GType assignment was removed successfully, FALSE +otherwise.

+

+
+
+ +
+

Types and Values

+
+

struct GUPnPResourceFactory

+
struct GUPnPResourceFactory;
+

This struct contains private data only, and should be accessed using the +functions below.

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPRootDevice.html b/doc/html/GUPnPRootDevice.html index 309ba7e..e468151 100644 --- a/doc/html/GUPnPRootDevice.html +++ b/doc/html/GUPnPRootDevice.html @@ -2,34 +2,28 @@ -GUPnPRootDevice - +GUPnP Reference Manual: GUPnPRootDevice + - + - - - - - - - - - - + + + + + + +
@@ -37,331 +31,478 @@

GUPnPRootDevice

GUPnPRootDevice — Class for root device implementations.

- +
-
-

Synopsis

-
struct              GUPnPRootDevice;
-GUPnPRootDevice *   gupnp_root_device_new               (GUPnPContext *context,
-                                                         const char *description_path,
-                                                         const char *description_dir);
-GUPnPRootDevice *   gupnp_root_device_new_full          (GUPnPContext *context,
-                                                         GUPnPResourceFactory *factory,
-                                                         GUPnPXMLDoc *description_doc,
-                                                         const char *description_path,
-                                                         const char *description_dir);
-void                gupnp_root_device_set_available     (GUPnPRootDevice *root_device,
-                                                         gboolean available);
-gboolean            gupnp_root_device_get_available     (GUPnPRootDevice *root_device);
-const char *        gupnp_root_device_get_relative_location
-                                                        (GUPnPRootDevice *root_device);
-const char *        gupnp_root_device_get_description_dir
-                                                        (GUPnPRootDevice *root_device);
-const char *        gupnp_root_device_get_description_path
-                                                        (GUPnPRootDevice *root_device);
-GSSDPResourceGroup * gupnp_root_device_get_ssdp_resource_group
-                                                        (GUPnPRootDevice *root_device);
-
-
-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPDeviceInfo
-         +----GUPnPDevice
-               +----GUPnPRootDevice
-
-
-

Properties

-
-  "available"                gboolean              : Read / Write
-  "description-dir"          gchar*                : Read / Write / Construct Only
-  "description-doc"          GUPnPXMLDoc*          : Write / Construct Only
-  "description-path"         gchar*                : Read / Write / Construct Only
-
-
-
-

Description

-

-GUPnPRootDevice allows for implementing root devices. -

-
-
-

Details

-
-

struct GUPnPRootDevice

-
struct GUPnPRootDevice;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_root_device_new ()

-
GUPnPRootDevice *   gupnp_root_device_new               (GUPnPContext *context,
-                                                         const char *description_path,
-                                                         const char *description_dir);
-

-Create a new GUPnPRootDevice object, automatically loading and parsing -device description document from description_path. -

-
-+

Functions

+
++++ - - + - - - - - - - - - - + + - -

context :

The GUPnPContext + +GUPnPRootDevice * + +gupnp_root_device_new ()

description_path :

Path to device description document. This could either -be an absolute path or path relative to description_dir.

description_dir :

Path to directory where description documents are provided.

Returns :

A new GUPnPRootDevice object. +GUPnPRootDevice * + +gupnp_root_device_new_full () +
-
-
-
-

gupnp_root_device_new_full ()

-
GUPnPRootDevice *   gupnp_root_device_new_full          (GUPnPContext *context,
-                                                         GUPnPResourceFactory *factory,
-                                                         GUPnPXMLDoc *description_doc,
-                                                         const char *description_path,
-                                                         const char *description_dir);
-

-Create a new GUPnPRootDevice, automatically loading and parsing -device description document from description_path if description_doc is -NULL. -

-
-- - - + - - + - - + - - + + - - + + - - + +

context :

A GUPnPContext + +void + +gupnp_root_device_set_available ()

factory :

A GUPnPResourceFactory + +gboolean + +gupnp_root_device_get_available ()

description_doc :

Device description document, or NULL +const char * + +gupnp_root_device_get_relative_location ()

description_path :

Path to device description document. This could either -be an absolute path or path relative to description_dir.const char * + +gupnp_root_device_get_description_dir () +

description_dir :

Path to directory where description documents are provided.const char * + +gupnp_root_device_get_description_path () +

Returns :

A new GUPnPRootDevice object. +GSSDPResourceGroup * + +gupnp_root_device_get_ssdp_resource_group () +
-
-
-

gupnp_root_device_set_available ()

-
void                gupnp_root_device_set_available     (GUPnPRootDevice *root_device,
-                                                         gboolean available);
-

-Controls whether or not root_device is available (announcing -its presence). -

-
-+
+

Properties

+
+++++ - - + + + - - + + + - -

root_device :

A GUPnPRootDevice -gbooleanavailableRead / Write

available :

-TRUE if root_device should be available +gchar *description-dirRead / Write / Construct Only
-
-
-
-

gupnp_root_device_get_available ()

-
gboolean            gupnp_root_device_get_available     (GUPnPRootDevice *root_device);
-

-Get whether or not root_device is available (announcing its presence). -

-
-- - - + + + - - + + +

root_device :

A GUPnPRootDevice - +GUPnPXMLDoc *description-docWrite / Construct Only

Returns :

-TRUE if root_device is available, FALSE otherwise. +gchar *description-pathRead / Write / Construct Only
-
+
+

Types and Values

+
++++ + + + + +
structGUPnPRootDevice
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPDeviceInfo
+        ╰── GUPnPDevice
+            ╰── GUPnPRootDevice
+
+
+
+

Description

+

GUPnPRootDevice allows for implementing root devices.

+
+
+

Functions

-

gupnp_root_device_get_relative_location ()

-
const char *        gupnp_root_device_get_relative_location
-                                                        (GUPnPRootDevice *root_device);
-

-Get the relative location of root_device. -

-
-+

gupnp_root_device_new ()

+
GUPnPRootDevice *
+gupnp_root_device_new (GUPnPContext *context,
+                       const char *description_path,
+                       const char *description_dir);
+

Create a new GUPnPRootDevice object, automatically loading and parsing +device description document from description_path +.

+
+

Parameters

+
+++++ - - + + + + + + + + - - + + +

root_device :

A GUPnPRootDevice -

context

The GUPnPContext

 

description_path

Path to device description document. This could either +be an absolute path or path relative to description_dir +.

 

Returns :

The relative location of root_device.

description_dir

Path to directory where description documents are provided.

 
+
+

Returns

+

A new GUPnPRootDevice +object.

+

+
+

-

gupnp_root_device_get_description_dir ()

-
const char *        gupnp_root_device_get_description_dir
-                                                        (GUPnPRootDevice *root_device);
-

-Get the path to the directory containing description documents related to -root_device. -

-
-+

gupnp_root_device_new_full ()

+
GUPnPRootDevice *
+gupnp_root_device_new_full (GUPnPContext *context,
+                            GUPnPResourceFactory *factory,
+                            GUPnPXMLDoc *description_doc,
+                            const char *description_path,
+                            const char *description_dir);
+

Create a new GUPnPRootDevice, automatically loading and parsing +device description document from description_path + if description_doc + is +NULL.

+
+

Parameters

+
+++++ - - + + + - - + + + - -

root_device :

A GUPnPRootDevice -

context

A GUPnPContext

 

Returns :

The path to description document directory of root_device.

factory

A GUPnPResourceFactory

 
-
-
-
-

gupnp_root_device_get_description_path ()

-
const char *        gupnp_root_device_get_description_path
-                                                        (GUPnPRootDevice *root_device);
-

-Get the path to the device description document of root_device. -

-
-- - - + + + + + + + + - - + + +

root_device :

A GUPnPRootDevice -

description_doc

Device description document, or NULL

 

description_path

Path to device description document. This could either +be an absolute path or path relative to description_dir +.

 

Returns :

The path to device description document of root_device.

description_dir

Path to directory where description documents are provided.

 
+
+

Returns

+

A new GUPnPRootDevice object.

+

+
+

-

gupnp_root_device_get_ssdp_resource_group ()

-
GSSDPResourceGroup * gupnp_root_device_get_ssdp_resource_group
-                                                        (GUPnPRootDevice *root_device);
-

-Get the GSSDPResourceGroup used by root_device. -

-
-+

gupnp_root_device_set_available ()

+
void
+gupnp_root_device_set_available (GUPnPRootDevice *root_device,
+                                 gboolean available);
+

Controls whether or not root_device + is available (announcing +its presence).

+
+

Parameters

+
+++++ - - + + + - - + + +

root_device :

A GUPnPRootDevice -

root_device

A GUPnPRootDevice

 

Returns :

The GSSDPResourceGroup of root_device. [transfer none] -

available

TRUE if root_device +should be available

 
+
+
+

gupnp_root_device_get_available ()

+
gboolean
+gupnp_root_device_get_available (GUPnPRootDevice *root_device);
+

Get whether or not root_device + is available (announcing its presence).

+
+

Parameters

+
+++++ + + + + + +

root_device

A GUPnPRootDevice

 
+
+
+

Returns

+

TRUE if root_device +is available, FALSE otherwise.

+

+
+
+
+
+

gupnp_root_device_get_relative_location ()

+
const char *
+gupnp_root_device_get_relative_location
+                               (GUPnPRootDevice *root_device);
+

Get the relative location of root_device +.

+
+

Parameters

+
+++++ + + + + + +

root_device

A GUPnPRootDevice

 
+
+
+

Returns

+

The relative location of root_device +.

+

+
+
+
+
+

gupnp_root_device_get_description_dir ()

+
const char *
+gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device);
+

Get the path to the directory containing description documents related to +root_device +.

+
+

Parameters

+
+++++ + + + + + +

root_device

A GUPnPRootDevice

 
+
+
+

Returns

+

The path to description document directory of root_device +.

+

+
+
+
+
+

gupnp_root_device_get_description_path ()

+
const char *
+gupnp_root_device_get_description_path
+                               (GUPnPRootDevice *root_device);
+

Get the path to the device description document of root_device +.

+
+

Parameters

+
+++++ + + + + + +

root_device

A GUPnPRootDevice

 
+
+
+

Returns

+

The path to device description document of root_device +.

+

+
+
+
+
+

gupnp_root_device_get_ssdp_resource_group ()

+
GSSDPResourceGroup *
+gupnp_root_device_get_ssdp_resource_group
+                               (GUPnPRootDevice *root_device);
+

Get the GSSDPResourceGroup used by root_device +.

+
+

Parameters

+
+++++ + + + + + +

root_device

A GUPnPRootDevice

 
+
+
+

Returns

+

The GSSDPResourceGroup of root_device +.

+

[transfer none]

+
+

Since 0.19.2

+
+ +
+

Types and Values

+
+

struct GUPnPRootDevice

+
struct GUPnPRootDevice;
+

This struct contains private data only, and should be accessed using the +functions below.

+
+

Property Details

-

The "available" property

-
  "available"                gboolean              : Read / Write
-

-TRUE if this device is available. -

+

The “available” property

+
  “available”                gboolean
+

TRUE if this device is available.

+

Flags: Read / Write

Default value: FALSE


-

The "description-dir" property

-
  "description-dir"          gchar*                : Read / Write / Construct Only
-

-The path to directory where description documents are provided. -

+

The “description-dir” property

+
  “description-dir”          gchar *
+

The path to directory where description documents are provided.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "description-doc" property

-
  "description-doc"          GUPnPXMLDoc*          : Write / Construct Only
-

-Device description document. Constructor property. -

+

The “description-doc” property

+
  “description-doc”          GUPnPXMLDoc *
+

Device description document. Constructor property.

+

Flags: Write / Construct Only

+

Since 0.13.0


-

The "description-path" property

-
  "description-path"         gchar*                : Read / Write / Construct Only
-

-The path to device description document. This could either be an -absolute path or path relative to GUPnPRootDevice:description-dir. -

+

The “description-path” property

+
  “description-path”         gchar *
+

The path to device description document. This could either be an +absolute path or path relative to GUPnPRootDevice:description-dir.

+

Flags: Read / Write / Construct Only

Default value: NULL

+

Since 0.13.0

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPService.html b/doc/html/GUPnPService.html index 922db9d..96550c6 100644 --- a/doc/html/GUPnPService.html +++ b/doc/html/GUPnPService.html @@ -2,36 +2,29 @@ -GUPnPService - +GUPnP Reference Manual: GUPnPService + - - + + - - - - - - - - - - + + + + + + +
@@ -39,800 +32,1148 @@

GUPnPService

GUPnPService — Class for service implementations.

- +
-
-

Synopsis

-
struct              GUPnPService;
-                    GUPnPServiceAction;
-const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
-GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);
-void                gupnp_service_action_get            (GUPnPServiceAction *action,
-                                                         ...);
-void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
-                                                         va_list var_args);
-void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         GValue *value);
-GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         GType type);
-GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_types);
-void                gupnp_service_action_set            (GUPnPServiceAction *action,
-                                                         ...);
-void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
-                                                         va_list var_args);
-void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         const GValue *value);
-void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_values);
-void                gupnp_service_action_return         (GUPnPServiceAction *action);
-void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
-                                                         guint error_code,
-                                                         const char *error_description);
-SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
-guint               gupnp_service_action_get_argument_count
-                                                        (GUPnPServiceAction *action);
-void                gupnp_service_notify                (GUPnPService *service,
-                                                         ...);
-void                gupnp_service_notify_valist         (GUPnPService *service,
-                                                         va_list var_args);
-void                gupnp_service_notify_value          (GUPnPService *service,
-                                                         const char *variable,
-                                                         const GValue *value);
-void                gupnp_service_freeze_notify         (GUPnPService *service);
-void                gupnp_service_thaw_notify           (GUPnPService *service);
-void                gupnp_service_signals_autoconnect   (GUPnPService *service,
-                                                         gpointer user_data,
-                                                         GError **error);
-
-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPServiceInfo
-         +----GUPnPService
-
-
-  GBoxed
-   +----GUPnPServiceAction
-
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
const char * + +gupnp_service_action_get_name () +
+GList * + +gupnp_service_action_get_locales () +
+void + +gupnp_service_action_get () +
+void + +gupnp_service_action_get_valist () +
+void + +gupnp_service_action_get_value () +
+GValue * + +gupnp_service_action_get_gvalue () +
+GList * + +gupnp_service_action_get_values () +
+void + +gupnp_service_action_set () +
+void + +gupnp_service_action_set_valist () +
+void + +gupnp_service_action_set_value () +
+void + +gupnp_service_action_set_values () +
+void + +gupnp_service_action_return () +
+void + +gupnp_service_action_return_error () +
+SoupMessage * + +gupnp_service_action_get_message () +
+guint + +gupnp_service_action_get_argument_count () +
+void + +gupnp_service_notify () +
+void + +gupnp_service_notify_valist () +
+void + +gupnp_service_notify_value () +
+void + +gupnp_service_freeze_notify () +
+void + +gupnp_service_thaw_notify () +
+void + +gupnp_service_signals_autoconnect () +

Properties

-
-  "root-device"              GUPnPRootDevice*      : Read / Write / Construct Only
-
+
+++++ + + + + + +
+GUPnPRootDevice *root-deviceRead / Write / Construct Only
-
-

Description

-

-GUPnPService allows for handling incoming actions and state variable -notification. GUPnPService implements the GUPnPServiceInfo interface. -

-
-
-

Details

-
-

struct GUPnPService

-
struct GUPnPService;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

GUPnPServiceAction

-
typedef struct _GUPnPServiceAction GUPnPServiceAction;
-

-Opaque structure for holding in-progress action data. -

-
-
-
-

gupnp_service_action_get_name ()

-
const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
-

-Get the name of action. -

-
-+
+++++ - - + + + - - + + + + + + + +

action :

A GUPnPServiceAction -voidaction-invokedHas Details

Returns :

The name of action -voidnotify-failedRun Last
voidquery-variableHas Details
-
-
-

gupnp_service_action_get_locales ()

-
GList *             gupnp_service_action_get_locales    (GUPnPServiceAction *action);
-

-Get an ordered (preferred first) GList of locales preferred by -the client. Free list and elements after use. -

-
-+
+

Types and Values

+
++++ - - + + - - + +

action :

A GUPnPServiceAction - GUPnPService

Returns :

A GList of char* -locale names. [element-type utf8][transfer full] - GUPnPServiceAction
-
+
+

Object Hierarchy

+
    GBoxed
+    ╰── GUPnPServiceAction
+    GObject
+    ╰── GUPnPServiceInfo
+        ╰── GUPnPService
+
+
+
+

Description

+

GUPnPService allows for handling incoming actions and state variable +notification. GUPnPService implements the GUPnPServiceInfo interface.

+
+
+

Functions

-

gupnp_service_action_get ()

-
void                gupnp_service_action_get            (GUPnPServiceAction *action,
-                                                         ...);
-

-Retrieves the specified action arguments. +

gupnp_service_action_get_name ()

+
const char *
+gupnp_service_action_get_name (GUPnPServiceAction *action);
+

Get the name of action +.

+
+

Parameters

+
+++++ + + + + + +

action

A GUPnPServiceAction

 
+
+
+

Returns

+

The name of action

-
-+

+ + +
+
+

gupnp_service_action_get_locales ()

+
GList *
+gupnp_service_action_get_locales (GUPnPServiceAction *action);
+

Get an ordered (preferred first) GList of locales preferred by +the client. Free list and elements after use.

+
+

Parameters

+
+++++ + + + + + +

action

A GUPnPServiceAction

 
+
+
+

Returns

+

A GList of char* +locale names.

+

[element-type utf8][transfer full]

+
+
+
+
+

gupnp_service_action_get ()

+
void
+gupnp_service_action_get (GUPnPServiceAction *action,
+                          ...);
+

Retrieves the specified action arguments.

+
+

Parameters

+
+++++ - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

... :

tuples of argument name, argument type, and argument value -location, terminated with NULL.

...

tuples of argument name, argument type, and argument value +location, terminated with NULL.

 
+

-

gupnp_service_action_get_valist ()

-
void                gupnp_service_action_get_valist     (GUPnPServiceAction *action,
-                                                         va_list var_args);
-

-See gupnp_service_action_get(); this version takes a va_list for -use by language bindings. -

-
-+

gupnp_service_action_get_valist ()

+
void
+gupnp_service_action_get_valist (GUPnPServiceAction *action,
+                                 va_list var_args);
+

See gupnp_service_action_get(); this version takes a va_list for +use by language bindings.

+
+

Parameters

+
+++++ - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

var_args :

va_list of tuples of argument name, argument type, and argument -value location.

var_args

va_list of tuples of argument name, argument type, and argument +value location.

 
+

-

gupnp_service_action_get_value ()

-
void                gupnp_service_action_get_value      (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         GValue *value);
-

-Retrieves the value of argument into value. -

-
-+

gupnp_service_action_get_value ()

+
void
+gupnp_service_action_get_value (GUPnPServiceAction *action,
+                                const char *argument,
+                                GValue *value);
+

Retrieves the value of argument + into value +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

argument :

The name of the argument to retrieve

argument

The name of the argument to retrieve

 

value :

The GValue to store the value of the argument, initialized -to the correct type. [inout] -

value

The GValue to store the value of the argument, initialized +to the correct type.

[inout]
+

-

gupnp_service_action_get_gvalue ()

-
GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         GType type);
-

-Retrieves the value of argument into a GValue of type type and returns it. +

gupnp_service_action_get_gvalue ()

+
GValue *
+gupnp_service_action_get_gvalue (GUPnPServiceAction *action,
+                                 const char *argument,
+                                 GType type);
+

Retrieves the value of argument + into a GValue of type type + and returns it. The method exists only and only to satify PyGI, please use -gupnp_service_action_get_value and ignore this if possible. -

-
-+gupnp_service_action_get_value() and ignore this if possible.

+
+

Parameters

+
+++++ - - - - - - + + + - - + + + - - + + +

action :

A GUPnPServiceAction -

argument :

The name of the argument to retrieve

action

A GUPnPServiceAction

 

type :

The type of argument to retrieve

argument

The name of the argument to retrieve

 

Returns :

Value as GValue associated with action. -g_value_unset and g_slice_free it after usage. -Rename To: gupnp_service_action_get_value. [transfer full] -

type

The type of argument to retrieve

 
+
+

Returns

+

Value as GValue associated with action +. +g_value_unset() and g_slice_free() it after usage.

+

[transfer full]

+
+

Since 0.13.3

+

-

gupnp_service_action_get_values ()

-
GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_types);
-

-A variant of gupnp_service_action_get that uses GList instead of varargs. -

-
-+

gupnp_service_action_get_values ()

+
GList *
+gupnp_service_action_get_values (GUPnPServiceAction *action,
+                                 GList *arg_names,
+                                 GList *arg_types);
+

A variant of gupnp_service_action_get that uses GList instead of varargs.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

arg_names :

(element-type utf8) : A GList of argument names as string

arg_names

(element-type utf8) : A GList of argument names as string

 

arg_types :

A GList of argument types as GType. [element-type GType] -

Returns :

The values as GList of -GValue. g_list_free the returned list and g_value_unset and g_slice_free -each element. [element-type GValue][transfer full] -

arg_types

A GList of argument types as GType.

[element-type GType]
+
+

Returns

+

The values as GList of +GValue. g_list_free() the returned list and g_value_unset() and g_slice_free() +each element.

+

[element-type GValue][transfer full]

+
+

Since 0.13.3

+
-

gupnp_service_action_set ()

-
void                gupnp_service_action_set            (GUPnPServiceAction *action,
-                                                         ...);
-

-Sets the specified action return values. -

-
-+

gupnp_service_action_set ()

+
void
+gupnp_service_action_set (GUPnPServiceAction *action,
+                          ...);
+

Sets the specified action return values.

+
+

Parameters

+
+++++ - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

... :

tuples of return value name, return value type, and -actual return value, terminated with NULL.

...

tuples of return value name, return value type, and +actual return value, terminated with NULL.

 
+
-

gupnp_service_action_set_valist ()

-
void                gupnp_service_action_set_valist     (GUPnPServiceAction *action,
-                                                         va_list var_args);
-

-See gupnp_service_action_set(); this version takes a va_list for -use by language bindings. -

-
-+

gupnp_service_action_set_valist ()

+
void
+gupnp_service_action_set_valist (GUPnPServiceAction *action,
+                                 va_list var_args);
+

See gupnp_service_action_set(); this version takes a va_list for +use by language bindings.

+
+

Parameters

+
+++++ - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

var_args :

va_list of tuples of return value name, return value type, and -actual return value.

var_args

va_list of tuples of return value name, return value type, and +actual return value.

 
+
-

gupnp_service_action_set_value ()

-
void                gupnp_service_action_set_value      (GUPnPServiceAction *action,
-                                                         const char *argument,
-                                                         const GValue *value);
-

-Sets the value of argument to value. -

-
-+

gupnp_service_action_set_value ()

+
void
+gupnp_service_action_set_value (GUPnPServiceAction *action,
+                                const char *argument,
+                                const GValue *value);
+

Sets the value of argument + to value +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

argument :

The name of the return value to retrieve

argument

The name of the return value to retrieve

 

value :

The GValue to store the return value

value

The GValue to store the return value

 
+
-

gupnp_service_action_set_values ()

-
void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_values);
-

-Sets the specified action return values. -

-
-+

gupnp_service_action_set_values ()

+
void
+gupnp_service_action_set_values (GUPnPServiceAction *action,
+                                 GList *arg_names,
+                                 GList *arg_values);
+

Sets the specified action return values.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

arg_names :

A GList of argument names. [element-type utf8][transfer none] -

arg_names

A GList of argument names.

[element-type utf8][transfer none]

arg_values :

The GList of values (as -GValues) that line up with arg_names. [element-type GValue][transfer none] -

arg_values

The GList of values (as +GValues) that line up with arg_names +.

[element-type GValue][transfer none]
+

Since 0.13.3

+
-

gupnp_service_action_return ()

-
void                gupnp_service_action_return         (GUPnPServiceAction *action);
-

-Return succesfully. -

-
-+

gupnp_service_action_return ()

+
void
+gupnp_service_action_return (GUPnPServiceAction *action);
+

Return succesfully.

+
+

Parameters

+
+++++ - - + + +

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 
+
-

gupnp_service_action_return_error ()

-
void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
-                                                         guint error_code,
-                                                         const char *error_description);
-

-Return error_code. -

-
-+

gupnp_service_action_return_error ()

+
void
+gupnp_service_action_return_error (GUPnPServiceAction *action,
+                                   guint error_code,
+                                   const char *error_description);
+

Return error_code +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + +provided automatically.

+

action :

A GUPnPServiceAction -

action

A GUPnPServiceAction

 

error_code :

The error code

error_code

The error code

 

error_description :

The error description, or NULL if error_code is +

error_description

The error description, or NULL if error_code +is one of GUPNP_CONTROL_ERROR_INVALID_ACTION, GUPNP_CONTROL_ERROR_INVALID_ARGS, GUPNP_CONTROL_ERROR_OUT_OF_SYNC or GUPNP_CONTROL_ERROR_ACTION_FAILED, in which case a description is -provided automatically.

 
+
-

gupnp_service_action_get_message ()

-
SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
-

-Get the SoupMessage associated with action. Mainly intended for -applications to be able to read HTTP headers received from clients. -

-
-- - - - - - - - - - +

gupnp_service_action_get_message ()

+
SoupMessage *
+gupnp_service_action_get_message (GUPnPServiceAction *action);
+

Get the SoupMessage associated with action +. Mainly intended for +applications to be able to read HTTP headers received from clients.

+
+

Parameters

+

action :

A GUPnPServiceAction -

Returns :

-SoupMessage associated with action. Unref -after using it. [transfer full] -
+++++ + + + + +

action

A GUPnPServiceAction

 
+
+

Returns

+

SoupMessage associated with action +. Unref +after using it.

+

[transfer full]

+
+

Since 0.13.0

+
-

gupnp_service_action_get_argument_count ()

-
guint               gupnp_service_action_get_argument_count
-                                                        (GUPnPServiceAction *action);
-

-Get the number of IN arguments from the action and return it. -

-
-- - - - - - - - - - +

gupnp_service_action_get_argument_count ()

+
guint
+gupnp_service_action_get_argument_count
+                               (GUPnPServiceAction *action);
+

Get the number of IN arguments from the action + and return it.

+
+

Parameters

+

action :

A GUPnPServiceAction -

Returns :

The number of IN arguments from the action.
+++++ + + + + +

action

A GUPnPServiceAction

 
+
+

Returns

+

The number of IN arguments from the action +.

+

+
+

Since 0.17.0

+
-

gupnp_service_notify ()

-
void                gupnp_service_notify                (GUPnPService *service,
-                                                         ...);
-

-Notifies listening clients that the properties listed in Varargs -have changed to the specified values. -

-
-+

gupnp_service_notify ()

+
void
+gupnp_service_notify (GUPnPService *service,
+                      ...);
+

Notifies listening clients that the properties listed in Varargs + +have changed to the specified values.

+
+

Parameters

+
+++++ - - + + + - - + + +

service :

A GUPnPService -

service

A GUPnPService

 

... :

Tuples of variable name, variable type, and variable value, -terminated with NULL.

...

Tuples of variable name, variable type, and variable value, +terminated with NULL.

 
+
-

gupnp_service_notify_valist ()

-
void                gupnp_service_notify_valist         (GUPnPService *service,
-                                                         va_list var_args);
-

-See gupnp_service_notify(); this version takes a va_list for -use by language bindings. -

-
-+

gupnp_service_notify_valist ()

+
void
+gupnp_service_notify_valist (GUPnPService *service,
+                             va_list var_args);
+

See gupnp_service_notify(); this version takes a va_list for +use by language bindings.

+
+

Parameters

+
+++++ - - + + + - - + + +

service :

A GUPnPService -

service

A GUPnPService

 

var_args :

A va_list of tuples of variable name, variable type, and variable -value, terminated with NULL.

var_args

A va_list of tuples of variable name, variable type, and variable +value, terminated with NULL.

 
+
-

gupnp_service_notify_value ()

-
void                gupnp_service_notify_value          (GUPnPService *service,
-                                                         const char *variable,
-                                                         const GValue *value);
-

-Notifies listening clients that variable has changed to value. -

-
-+

gupnp_service_notify_value ()

+
void
+gupnp_service_notify_value (GUPnPService *service,
+                            const char *variable,
+                            const GValue *value);
+

Notifies listening clients that variable + has changed to value +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

service :

A GUPnPService -

service

A GUPnPService

 

variable :

The name of the variable to notify

variable

The name of the variable to notify

 

value :

The value of the variable

value

The value of the variable

 
+
-

gupnp_service_freeze_notify ()

-
void                gupnp_service_freeze_notify         (GUPnPService *service);
-

-Causes new notifications to be queued up until gupnp_service_thaw_notify() -is called. -

-
-+

gupnp_service_freeze_notify ()

+
void
+gupnp_service_freeze_notify (GUPnPService *service);
+

Causes new notifications to be queued up until gupnp_service_thaw_notify() +is called.

+
+

Parameters

+
+++++ - - + + +

service :

A GUPnPService -

service

A GUPnPService

 
+
-

gupnp_service_thaw_notify ()

-
void                gupnp_service_thaw_notify           (GUPnPService *service);
-

-Sends out any pending notifications, and stops queuing of new ones. -

-
-+

gupnp_service_thaw_notify ()

+
void
+gupnp_service_thaw_notify (GUPnPService *service);
+

Sends out any pending notifications, and stops queuing of new ones.

+
+

Parameters

+
+++++ - - + + +

service :

A GUPnPService -

service

A GUPnPService

 
+
-

gupnp_service_signals_autoconnect ()

-
void                gupnp_service_signals_autoconnect   (GUPnPService *service,
-                                                         gpointer user_data,
-                                                         GError **error);
-

-A convenience function that attempts to connect all possible -"action-invoked" and "query-variable" signals to -appropriate callbacks for the service service. It uses service introspection +

gupnp_service_signals_autoconnect ()

+
void
+gupnp_service_signals_autoconnect (GUPnPService *service,
+                                   gpointer user_data,
+                                   GError **error);
+

A convenience function that attempts to connect all possible +“action-invoked” and “query-variable” signals to +appropriate callbacks for the service service +. It uses service introspection and GModule's introspective features. It is very simillar to -gtk_builder_connect_signals() except that it attempts to guess the names of -the signal handlers on its own. -

-

-For this function to do its magic, the application must name the callback -functions for "action-invoked" signals by striping the CamelCase +gtk_builder_connect_signals() except that it attempts to guess the names of +the signal handlers on its own.

+

For this function to do its magic, the application must name the callback +functions for “action-invoked” signals by striping the CamelCase off the action names and either prepend "on_" or append "_cb" to them. Same -goes for "query-variable" signals, except that "query_" should +goes for “query-variable” signals, except that "query_" should be prepended to the variable name. For example, callback function for GetSystemUpdateID action should be either named as "get_system_update_id_cb" or "on_get_system_update_id" and callback function for the query of "SystemUpdateID" state variable should be named query_system_update_id_cb or -on_query_system_update_id. -

-

-

-
-

Note

This function will not work correctly if GModule is not supported +on_query_system_update_id.

+
This function will not work correctly if GModule is not supported on the platform or introspection is not available for service.
-

-

-

-

-
-

Warning

This function can not and therefore does not guarantee that the +
This function can not and therefore does not guarantee that the resulting signal connections will be correct as it depends heavily on a particular naming schemes described above.
-

-

-
-+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

service :

A GUPnPService -

service

A GUPnPService

 

user_data :

the data to pass to each of the callbacks

user_data

the data to pass to each of the callbacks

 

error :

return location for a GError, or NULL -

error

return location for a GError, or NULL

 
+
+
+

Types and Values

+
+

GUPnPService

+
typedef struct _GUPnPService GUPnPService;
+

This struct contains private data only, and should be accessed using the +functions below.

+
+
+
+

GUPnPServiceAction

+
typedef struct _GUPnPServiceAction GUPnPServiceAction;
+

Opaque structure for holding in-progress action data.

+
+

Property Details

-

The "root-device" property

-
  "root-device"              GUPnPRootDevice*      : Read / Write / Construct Only
-

-The containing GUPnPRootDevice. -

+

The “root-device” property

+
  “root-device”              GUPnPRootDevice *
+

The containing GUPnPRootDevice.

+

Flags: Read / Write / Construct Only

Signal Details

-

The "action-invoked" signal

-
void                user_function                      (GUPnPService       *service,
-                                                        GUPnPServiceAction *action,
-                                                        gpointer            user_data)      : Has Details
-

-Emitted whenever an action is invoked. Handler should process -action and must call either gupnp_service_action_return() or -gupnp_service_action_return_error(). -

-
-+

The “action-invoked” signal

+
void
+user_function (GUPnPService       *service,
+               GUPnPServiceAction *action,
+               gpointer            user_data)
+

Emitted whenever an action is invoked. Handler should process +action + and must call either gupnp_service_action_return() or +gupnp_service_action_return_error().

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

service :

The GUPnPService that received the signal

service

The GUPnPService that received the signal

 

action :

The invoked GUPnPServiceAction -

action

The invoked GUPnPServiceAction

 

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Has Details

+

-

The "notify-failed" signal

-
void                user_function                      (GUPnPService *service,
-                                                        gpointer      callback_url,
-                                                        gpointer      reason,
-                                                        gpointer      user_data)         : Run Last
-

-Emitted whenever notification of a client fails. -

-
-+

The “notify-failed” signal

+
void
+user_function (GUPnPService *service,
+               gpointer      callback_url,
+               gpointer      reason,
+               gpointer      user_data)
+

Emitted whenever notification of a client fails.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + +

service :

The GUPnPService that received the signal

service

The GUPnPService that received the signal

 

callback_url :

A GList of callback URLs. [type GList][element-type SoupURI] -

callback_url

A GList of callback URLs.

[type GList][element-type SoupURI]

reason :

A pointer to a GError describing why the notify failed. [type GError] -

reason

A pointer to a GError describing why the notify failed.

[type GError]

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+
-

The "query-variable" signal

-
void                user_function                      (GUPnPService *service,
-                                                        gchar        *variable,
-                                                        gpointer      value,
-                                                        gpointer      user_data)      : Has Details
-

-Emitted whenever service needs to know the value of variable. -Handler should fill value with the value of variable. -

-
-+

The “query-variable” signal

+
void
+user_function (GUPnPService *service,
+               gchar        *variable,
+               gpointer      value,
+               gpointer      user_data)
+

Emitted whenever service + needs to know the value of variable +. +Handler should fill value + with the value of variable +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + +

service :

The GUPnPService that received the signal

service

The GUPnPService that received the signal

 

variable :

The variable that is being queried

variable

The variable that is being queried

 

value :

The location of the GValue of the variable. [type GValue][inout] -

value

The location of the GValue of the variable.

[type GValue][inout]

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Has Details

+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPServiceInfo.html b/doc/html/GUPnPServiceInfo.html index c58f52a..2a5d20a 100644 --- a/doc/html/GUPnPServiceInfo.html +++ b/doc/html/GUPnPServiceInfo.html @@ -2,34 +2,28 @@ -GUPnPServiceInfo - +GUPnP Reference Manual: GUPnPServiceInfo + - + - - - - - - - - - - + + + + + + +
@@ -37,441 +31,686 @@

GUPnPServiceInfo

GUPnPServiceInfo — Base abstract class for querying service information.

- +
- -
-

Object Hierarchy

-
-  GObject
-   +----GUPnPServiceInfo
-         +----GUPnPService
-         +----GUPnPServiceProxy
-
-
-
-

Properties

-
-  "context"                  GUPnPContext*         : Read / Write / Construct Only
-  "document"                 GUPnPXMLDoc*          : Write / Construct Only
-  "element"                  gpointer              : Write / Construct Only
-  "location"                 gchar*                : Read / Write / Construct Only
-  "service-type"             gchar*                : Read / Write / Construct Only
-  "udn"                      gchar*                : Read / Write / Construct Only
-  "url-base"                 SoupURI*              : Read / Write / Construct Only
-
-
-

Description

-

-The GUPnPDeviceInfo base abstract class provides methods for querying -service information. -

-
-
-

Details

-
-

struct GUPnPServiceInfo

-
struct GUPnPServiceInfo;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

GUPnPServiceIntrospectionCallback ()

-
void                (*GUPnPServiceIntrospectionCallback)
-                                                        (GUPnPServiceInfo *info,
-                                                         GUPnPServiceIntrospection *introspection,
-                                                         const GError *error,
-                                                         gpointer user_data);
-

-Callback notifying that introspection for info has been obtained. -

-
-+

Functions

+
++++ - - + + - - + + - - + + - - + + - -

info :

The GUPnPServiceInfo introspection was requested for +void + +(*GUPnPServiceIntrospectionCallback) () +

introspection :

The new GUPnPServiceIntrospection object, or NULL +GUPnPContext * + +gupnp_service_info_get_context () +

error :

The GError that occurred, or NULLconst char * + +gupnp_service_info_get_location () +

user_data :

User dataconst SoupURI * + +gupnp_service_info_get_url_base () +
-
-
-
-

gupnp_service_info_get_context ()

-
GUPnPContext *      gupnp_service_info_get_context      (GUPnPServiceInfo *info);
-

-Get the GUPnPContext associated with info. -

-
-- - - + - - + - -

info :

A GUPnPServiceInfo +const char * + +gupnp_service_info_get_udn ()

Returns :

A GUPnPContext. [transfer none] +const char * + +gupnp_service_info_get_service_type ()
-
-
-
-

gupnp_service_info_get_location ()

-
const char *        gupnp_service_info_get_location     (GUPnPServiceInfo *info);
-

-Get the location of the device description file. -

-
-- - - + - - + + - -

info :

A GUPnPServiceInfo + +char * + +gupnp_service_info_get_id ()

Returns :

A constant string. +char * + +gupnp_service_info_get_scpd_url () +
-
-
-
-

gupnp_service_info_get_url_base ()

-
const SoupURI *     gupnp_service_info_get_url_base     (GUPnPServiceInfo *info);
-

-Get the URL base of this service. -

-
-- - - + - - + + - -

info :

A GUPnPServiceInfo + +char * + +gupnp_service_info_get_control_url ()

Returns :

A constant SoupURI. +char * + +gupnp_service_info_get_event_subscription_url () +
-
-
-
-

gupnp_service_info_get_udn ()

-
const char *        gupnp_service_info_get_udn          (GUPnPServiceInfo *info);
-

-Get the Unique Device Name of the containing device. -

-
-- - - + - - + + + + + +

info :

A GUPnPServiceInfo + +GUPnPServiceIntrospection * + +gupnp_service_info_get_introspection ()

Returns :

A constant string. +void + +gupnp_service_info_get_introspection_async () +
+void + +gupnp_service_info_get_introspection_async_full () +
-
-
-

gupnp_service_info_get_service_type ()

-
const char *        gupnp_service_info_get_service_type (GUPnPServiceInfo *info);
-

-Get the UPnP service type, or NULL. -

-
-+
+

Properties

+
+++++ - - + + + - - + + + - -

info :

A GUPnPServiceInfo - +GUPnPContext *contextRead / Write / Construct Only

Returns :

A constant string. +GUPnPXMLDoc *documentWrite / Construct Only
-
-
-
-

gupnp_service_info_get_id ()

-
char *              gupnp_service_info_get_id           (GUPnPServiceInfo *info);
-

-Get the ID of this service, or NULL if there is no ID. -

-
-- - - + + + - - + + + - -

info :

A GUPnPServiceInfo -gpointerelementWrite / Construct Only

Returns :

A string. This string should be freed with g_free() after use. +gchar *locationRead / Write / Construct Only
-
-
-
-

gupnp_service_info_get_scpd_url ()

-
char *              gupnp_service_info_get_scpd_url     (GUPnPServiceInfo *info);
-

-Get the SCPD URL for this service, or NULL if there is no SCPD. -

-
-- - - + + + - - + + + + + + + +

info :

A GUPnPServiceInfo - +gchar *service-typeRead / Write / Construct Only

Returns :

A string. This string should be freed with g_free() after use. +gchar *udnRead / Write / Construct Only
+SoupURI *url-baseRead / Write / Construct Only
-
+
+

Types and Values

+
++++ + + + + +
structGUPnPServiceInfo
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPServiceInfo
+        ├── GUPnPService
+        ╰── GUPnPServiceProxy
+
+
+
+

Description

+

The GUPnPDeviceInfo base abstract class provides methods for querying +service information.

+
+
+

Functions

-

gupnp_service_info_get_control_url ()

-
char *              gupnp_service_info_get_control_url  (GUPnPServiceInfo *info);
-

-Get the control URL for this service, or NULL.. -

-
-+

GUPnPServiceIntrospectionCallback ()

+
void
+(*GUPnPServiceIntrospectionCallback) (GUPnPServiceInfo *info,
+                                      GUPnPServiceIntrospection *introspection,
+                                      const GError *error,
+                                      gpointer user_data);
+

Callback notifying that introspection + for info + has been obtained.

+
+

Parameters

+
+++++ - - + + + - - + + + + + + + + + + + + +

info :

A GUPnPServiceInfo -

info

The GUPnPServiceInfo introspection was requested for

 

Returns :

A string. This string should be freed with g_free() after use.

introspection

The new GUPnPServiceIntrospection object, or NULL

 

error

The GError that occurred, or NULL

 

user_data

User data

 
+
+
+
+

gupnp_service_info_get_context ()

+
GUPnPContext *
+gupnp_service_info_get_context (GUPnPServiceInfo *info);
+

Get the GUPnPContext associated with info +.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A GUPnPContext.

+

[transfer none]

+
+

-

gupnp_service_info_get_event_subscription_url ()

-
char *              gupnp_service_info_get_event_subscription_url
-                                                        (GUPnPServiceInfo *info);
-

-Get the event subscription URL for this service, or NULL. -

-
-+

gupnp_service_info_get_location ()

+
const char *
+gupnp_service_info_get_location (GUPnPServiceInfo *info);
+

Get the location of the device description file.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A constant string.

+

+
+
+
+
+

gupnp_service_info_get_url_base ()

+
const SoupURI *
+gupnp_service_info_get_url_base (GUPnPServiceInfo *info);
+

Get the URL base of this service.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A constant SoupURI.

+

+
+
+
+
+

gupnp_service_info_get_udn ()

+
const char *
+gupnp_service_info_get_udn (GUPnPServiceInfo *info);
+

Get the Unique Device Name of the containing device.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A constant string.

+

+
+
+
+
+

gupnp_service_info_get_service_type ()

+
const char *
+gupnp_service_info_get_service_type (GUPnPServiceInfo *info);
+

Get the UPnP service type, or NULL.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A constant string.

+

+
+
+
+
+

gupnp_service_info_get_id ()

+
char *
+gupnp_service_info_get_id (GUPnPServiceInfo *info);
+

Get the ID of this service, or NULL if there is no ID.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A string. This string should be freed with g_free() after use.

+

+
+
+
+
+

gupnp_service_info_get_scpd_url ()

+
char *
+gupnp_service_info_get_scpd_url (GUPnPServiceInfo *info);
+

Get the SCPD URL for this service, or NULL if there is no SCPD.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A string. This string should be freed with g_free() after use.

+

+
+
+
+
+

gupnp_service_info_get_control_url ()

+
char *
+gupnp_service_info_get_control_url (GUPnPServiceInfo *info);
+

Get the control URL for this service, or NULL..

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A string. This string should be freed with g_free() after use.

+

+
+
+
+
+

gupnp_service_info_get_event_subscription_url ()

+
char *
+gupnp_service_info_get_event_subscription_url
+                               (GUPnPServiceInfo *info);
+

Get the event subscription URL for this service, or NULL.

+
+

Parameters

+
+++++ + + + + + +

info

A GUPnPServiceInfo

 
+
+
+

Returns

+

A string. This string should be freed with g_free() after use.

+

+
+
+
+
+

gupnp_service_info_get_introspection ()

+
GUPnPServiceIntrospection *
+gupnp_service_info_get_introspection (GUPnPServiceInfo *info,
+                                      GError **error);
+

Note that introspection object is created from the information in service +description document (SCPD) provided by the service so it can not be created +if the service does not provide an SCPD.

+

Warning: You should use gupnp_service_info_get_introspection_async() +instead, this function re-enter the GMainloop before returning.

+
+

Parameters

+
+++++ - - + + + - - + + +

info :

A GUPnPServiceInfo -

info

A GUPnPServiceInfo

 

Returns :

A string. This string should be freed with g_free() after use.

error

return location for a GError, or NULL

 
+
+

Returns

+

A new GUPnPServiceIntrospection for this +service or NULL. Unref after use.

+

[transfer full]

+
+

-

gupnp_service_info_get_introspection ()

-
GUPnPServiceIntrospection * gupnp_service_info_get_introspection
-                                                        (GUPnPServiceInfo *info,
-                                                         GError **error);
-

-Note that introspection object is created from the information in service +

gupnp_service_info_get_introspection_async ()

+
void
+gupnp_service_info_get_introspection_async
+                               (GUPnPServiceInfo *info,
+                                GUPnPServiceIntrospectionCallback callback,
+                                gpointer user_data);
+

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created -if the service does not provide an SCPD. -

-

-Warning: You should use gupnp_service_info_get_introspection_async() -instead, this function re-enter the GMainloop before returning. -

-
-+if the service does not provide an SCPD.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

info :

A GUPnPServiceInfo -

info

A GUPnPServiceInfo

 

error :

return location for a GError, or NULL -

callback

(scope async) : callback to be called when introspection object is ready.

 

Returns :

A new GUPnPServiceIntrospection for this -service or NULL. Unref after use. [transfer full] -

user_data

user_data to be passed to the callback.

 
+

-

gupnp_service_info_get_introspection_async ()

-
void                gupnp_service_info_get_introspection_async
-                                                        (GUPnPServiceInfo *info,
-                                                         GUPnPServiceIntrospectionCallback callback,
-                                                         gpointer user_data);
-

-Note that introspection object is created from the information in service +

gupnp_service_info_get_introspection_async_full ()

+
void
+gupnp_service_info_get_introspection_async_full
+                               (GUPnPServiceInfo *info,
+                                GUPnPServiceIntrospectionCallback callback,
+                                GCancellable *cancellable,
+                                gpointer user_data);
+

Note that introspection object is created from the information in service description document (SCPD) provided by the service so it can not be created -if the service does not provide an SCPD. -

-
-+if the service does not provide an SCPD.

+

If cancellable + is used to cancel the call, callback + will be called with +error code G_IO_ERROR_CANCELLED.

+
+

Parameters

+
+++++ - - + + + + + + + + - - + + + - - + + +

info :

A GUPnPServiceInfo -

info

A GUPnPServiceInfo

 

callback

(scope async) : callback to be called when introspection object is ready.

 

callback :

(scope async) : callback to be called when introspection object is ready.

cancellable

GCancellable that can be used to cancel the call, or NULL.

 

user_data :

user_data to be passed to the callback.

user_data

user_data to be passed to the callback.

 
+

Since 0.20.9.

+ + +
+

Types and Values

+
+

struct GUPnPServiceInfo

+
struct GUPnPServiceInfo;
+

This struct contains private data only, and should be accessed using the +functions below.

+

Property Details

-

The "context" property

-
  "context"                  GUPnPContext*         : Read / Write / Construct Only
-

-The GUPnPContext to use. -

+

The “context” property

+
  “context”                  GUPnPContext *
+

The GUPnPContext to use.

+

Flags: Read / Write / Construct Only


-

The "document" property

-
  "document"                 GUPnPXMLDoc*          : Write / Construct Only
-

-Private property. -

+

The “document” property

+
  “document”                 GUPnPXMLDoc *
+

Private property.

+

Flags: Write / Construct Only

Stability Level: Private


-

The "element" property

-
  "element"                  gpointer              : Write / Construct Only
-

-Private property. -

+

The “element” property

+
  “element”                  gpointer
+

Private property.

+

Flags: Write / Construct Only

Stability Level: Private


-

The "location" property

-
  "location"                 gchar*                : Read / Write / Construct Only
-

-The location of the device description file. -

+

The “location” property

+
  “location”                 gchar *
+

The location of the device description file.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "service-type" property

-
  "service-type"             gchar*                : Read / Write / Construct Only
-

-The service type. -

+

The “service-type” property

+
  “service-type”             gchar *
+

The service type.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "udn" property

-
  "udn"                      gchar*                : Read / Write / Construct Only
-

-The UDN of the containing device. -

+

The “udn” property

+
  “udn”                      gchar *
+

The UDN of the containing device.

+

Flags: Read / Write / Construct Only

Default value: NULL


-

The "url-base" property

-
  "url-base"                 SoupURI*              : Read / Write / Construct Only
-

-The URL base (SoupURI). -

+

The “url-base” property

+
  “url-base”                 SoupURI *
+

The URL base (SoupURI).

+

Flags: Read / Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPServiceProxy.html b/doc/html/GUPnPServiceProxy.html index 9faf882..d928fcb 100644 --- a/doc/html/GUPnPServiceProxy.html +++ b/doc/html/GUPnPServiceProxy.html @@ -2,36 +2,29 @@ -GUPnPServiceProxy - +GUPnP Reference Manual: GUPnPServiceProxy + - + - - - - - - - - - - + + + + + + +
@@ -39,1038 +32,1519 @@

GUPnPServiceProxy

GUPnPServiceProxy — Proxy class for remote services.

- +
-
-

Synopsis

-
struct              GUPnPServiceProxy;
-                    GUPnPServiceProxyAction;
-void                (*GUPnPServiceProxyActionCallback)  (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         gpointer user_data);
-void                (*GUPnPServiceProxyNotifyCallback)  (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GValue *value,
-                                                         gpointer user_data);
-gboolean            gupnp_service_proxy_send_action     (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         ...);
-gboolean            gupnp_service_proxy_send_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         va_list var_args);
-gboolean            gupnp_service_proxy_send_action_hash
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         GHashTable *in_hash,
-                                                         GHashTable *out_hash);
-gboolean            gupnp_service_proxy_send_action_list
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         GList *in_names,
-                                                         GList *in_values,
-                                                         GList *out_names,
-                                                         GList *out_types,
-                                                         GList **out_values);
-GUPnPServiceProxyAction * gupnp_service_proxy_begin_action
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         ...);
-GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         va_list var_args);
-GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_hash
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         GHashTable *hash);
-GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_list
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GList *in_names,
-                                                         GList *in_values,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data);
-gboolean            gupnp_service_proxy_end_action      (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         ...);
-gboolean            gupnp_service_proxy_end_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         va_list var_args);
-gboolean            gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GHashTable *hash);
-gboolean            gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GList *out_names,
-                                                         GList *out_types,
-                                                         GList **out_values);
-void                gupnp_service_proxy_cancel_action   (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action);
-gboolean            gupnp_service_proxy_add_notify      (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GType type,
-                                                         GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
-gboolean            gupnp_service_proxy_remove_notify   (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
-void                gupnp_service_proxy_set_subscribed  (GUPnPServiceProxy *proxy,
-                                                         gboolean subscribed);
-gboolean            gupnp_service_proxy_get_subscribed  (GUPnPServiceProxy *proxy);
-
-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPServiceInfo
-         +----GUPnPServiceProxy
-
+

Functions

+

Properties

-
-  "subscribed"               gboolean              : Read / Write
-
+
+++++ + + + + + +
gbooleansubscribedRead / Write

Signals

-
-  "subscription-lost"                              : Run Last
+
+++++ + + + + + +
voidsubscription-lostRun Last
+
+
+

Types and Values

+
++++ + + + + + + + + + + +
structGUPnPServiceProxy
 GUPnPServiceProxyAction
+
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPServiceInfo
+        ╰── GUPnPServiceProxy
 

Description

-

-GUPnPServiceProxy sends commands to a remote UPnP service and handles +

GUPnPServiceProxy sends commands to a remote UPnP service and handles incoming event notifications. GUPnPServiceProxy implements the -GUPnPServiceInfo interface. -

+GUPnPServiceInfo interface.

-

Details

-
-

struct GUPnPServiceProxy

-
struct GUPnPServiceProxy;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

GUPnPServiceProxyAction

-
typedef struct _GUPnPServiceProxyAction GUPnPServiceProxyAction;
-

-Opaque structure for holding in-progress action data. -

-
-
+

Functions

-

GUPnPServiceProxyActionCallback ()

-
void                (*GUPnPServiceProxyActionCallback)  (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         gpointer user_data);
-

-Callback notifying that action on proxy has returned and -gupnp_service_proxy_end_action() etc can be called. -

-
-+

GUPnPServiceProxyActionCallback ()

+
void
+(*GUPnPServiceProxyActionCallback) (GUPnPServiceProxy *proxy,
+                                    GUPnPServiceProxyAction *action,
+                                    gpointer user_data);
+

Callback notifying that action + on proxy + has returned and +gupnp_service_proxy_end_action() etc can be called.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

proxy :

The GUPnPServiceProxy action is called from

proxy

The GUPnPServiceProxy action +is called from

 

action :

The GUPnPServiceProxyAction in progress

action

The GUPnPServiceProxyAction in progress

 

user_data :

User data

user_data

User data

 
+

-

GUPnPServiceProxyNotifyCallback ()

-
void                (*GUPnPServiceProxyNotifyCallback)  (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GValue *value,
-                                                         gpointer user_data);
-

-Callback notifying that the state variable variable on proxy has changed to -value. -

-
-+

GUPnPServiceProxyNotifyCallback ()

+
void
+(*GUPnPServiceProxyNotifyCallback) (GUPnPServiceProxy *proxy,
+                                    const char *variable,
+                                    GValue *value,
+                                    gpointer user_data);
+

Callback notifying that the state variable variable + on proxy + has changed to +value +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + +

proxy :

The GUPnPServiceProxy the notification originates from

proxy

The GUPnPServiceProxy the notification originates from

 

variable :

The name of the variable being notified

variable

The name of the variable being notified

 

value :

The GValue of the variable being notified

value

The GValue of the variable being notified

 

user_data :

User data

user_data

User data

 
+

-

gupnp_service_proxy_send_action ()

-
gboolean            gupnp_service_proxy_send_action     (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         ...);
-

-Sends action action with parameters Varargs to the service exposed by -proxy synchronously. If an error occurred, error will be set. In case of -a UPnPError the error code will be the same in error. -

-
-+

gupnp_service_proxy_send_action ()

+
gboolean
+gupnp_service_proxy_send_action (GUPnPServiceProxy *proxy,
+                                 const char *action,
+                                 GError **error,
+                                 ...);
+

Sends action action + with parameters Varargs + to the service exposed by +proxy + synchronously. If an error occurred, error + will be set. In case of +a UPnPError the error code will be the same in error +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + - - - - +out parameter type, and out parameter value location, terminated with NULL

+

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

... :

tuples of in parameter name, in parameter type, and in parameter +

...

tuples of in parameter name, in parameter type, and in parameter value, followed by NULL, and then tuples of out parameter name, -out parameter type, and out parameter value location, terminated with NULL -

Returns :

-TRUE if sending the action was succesful. 
+
+

Returns

+

TRUE if sending the action was succesful.

+

+
+
-

gupnp_service_proxy_send_action_valist ()

-
gboolean            gupnp_service_proxy_send_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         va_list var_args);
-

-See gupnp_service_proxy_send_action(). -

-
-+

gupnp_service_proxy_send_action_valist ()

+
gboolean
+gupnp_service_proxy_send_action_valist
+                               (GUPnPServiceProxy *proxy,
+                                const char *action,
+                                GError **error,
+                                va_list var_args);
+

See gupnp_service_proxy_send_action().

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + - - - - +out parameter type, and out parameter value location

+

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

var_args :

va_list of tuples of in parameter name, in parameter type, and in +

var_args

va_list of tuples of in parameter name, in parameter type, and in parameter value, followed by NULL, and then tuples of out parameter name, -out parameter type, and out parameter value location

Returns :

-TRUE if sending the action was succesful. 
+
+

Returns

+

TRUE if sending the action was succesful.

+

+
+
-

gupnp_service_proxy_send_action_hash ()

-
gboolean            gupnp_service_proxy_send_action_hash
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         GHashTable *in_hash,
-                                                         GHashTable *out_hash);
-

-See gupnp_service_proxy_send_action(); this version takes a pair of -GHashTables for runtime determined parameter lists. -

-
-+

gupnp_service_proxy_send_action_hash ()

+
gboolean
+gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy,
+                                      const char *action,
+                                      GError **error,
+                                      GHashTable *in_hash,
+                                      GHashTable *out_hash);
+
+

gupnp_service_proxy_send_action_hash has been deprecated since version 0.20.9 and should not be used in newly-written code.

+

Use gupnp_service_proxy_send_action() or +gupnp_service_proxy_send_action_list()

+
+

See gupnp_service_proxy_send_action(); this version takes a pair of +GHashTables for runtime determined parameter lists.

+

Do not use this function in newly written code; it cannot guarantee the +order of arguments and thus breaks interaction with many devices.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - - - - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

in_hash :

A GHashTable of in -parameter name and GValue pairs. [element-type utf8 GValue][transfer none] -

in_hash

A GHashTable of in +parameter name and GValue pairs.

[element-type utf8 GValue][transfer none]

out_hash :

A GHashTable -of out parameter name and initialized GValue pairs. [inout][element-type utf8 GValue][transfer full] -

Returns :

-TRUE if sending the action was succesful.

out_hash

A GHashTable +of out parameter name and initialized GValue pairs.

[inout][element-type utf8 GValue][transfer full]
+
+

Returns

+

TRUE if sending the action was succesful.

+

+
+
-

gupnp_service_proxy_send_action_list ()

-
gboolean            gupnp_service_proxy_send_action_list
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GError **error,
-                                                         GList *in_names,
-                                                         GList *in_values,
-                                                         GList *out_names,
-                                                         GList *out_types,
-                                                         GList **out_values);
-

-The synchronous variant of gupnp_service_proxy_begin_action_list and -gupnp_service_proxy_end_action_list. -

-
-+

gupnp_service_proxy_send_action_list ()

+
gboolean
+gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy,
+                                      const char *action,
+                                      GError **error,
+                                      GList *in_names,
+                                      GList *in_values,
+                                      GList *out_names,
+                                      GList *out_types,
+                                      GList **out_values);
+

The synchronous variant of gupnp_service_proxy_begin_action_list and +gupnp_service_proxy_end_action_list.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - - - - - + + + - - + + +

proxy :

(transfer none) : A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

in_names :

-GList of 'in' parameter -names (as strings). [element-type utf8][transfer none] -

in_names

GList of 'in' parameter +names (as strings).

[element-type utf8][transfer none]

in_values :

-GList of values (as -GValue) that line up with in_names. [element-type GValue][transfer none] -

in_values

GList of values (as +GValue) that line up with in_names +.

[element-type GValue][transfer none]

out_names :

-GList of 'out' parameter -names (as strings). [element-type utf8][transfer none] -

out_names

GList of 'out' parameter +names (as strings).

[element-type utf8][transfer none]

out_types :

-GList of types (as GType) -that line up with out_names. [element-type GType][transfer none] -

out_values :

-GList of values -(as GValue) that line up with out_names and out_types. [element-type GValue][transfer full][out] -

out_types

GList of types (as GType) +that line up with out_names +.

[element-type GType][transfer none]

Returns :

-TRUE if sending the action was succesful.

out_values

GList of values +(as GValue) that line up with out_names +and out_types +.

[element-type GValue][transfer full][out]
+
+

Returns

+

TRUE if sending the action was succesful.

+

+
+

Since 0.13.3

+
-

gupnp_service_proxy_begin_action ()

-
GUPnPServiceProxyAction * gupnp_service_proxy_begin_action
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         ...);
-

-Sends action action with parameters Varargs to the service exposed by -proxy asynchronously, calling callback on completion. From callback, call -gupnp_service_proxy_end_action() to check for errors, to retrieve return -values, and to free the GUPnPServiceProxyAction. -

-
-+

gupnp_service_proxy_begin_action ()

+
GUPnPServiceProxyAction *
+gupnp_service_proxy_begin_action (GUPnPServiceProxy *proxy,
+                                  const char *action,
+                                  GUPnPServiceProxyActionCallback callback,
+                                  gpointer user_data,
+                                  ...);
+

Sends action action + with parameters Varargs + to the service exposed by +proxy + asynchronously, calling callback + on completion. From callback +, call +gupnp_service_proxy_end_action() to check for errors, to retrieve return +values, and to free the GUPnPServiceProxyAction.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - - - - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

callback :

The callback to call when sending the action has succeeded -or failed. [scope async] -

callback

The callback to call when sending the action has succeeded +or failed.

[scope async]

user_data :

User data for callback -

user_data

User data for callback +

 

... :

tuples of in parameter name, in parameter type, and in parameter -value, terminated with NULL -

Returns :

A GUPnPServiceProxyAction handle. This will be freed when -gupnp_service_proxy_cancel_action() or -gupnp_service_proxy_end_action_valist(). [transfer none] -

...

tuples of in parameter name, in parameter type, and in parameter +value, terminated with NULL

 
+
+

Returns

+

A GUPnPServiceProxyAction handle. This will be freed when +gupnp_service_proxy_cancel_action() or +gupnp_service_proxy_end_action_valist().

+

[transfer none]

+
+
-

gupnp_service_proxy_begin_action_valist ()

-
GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         va_list var_args);
-

-See gupnp_service_proxy_begin_action(). -

-
-+

gupnp_service_proxy_begin_action_valist ()

+
GUPnPServiceProxyAction *
+gupnp_service_proxy_begin_action_valist
+                               (GUPnPServiceProxy *proxy,
+                                const char *action,
+                                GUPnPServiceProxyActionCallback callback,
+                                gpointer user_data,
+                                va_list var_args);
+

See gupnp_service_proxy_begin_action().

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - - - - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

callback :

(scope async) : The callback to call when sending the action has succeeded -or failed

callback

(scope async) : The callback to call when sending the action has succeeded +or failed

 

user_data :

User data for callback -

user_data

User data for callback +

 

var_args :

A va_list of tuples of in parameter name, in parameter type, and -in parameter value

Returns :

A GUPnPServiceProxyAction handle. This will -be freed when calling gupnp_service_proxy_cancel_action() or -gupnp_service_proxy_end_action_valist(). [transfer none] -

var_args

A va_list of tuples of in parameter name, in parameter type, and +in parameter value

 
+
+

Returns

+

A GUPnPServiceProxyAction handle. This will +be freed when calling gupnp_service_proxy_cancel_action() or +gupnp_service_proxy_end_action_valist().

+

[transfer none]

+
+
-

gupnp_service_proxy_begin_action_hash ()

-
GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_hash
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data,
-                                                         GHashTable *hash);
-

-See gupnp_service_proxy_begin_action(); this version takes a GHashTable -for runtime generated parameter lists. -

-
-+

gupnp_service_proxy_begin_action_hash ()

+
GUPnPServiceProxyAction *
+gupnp_service_proxy_begin_action_hash (GUPnPServiceProxy *proxy,
+                                       const char *action,
+                                       GUPnPServiceProxyActionCallback callback,
+                                       gpointer user_data,
+                                       GHashTable *hash);
+
+

gupnp_service_proxy_begin_action_hash has been deprecated since version 0.20.9 and should not be used in newly-written code.

+

Use gupnp_service_proxy_send_action() or +gupnp_service_proxy_send_action_list()

+
+

See gupnp_service_proxy_begin_action(); this version takes a GHashTable +for runtime generated parameter lists.

+

Do not use this function in newly written code; it cannot guarantee the +order of arguments and thus breaks interaction with many devices.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - - - - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

An action

action

An action

 

callback :

The callback to call when sending the action has succeeded -or failed. [scope async] -

callback

The callback to call when sending the action has succeeded +or failed.

[scope async]

user_data :

User data for callback -

user_data

User data for callback +

 

hash :

A GHashTable of in parameter name and GValue pairs. [element-type utf8 GValue] -

Returns :

A GUPnPServiceProxyAction handle. This will -be freed when calling gupnp_service_proxy_cancel_action() or -gupnp_service_proxy_end_action_hash(). [transfer none] -

hash

A GHashTable of in parameter name and GValue pairs.

[element-type utf8 GValue]
+
+

Returns

+

A GUPnPServiceProxyAction handle. This will +be freed when calling gupnp_service_proxy_cancel_action() or +gupnp_service_proxy_end_action_hash().

+

[transfer none]

+
+
-

gupnp_service_proxy_begin_action_list ()

-
GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_list
-                                                        (GUPnPServiceProxy *proxy,
-                                                         const char *action,
-                                                         GList *in_names,
-                                                         GList *in_values,
-                                                         GUPnPServiceProxyActionCallback callback,
-                                                         gpointer user_data);
-

-A variant of gupnp_service_proxy_begin_action that takes lists of -in-parameter names, types and values. -

-
-+

gupnp_service_proxy_begin_action_list ()

+
GUPnPServiceProxyAction *
+gupnp_service_proxy_begin_action_list (GUPnPServiceProxy *proxy,
+                                       const char *action,
+                                       GList *in_names,
+                                       GList *in_values,
+                                       GUPnPServiceProxyActionCallback callback,
+                                       gpointer user_data);
+

A variant of gupnp_service_proxy_begin_action that takes lists of +in-parameter names, types and values.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - - - - - + + +

proxy :

A GUPnPServiceProxy. [transfer none] -

proxy

A GUPnPServiceProxy.

[transfer none]

action :

An action

action

An action

 

in_names :

-GList of 'in' parameter -names (as strings). [element-type utf8][transfer none] -

in_names

GList of 'in' parameter +names (as strings).

[element-type utf8][transfer none]

in_values :

-GList of values (as -GValue) that line up with in_names. [element-type GValue][transfer none] -

in_values

GList of values (as +GValue) that line up with in_names +.

[element-type GValue][transfer none]

callback :

(scope async) : The callback to call when sending the action has succeeded or -failed

callback

(scope async) : The callback to call when sending the action has succeeded or +failed

 

user_data :

User data for callback -

Returns :

A GUPnPServiceProxyAction handle. This will -be freed when calling gupnp_service_proxy_cancel_action or -gupnp_service_proxy_end_action_list. [transfer none] -

user_data

User data for callback +

 
+
+

Returns

+

A GUPnPServiceProxyAction handle. This will +be freed when calling gupnp_service_proxy_cancel_action() or +gupnp_service_proxy_end_action_list().

+

[transfer none]

+
+

Since 0.13.3

+
-

gupnp_service_proxy_end_action ()

-
gboolean            gupnp_service_proxy_end_action      (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         ...);
-

-Retrieves the result of action. The out parameters in Varargs will be -filled in, and if an error occurred, error will be set. In case of -a UPnPError the error code will be the same in error. -

-
-+

gupnp_service_proxy_end_action ()

+
gboolean
+gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy,
+                                GUPnPServiceProxyAction *action,
+                                GError **error,
+                                ...);
+

Retrieves the result of action +. The out parameters in Varargs + will be +filled in, and if an error occurred, error + will be set. In case of +an UPnP error the error code will be the same in error +.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + - - - - +freed after use

+

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

A GUPnPServiceProxyAction handle

action

A GUPnPServiceProxyAction handle

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

... :

tuples of out parameter name, out parameter type, and out parameter +

...

tuples of out parameter name, out parameter type, and out parameter value location, terminated with NULL. The out parameter values should be -freed after use

Returns :

-TRUE on success. 
+
+

Returns

+

TRUE on success.

+

+
+
-

gupnp_service_proxy_end_action_valist ()

-
gboolean            gupnp_service_proxy_end_action_valist
-                                                        (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         va_list var_args);
-

-See gupnp_service_proxy_end_action(). -

-
-+

gupnp_service_proxy_end_action_valist ()

+
gboolean
+gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy,
+                                       GUPnPServiceProxyAction *action,
+                                       GError **error,
+                                       va_list var_args);
+

See gupnp_service_proxy_end_action().

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + - - - - +freed after use

+

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

A GUPnPServiceProxyAction handle

action

A GUPnPServiceProxyAction handle

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

var_args :

A va_list of tuples of out parameter name, out parameter type, +

var_args

A va_list of tuples of out parameter name, out parameter type, and out parameter value location. The out parameter values should be -freed after use

Returns :

-TRUE on success. 
+
+

Returns

+

TRUE on success.

+

+
+
-

gupnp_service_proxy_end_action_hash ()

-
gboolean            gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GHashTable *hash);
-

-See gupnp_service_proxy_end_action(); this version takes a GHashTable for -runtime generated parameter lists. -

-
-+

gupnp_service_proxy_end_action_hash ()

+
gboolean
+gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
+                                     GUPnPServiceProxyAction *action,
+                                     GError **error,
+                                     GHashTable *hash);
+

See gupnp_service_proxy_end_action(); this version takes a GHashTable for +runtime generated parameter lists.

+
+

Parameters

+
+++++ - - + + + - - + + + - - - - - - + + + - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

A GUPnPServiceProxyAction handle

action

A GUPnPServiceProxyAction handle

 

error :

The location where to store any error, or NULL -

hash :

A GHashTable of -out parameter name and initialised GValue pairs. [element-type utf8 GValue][inout][transfer none] -

error

The location where to store any error, or NULL

 

Returns :

-TRUE on success.

hash

A GHashTable of +out parameter name and initialised GValue pairs.

[element-type utf8 GValue][inout][transfer none]
+
+

Returns

+

TRUE on success.

+

+
+
-

gupnp_service_proxy_end_action_list ()

-
gboolean            gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GList *out_names,
-                                                         GList *out_types,
-                                                         GList **out_values);
-

-A variant of gupnp_service_proxy_end_action that takes lists of +

gupnp_service_proxy_end_action_list ()

+
gboolean
+gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
+                                     GUPnPServiceProxyAction *action,
+                                     GError **error,
+                                     GList *out_names,
+                                     GList *out_types,
+                                     GList **out_values);
+

A variant of gupnp_service_proxy_end_action that takes lists of out-parameter names, types and place-holders for values. The returned list -in out_values must be freed using g_list_free and each element in it using -g_value_unset and g_slice_free. -

-
-+in out_values + must be freed using g_list_free and each element in it using +g_value_unset and g_slice_free.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

action :

A GUPnPServiceProxyAction handle

action

A GUPnPServiceProxyAction handle

 

error :

The location where to store any error, or NULL -

error

The location where to store any error, or NULL.

[allow-none]

out_names :

-GList of 'out' parameter -names (as strings). [element-type utf8][transfer none] -

out_names

GList of 'out' parameter +names (as strings).

[element-type utf8][transfer none]

out_types :

-GList of types (as GType) -that line up with out_names. [element-type GType][transfer none] -

out_types

GList of types (as GType) +that line up with out_names +.

[element-type GType][transfer none]

out_values :

-GList of values -(as GValue) that line up with out_names and out_types. [element-type GValue][transfer full][out] -

out_values

GList of values +(as GValue) that line up with out_names +and out_types +.

[element-type GValue][transfer full][out]
+
+
+

Returns

+

TRUE on success.

+

+
+ +
+
+

gupnp_service_proxy_cancel_action ()

+
void
+gupnp_service_proxy_cancel_action (GUPnPServiceProxy *proxy,
+                                   GUPnPServiceProxyAction *action);
+

Cancels action +, freeing the action + handle.

+
+

Parameters

+
+++++ + + + + + - - + + +

proxy

A GUPnPServiceProxy

 

Returns :

-TRUE on success.

action

A GUPnPServiceProxyAction handle

 
+

-

gupnp_service_proxy_cancel_action ()

-
void                gupnp_service_proxy_cancel_action   (GUPnPServiceProxy *proxy,
-                                                         GUPnPServiceProxyAction *action);
-

-Cancels action, freeing the action handle. -

-
-+

gupnp_service_proxy_add_notify ()

+
gboolean
+gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy,
+                                const char *variable,
+                                GType type,
+                                GUPnPServiceProxyNotifyCallback callback,
+                                gpointer user_data);
+

Sets up callback + to be called whenever a change notification for +variable + is recieved.

+
+

Parameters

+
+++++ - - + + + + + + + + + + + + + - - + + + + + + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

variable

The variable to add notification for

 

type

The type of the variable

 

action :

A GUPnPServiceProxyAction handle

callback

The callback to call when variable +changes.

[scope async]

user_data

User data for callback +

 
+
+

Returns

+

TRUE on success.

+

+
+
-

gupnp_service_proxy_add_notify ()

-
gboolean            gupnp_service_proxy_add_notify      (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GType type,
-                                                         GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
-

-Sets up callback to be called whenever a change notification for -variable is recieved. -

-
-+

gupnp_service_proxy_add_notify_full ()

+
gboolean
+gupnp_service_proxy_add_notify_full (GUPnPServiceProxy *proxy,
+                                     const char *variable,
+                                     GType type,
+                                     GUPnPServiceProxyNotifyCallback callback,
+                                     gpointer user_data,
+                                     GDestroyNotify notify);
+

Sets up callback + to be called whenever a change notification for +variable + is recieved.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

variable :

The variable to add notification for

variable

The variable to add notification for

 

type :

The type of the variable

type

The type of the variable

 

callback :

The callback to call when variable changes. [scope async] -

callback

The callback to call when variable +changes.

[scope notified]

user_data :

User data for callback -

user_data

User data for callback +

 

Returns :

-TRUE on success.

notify

Function to call when the notification is removed, or NULL.

[allow-none]
+
+

Returns

+

TRUE on success.

+

+
+

Since 0.20.12

+
-

gupnp_service_proxy_remove_notify ()

-
gboolean            gupnp_service_proxy_remove_notify   (GUPnPServiceProxy *proxy,
-                                                         const char *variable,
-                                                         GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
-

-Cancels the variable change notification for callback and user_data. -

-

-This function must not be called directly or indirectly from a -GUPnPServiceProxyNotifyCallback associated with this service proxy, even -if it is for another variable. -

-
-+

gupnp_service_proxy_add_raw_notify ()

+
gboolean
+gupnp_service_proxy_add_raw_notify (GUPnPServiceProxy *proxy,
+                                    GUPnPServiceProxyNotifyCallback callback,
+                                    gpointer user_data,
+                                    GDestroyNotify notify);
+

Get a notification for anything that happens on the peer. value + in +callback + will be of type G_TYPE_POINTER and contain the pre-parsed +xmlDoc. Do NOT free or modify this document.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + + - - + + + + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

variable :

The variable to add notification for

callback

The callback to call when the peer issues any +variable notification.

[scope notified]

callback :

The callback to call when variable changes. [scope call] -

user_data

User data for callback +

 

user_data :

User data for callback -

notify

A GDestroyNotify for user_data +.

[allow-none]
+
+
+

Returns

+

TRUE on success.

+

+
+

Since 0.20.12

+ +
+
+

gupnp_service_proxy_remove_notify ()

+
gboolean
+gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy,
+                                   const char *variable,
+                                   GUPnPServiceProxyNotifyCallback callback,
+                                   gpointer user_data);
+

Cancels the variable change notification for callback + and user_data +.

+

Up to version 0.20.9 this function must not be called directlya or +indirectly from a GUPnPServiceProxyNotifyCallback associated with this +service proxy, even if it is for another variable. In later versions such +calls are allowed.

+
+

Parameters

+
+++++ + + + + + - - + + + + + + + + + + + + +

proxy

A GUPnPServiceProxy

 

Returns :

-TRUE on success.

variable

The variable to add notification for

 

callback

The callback to call when variable +changes.

[scope call]

user_data

User data for callback +

 
+
+

Returns

+

TRUE on success.

+

+
+

-

gupnp_service_proxy_set_subscribed ()

-
void                gupnp_service_proxy_set_subscribed  (GUPnPServiceProxy *proxy,
-                                                         gboolean subscribed);
-

-(Un)subscribes to this service. -

-

-Note that the relevant messages are not immediately sent but queued. -If you want to unsubcribe from this service because the application -is quitting, rely on automatic synchronised unsubscription on object -destruction instead. -

-
-+

gupnp_service_proxy_remove_raw_notify ()

+
gboolean
+gupnp_service_proxy_remove_raw_notify (GUPnPServiceProxy *proxy,
+                                       GUPnPServiceProxyNotifyCallback callback,
+                                       gpointer user_data);
+

Cancels the variable change notification for callback + and user_data +.

+

This function must not be called directly or indirectly from a +GUPnPServiceProxyNotifyCallback associated with this service proxy, even +if it is for another variable.

+
+

Parameters

+
+++++ - - + + + - - + + + + + + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

subscribed :

-TRUE to subscribe to this service

callback

The callback to call when variable +changes.

[scope call]

user_data

User data for callback +

 
+
+

Returns

+

TRUE on success.

+

+
+
-

gupnp_service_proxy_get_subscribed ()

-
gboolean            gupnp_service_proxy_get_subscribed  (GUPnPServiceProxy *proxy);
-

-Returns if we are subscribed to this service. -

-
-+

gupnp_service_proxy_set_subscribed ()

+
void
+gupnp_service_proxy_set_subscribed (GUPnPServiceProxy *proxy,
+                                    gboolean subscribed);
+

(Un)subscribes to this service.

+

Note that the relevant messages are not immediately sent but queued. +If you want to unsubcribe from this service because the application +is quitting, rely on automatic synchronised unsubscription on object +destruction instead.

+
+

Parameters

+
+++++ - - + + + - - + + +

proxy :

A GUPnPServiceProxy -

proxy

A GUPnPServiceProxy

 

Returns :

-TRUE if we are subscribed to this service, otherwise FALSE.

subscribed

TRUE to subscribe to this service

 
+
+
+

gupnp_service_proxy_get_subscribed ()

+
gboolean
+gupnp_service_proxy_get_subscribed (GUPnPServiceProxy *proxy);
+

Returns if we are subscribed to this service.

+
+

Parameters

+
+++++ + + + + + +

proxy

A GUPnPServiceProxy

 
+
+
+

Returns

+

TRUE if we are subscribed to this service, otherwise FALSE.

+

+
+
+ +
+

Types and Values

+
+

struct GUPnPServiceProxy

+
struct GUPnPServiceProxy;
+

This struct contains private data only, and should be accessed using the +functions below.

+
+
+
+

GUPnPServiceProxyAction

+
typedef struct _GUPnPServiceProxyAction GUPnPServiceProxyAction;
+

Opaque structure for holding in-progress action data.

+
+

Property Details

-

The "subscribed" property

-
  "subscribed"               gboolean              : Read / Write
-

-Whether we are subscribed to this service. -

+

The “subscribed” property

+
  “subscribed”               gboolean
+

Whether we are subscribed to this service.

+

Flags: Read / Write

Default value: FALSE

Signal Details

-

The "subscription-lost" signal

-
void                user_function                      (GUPnPServiceProxy *proxy,
-                                                        gpointer           error,
-                                                        gpointer           user_data)      : Run Last
-

-Emitted whenever the subscription to this service has been lost due -to an error condition. -

-
-+

The “subscription-lost” signal

+
void
+user_function (GUPnPServiceProxy *proxy,
+               gpointer           error,
+               gpointer           user_data)
+

Emitted whenever the subscription to this service has been lost due +to an error condition.

+
+

Parameters

+
+++++ - - + + + - - + + + - - + + +

proxy :

The GUPnPServiceProxy that received the signal

proxy

The GUPnPServiceProxy that received the signal

 

error :

A pointer to a GError describing why the subscription has -been lost. [type GError] -

error

A pointer to a GError describing why the subscription has +been lost.

[type GError]

user_data :

user data set when the signal handler was connected.

user_data

user data set when the signal handler was connected.

 
+

Flags: Run Last

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPWhiteList.html b/doc/html/GUPnPWhiteList.html index 9b9bd67..6dc023b 100644 --- a/doc/html/GUPnPWhiteList.html +++ b/doc/html/GUPnPWhiteList.html @@ -2,32 +2,28 @@ -GUPnPWhiteList - +GUPnP Reference Manual: GUPnPWhiteList + - + - + - - - - - - - - - - + + + + + + +
@@ -35,277 +31,498 @@

GUPnPWhiteList

GUPnPWhiteList — Class for network filtering.

- +
- -
-

Object Hierarchy

-
-  GObject
-   +----GUPnPWhiteList
-
-
-
-

Description

-

-GUPnPWhiteList handles network filtering. It provides API to manage a list -of entries that will be used to filter networks. -The GUPnPWhiteList could be enabled or not. If it's enabled but the entries -list is empty, it behaves as disabled. -

-
-

Details

-
-

struct GUPnPWhiteList

-
struct GUPnPWhiteList;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_white_list_add_entry ()

-
gboolean            gupnp_white_list_add_entry          (GUPnPWhiteList *white_list,
-                                                         gchar *entry);
-

-Add entry in the list of valid criteria used by white_list to -filter networks. -if entry already exists, it won't be added a second time. -

-
-+

Functions

+
++++ - - + + + + + + + + + - - + + - - + + + + + + + + + + + + + + + + + + + + + +

white_list :

A GUPnPWhiteList + +gboolean + +gupnp_white_list_add_entry () +
+void + +gupnp_white_list_add_entryv () +
+gboolean + +gupnp_white_list_check_context ()

entry :

A value used to filter network +void + +gupnp_white_list_clear () +

Returns :

-TRUE if entry is added, FALSE otherwise. +void + +gupnp_white_list_set_enabled () +
+GList * + +gupnp_white_list_get_entries () +
+gboolean + +gupnp_white_list_is_empty () +
+gboolean + +gupnp_white_list_get_enabled () +
+GUPnPWhiteList * + +gupnp_white_list_new () +
+gboolean + +gupnp_white_list_remove_entry () +
-
-
-

gupnp_white_list_check_context ()

-
gboolean            gupnp_white_list_check_context      (GUPnPWhiteList *white_list,
-                                                         GUPnPContext *context);
-

-It will check if the context is allowed or not. The white_list will check -all its entries againt GUPnPContext interface, host ip and network fields -information. This function doesn't take into account the white_list status -(enabled or not). -

-
-+
+

Properties

+
+++++ - - + + + - - - - - - + + +

white_list :

A GUPnPWhiteList -gbooleanenabledRead / Write / Construct

context :

A GUPnPContext to test.

Returns :

-TRUE if context is matching the white_list criterias, -FALSE otherwise.gpointerentriesRead / Write / Construct Only
-
-
-

gupnp_white_list_clear ()

-
void                gupnp_white_list_clear              (GUPnPWhiteList *white_list);
-

-Remove all entries from GList that compose the white list. -The list is now empty. Even if GUPnPWhiteList is enabled, it will have the -same behavior as if it was disabled. -

-
-+
+

Types and Values

+
++++ - - + +

white_list :

A GUPnPWhiteList -structGUPnPWhiteList
-
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPWhiteList
+
+
+
+

Description

+

GUPnPWhiteList handles network filtering. It provides API to manage a list +of entries that will be used to filter networks. +The GUPnPWhiteList could be enabled or not. If it's enabled but the entries +list is empty, it behaves as disabled.

+
+
+

Functions

-

gupnp_white_list_set_enabled ()

-
void                gupnp_white_list_set_enabled        (GUPnPWhiteList *white_list,
-                                                         gboolean enable);
-

-Enable or disable the GUPnPWhiteList to perform the network filtering. -

-
-+

gupnp_white_list_add_entry ()

+
gboolean
+gupnp_white_list_add_entry (GUPnPWhiteList *white_list,
+                            gchar *entry);
+

Add entry + in the list of valid criteria used by white_list + to +filter networks. +if entry + already exists, it won't be added a second time.

+
+

Parameters

+
+++++ - - + + + - - + + +

white_list :

A GUPnPWhiteList -

white_list

A GUPnPWhiteList

 

enable :

-TRUE to enable white_list, FALSE otherwise

entry

A value used to filter network

 
+
+

Returns

+

TRUE if entry +is added, FALSE otherwise.

+

+
+

Since 0.20.5

+

-

gupnp_white_list_get_entries ()

-
GList *             gupnp_white_list_get_entries        (GUPnPWhiteList *white_list);
-

-Get the GList of entries that compose the white list. Do not free -

-
-+

gupnp_white_list_add_entryv ()

+
void
+gupnp_white_list_add_entryv (GUPnPWhiteList *white_list,
+                             gchar **entries);
+

Add a list of entries to a GUPnPWhiteList. This is a helper function to +directly add a NULL-terminated array of string usually aquired from +commandline args.

+
+

Parameters

+
+++++ - - + + + - - + + +

white_list :

A GUPnPWhiteList -

white_list

A GUPnPWhiteList

 

Returns :

a GList of entries -used to filter networks, interfaces,... or NULL. -Do not modify or free the list nor its elements. [element-type utf8][transfer none] -

entries

A NULL-terminated list of strings.

[array zero-terminated=1]
+

Since 0.20.8

+

-

gupnp_white_list_is_empty ()

-
gboolean            gupnp_white_list_is_empty           (GUPnPWhiteList *white_list);
-

-Return the state of the entries list of GUPnPWhiteList -

-
-+

gupnp_white_list_check_context ()

+
gboolean
+gupnp_white_list_check_context (GUPnPWhiteList *white_list,
+                                GUPnPContext *context);
+

It will check if the context + is allowed or not. The white_list + will check +all its entries againt GUPnPContext interface, host ip and network fields +information. This function doesn't take into account the white_list + status +(enabled or not).

+
+

Parameters

+
+++++ - - + + + - - + + +

white_list :

A GUPnPWhiteList -

white_list

A GUPnPWhiteList

 

Returns :

-TRUE if white_list is empty, FALSE otherwise.

context

A GUPnPContext to test.

 
+
+

Returns

+

TRUE if context +is matching the white_list +criterias, +FALSE otherwise.

+

+
+

Since 0.20.5

+

-

gupnp_white_list_get_enabled ()

-
gboolean            gupnp_white_list_get_enabled        (GUPnPWhiteList *white_list);
-

-Return the status of the GUPnPWhiteList -

-
-+

gupnp_white_list_clear ()

+
void
+gupnp_white_list_clear (GUPnPWhiteList *white_list);
+

Remove all entries from GList that compose the white list. +The list is now empty. Even if GUPnPWhiteList is enabled, it will have the +same behavior as if it was disabled.

+
+

Parameters

+
+++++ + + + + + +

white_list

A GUPnPWhiteList

 
+
+

Since 0.20.5

+ +
+
+

gupnp_white_list_set_enabled ()

+
void
+gupnp_white_list_set_enabled (GUPnPWhiteList *white_list,
+                              gboolean enable);
+

Enable or disable the GUPnPWhiteList to perform the network filtering.

+
+

Parameters

+
+++++ - - + + + - - + + +

white_list :

A GUPnPWhiteList -

white_list

A GUPnPWhiteList

 

Returns :

-TRUE if white_list is enabled, FALSE otherwise.

enable

TRUE to enable white_list +, FALSE otherwise

 
+

Since 0.20.5

+

-

gupnp_white_list_new ()

-
GUPnPWhiteList *    gupnp_white_list_new                (void);
-

-Create a new GUPnPWhiteList. -The white list is disabled by default. -

-
-+

gupnp_white_list_get_entries ()

+
GList *
+gupnp_white_list_get_entries (GUPnPWhiteList *white_list);
+

Get the GList of entries that compose the white list. Do not free

+
+

Parameters

+
+++++ - - + + +

Returns :

A new GUPnPWhiteList object. [transfer full] -

white_list

A GUPnPWhiteList

 
+
+

Returns

+

a GList of entries +used to filter networks, interfaces,... or NULL. +Do not modify or free the list nor its elements.

+

[element-type utf8][transfer none]

+
+

Since 0.20.5

+
-

gupnp_white_list_remove_entry ()

-
gboolean            gupnp_white_list_remove_entry       (GUPnPWhiteList *white_list,
-                                                         gchar *entry);
-

-Remove entry in the list of valid criteria used by white_list to -filter networks. -

-
-+

gupnp_white_list_is_empty ()

+
gboolean
+gupnp_white_list_is_empty (GUPnPWhiteList *white_list);
+

Return the state of the entries list of GUPnPWhiteList

+
+

Parameters

+
+++++ + + + + + +

white_list

A GUPnPWhiteList

 
+
+
+

Returns

+

TRUE if white_list +is empty, FALSE otherwise.

+

+
+

Since 0.20.5

+ +
+
+

gupnp_white_list_get_enabled ()

+
gboolean
+gupnp_white_list_get_enabled (GUPnPWhiteList *white_list);
+

Return the status of the GUPnPWhiteList

+
+

Parameters

+
+++++ + + + + + +

white_list

A GUPnPWhiteList

 
+
+
+

Returns

+

TRUE if white_list +is enabled, FALSE otherwise.

+

+
+

Since 0.20.5

+
+
+
+

gupnp_white_list_new ()

+
GUPnPWhiteList *
+gupnp_white_list_new (void);
+

Create a new GUPnPWhiteList. +The white list is disabled by default.

+
+

Returns

+

A new GUPnPWhiteList object.

+

[transfer full]

+
+

Since 0.20.5

+
+
+
+

gupnp_white_list_remove_entry ()

+
gboolean
+gupnp_white_list_remove_entry (GUPnPWhiteList *white_list,
+                               gchar *entry);
+

Remove entry + in the list of valid criteria used by white_list + to +filter networks.

+
+

Parameters

+
+++++ - - + + + - - - - - - + + +

white_list :

A GUPnPWhiteList -

white_list

A GUPnPWhiteList

 

entry :

A value to remove from the filter list.

Returns :

-TRUE if entry is removed, FALSE otherwise.

entry

A value to remove from the filter list.

 
+
+

Returns

+

TRUE if entry +is removed, FALSE otherwise.

+

+
+

Since 0.20.5

+
+ +
+

Types and Values

+
+

struct GUPnPWhiteList

+
struct GUPnPWhiteList;
+

This struct contains private data only, and should be accessed using the +functions below.

+
+
+
+

Property Details

+
+

The “enabled” property

+
  “enabled”                  gboolean
+

Whether this white list is active or not.

+

Flags: Read / Write / Construct

+

Default value: FALSE

+

Since 0.20.5

+
+
+
+

The “entries” property

+
  “entries”                  gpointer
+

GList of strings that compose the white list.

+

Flags: Read / Write / Construct Only

+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/GUPnPXMLDoc.html b/doc/html/GUPnPXMLDoc.html index dc011ab..5c14088 100644 --- a/doc/html/GUPnPXMLDoc.html +++ b/doc/html/GUPnPXMLDoc.html @@ -2,32 +2,27 @@ -GUPnPXMLDoc - +GUPnP Reference Manual: GUPnPXMLDoc + - + - - - - - - - - - - + + + + + + +
@@ -35,100 +30,156 @@

GUPnPXMLDoc

GUPnPXMLDoc — GObject wrapper for xmlDoc.

- +
-
-

Synopsis

-
struct              GUPnPXMLDoc;
-GUPnPXMLDoc *       gupnp_xml_doc_new                   (xmlDoc *xml_doc);
-GUPnPXMLDoc *       gupnp_xml_doc_new_from_path         (const char *path,
-                                                         GError **error);
-
+
+

Functions

+
++++ + + + + + + + + + + +
+GUPnPXMLDoc * + +gupnp_xml_doc_new () +
+GUPnPXMLDoc * + +gupnp_xml_doc_new_from_path () +
+
+
+

Types and Values

+
++++ + + + + +
structGUPnPXMLDoc

Object Hierarchy

-
-  GObject
-   +----GUPnPXMLDoc
+
    GObject
+    ╰── GUPnPXMLDoc
 

Description

-

-GObject wrapper for xmlDoc, so that we can use refcounting and weak -references. -

+

GObject wrapper for xmlDoc, so that we can use refcounting and weak +references.

-

Details

+

Functions

-

struct GUPnPXMLDoc

-
struct GUPnPXMLDoc {
-        xmlDoc *doc;
-};
-
-

-Reference-counting wrapper for libxml's xmlDoc -

-
-+

gupnp_xml_doc_new ()

+
GUPnPXMLDoc *
+gupnp_xml_doc_new (xmlDoc *xml_doc);
+

Create a new GUPnPXMLDoc for xml_doc +.

+
+

Parameters

+
+++++ - - + + +

xmlDoc *doc;

Pointer to the document.

xml_doc

Pointer to xmlDoc to wrap under this object

 
+
+

Returns

+

A new GUPnPXMLDoc, or NULL on an error

+

+
+

Since 0.13.0

+

-

gupnp_xml_doc_new ()

-
GUPnPXMLDoc *       gupnp_xml_doc_new                   (xmlDoc *xml_doc);
-

-Create a new GUPnPXMLDoc for xml_doc. -

-
-+

gupnp_xml_doc_new_from_path ()

+
GUPnPXMLDoc *
+gupnp_xml_doc_new_from_path (const char *path,
+                             GError **error);
+

Create a new GUPnPXMLDoc for the XML document at path +.

+
+

Parameters

+
+++++ - - + + + - - + + +

xml_doc :

Pointer to xmlDoc to wrap under this object

path

Path to xml document

 

Returns :

A new GUPnPXMLDoc, or NULL on an error

error

Location to put the error into

 
-
+
+

Returns

+

A new GUPnPXMLDoc, or NULL on an error

+

+
+

Since 0.13.0

+
+
+
+

Types and Values

-

gupnp_xml_doc_new_from_path ()

-
GUPnPXMLDoc *       gupnp_xml_doc_new_from_path         (const char *path,
-                                                         GError **error);
-

-Create a new GUPnPXMLDoc for the XML document at path. -

-
-- - - - - - - - - - - - - - +

struct GUPnPXMLDoc

+
struct GUPnPXMLDoc {
+        xmlDoc *doc;
+};
+
+

Reference-counting wrapper for libxml's xmlDoc

+
+

Members

+

path :

Path to xml document

error :

Location to put the error into

Returns :

A new GUPnPXMLDoc, or NULL on an error
+++++ + + + + +

xmlDoc *doc;

Pointer to the document.

 
+ + Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/annotation-glossary.html b/doc/html/annotation-glossary.html index e128a1a..36ec0fd 100644 --- a/doc/html/annotation-glossary.html +++ b/doc/html/annotation-glossary.html @@ -2,83 +2,67 @@ -Annotation Glossary - +GUPnP Reference Manual: Annotation Glossary + - + - - - - - - - - - - + + + + + + +
-

-Annotation Glossary

-

O

-
-out
-

Parameter for returning results. Default is transfer full.

-

S

-
-scope async
-

The callback is valid until first called.

+

+Annotation Glossary

A

-
-allow-none
-

NULL is ok, both for passing and for returning.

-

I

-
-inout
-

Parameter for input and for returning results. Default is transfer full.

-

T

-
-transfer none
-

Don't free data after the code is done.

+
allow-none
+

NULL is ok, both for passing and for returning.

+
array
+

Parameter points to an array of items.

E

-
-element-type
-

Generics and defining elements of containers and arrays.

+
element-type
+

Generics and defining elements of containers and arrays.

+

I

+
inout
+

Parameter for input and for returning results. Default is transfer full.

+

O

+
out
+

Parameter for returning results. Default is transfer full.

S

-
-scope call
-

The callback is valid only during the call to the method.

+
scope async
+

The callback is valid until first called.

+
scope call
+

The callback is valid only during the call to the method.

+
scope notified
+

The callback is valid until the GDestroyNotify argument is called.

T

-
-transfer full
-

Free data after the code is done.

-
-type
-

Override the parsed C type with given type

+
transfer full
+

Free data after the code is done.

+
transfer none
+

Don't free data after the code is done.

+
type
+

Override the parsed C type with given type.

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/api-context.html b/doc/html/api-context.html new file mode 100644 index 0000000..ea896aa --- /dev/null +++ b/doc/html/api-context.html @@ -0,0 +1,38 @@ + + + + +GUPnP Reference Manual: Network context handling + + + + + + + + + + + + + + + + +
+

+Network context handling

+
+
+GUPnPContext — Context object wrapping shared networking bits. +
+
+GUPnPContextManager — Manages GUPnPContext objects. +
+
+
+ + + \ No newline at end of file diff --git a/doc/html/api-device-control.html b/doc/html/api-device-control.html index 029ded6..802e791 100644 --- a/doc/html/api-device-control.html +++ b/doc/html/api-device-control.html @@ -2,27 +2,27 @@ -Device Control - +GUPnP Reference Manual: Device Control + - + - - - - - - + + + + + +

Device Control

-
+
GUPnPControlPoint — Class for resource discovery.
@@ -36,6 +36,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/api-device-impl.html b/doc/html/api-device-impl.html index ba34c56..34d935c 100644 --- a/doc/html/api-device-impl.html +++ b/doc/html/api-device-impl.html @@ -2,27 +2,27 @@ -Device Implementation - +GUPnP Reference Manual: Device Implementation + - + - - - - - - + + + + + +

Device Implementation

-
+
GUPnPDevice — Class for device implementations.
@@ -36,6 +36,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/api-device-info.html b/doc/html/api-device-info.html index f85ec54..af02f39 100644 --- a/doc/html/api-device-info.html +++ b/doc/html/api-device-info.html @@ -2,27 +2,27 @@ -Device Information - +GUPnP Reference Manual: Device Information + - + - - - - - - + + + + + +

Device Information

-
+
GUPnPDeviceInfo — Base abstract class for querying device information.
@@ -36,6 +36,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/api-tools.html b/doc/html/api-tools.html index ab0b716..c7772d4 100644 --- a/doc/html/api-tools.html +++ b/doc/html/api-tools.html @@ -2,32 +2,32 @@ -Tools - +GUPnP Reference Manual: Tools + - + - - - - - - + + + + + +

Tools

-
+
gupnp-binding-tool — creates C convenience wrappers for UPnP services
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/api-utility.html b/doc/html/api-utility.html index 8c6af5a..b6ab543 100644 --- a/doc/html/api-utility.html +++ b/doc/html/api-utility.html @@ -2,32 +2,30 @@ -Utility Functions - +GUPnP Reference Manual: Utility Functions + - - - + + + - - - - - - + + + + + +

Utility Functions

-
+
-GUPnPContext — Context object wrapping shared networking bits. -
-
-GUPnPContextManager — Manages GUPnPContext objects. +GUPnPAcl — Object providing a simple access control list for +GUPnP.
GUPnPWhiteList — Class for network filtering. @@ -48,6 +46,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/api.html b/doc/html/api.html index 2222802..54aa52c 100644 --- a/doc/html/api.html +++ b/doc/html/api.html @@ -2,29 +2,29 @@ -Part II. Reference - +GUPnP Reference Manual: Part II. Reference + - + - - - - - - + + + + + +

Part II. Reference

Table of Contents

-
+
Device Information
@@ -61,13 +61,20 @@ GUPnPService — Class for service implementations.
-
Utility Functions
+
Network context handling
GUPnPContext — Context object wrapping shared networking bits.
-GUPnPContextManager — Manages GUPnPContext objects. +GUPnPContextManager — Manages GUPnPContext objects. +
+
+
Utility Functions
+
+
+GUPnPAcl — Object providing a simple access control list for +GUPnP.
GUPnPWhiteList — Class for network filtering. @@ -94,6 +101,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/client-tutorial.html b/doc/html/client-tutorial.html index 395ddcd..b83abe7 100644 --- a/doc/html/client-tutorial.html +++ b/doc/html/client-tutorial.html @@ -2,29 +2,29 @@ -Writing a UPnP Client - +GUPnP Reference Manual: Writing a UPnP Client + - + - - - - - - + + + + + +

Writing a UPnP Client

-Introduction

+Introduction

This chapter explains how to write an application which fetches the external IP address from an UPnP-compliant modem. To do this a @@ -41,7 +41,7 @@

-Finding Services

+Finding Services

First, we initialize GUPnP and create a control point targeting the service type. Then we connect a signal handler so that we are notified @@ -104,7 +104,7 @@ main (int argc, char **argv)

-Invoking Actions

+Invoking Actions

Now we have an application which searches for the service we specified and calls service_proxy_available_cb for each one it @@ -146,20 +146,20 @@ service_proxy_available_cb (GUPnPControlPoint *cp, g_main_loop_quit (main_loop); }

- Note that gupnp_service_proxy_send_action() blocks until the service has + Note that gupnp_service_proxy_send_action() blocks until the service has replied. If you need to make non-blocking calls then use - gupnp_service_proxy_begin_action(), which takes a callback that will be + gupnp_service_proxy_begin_action(), which takes a callback that will be called from the mainloop when the reply is received.

-Subscribing to state variable change notifications

+Subscribing to state variable change notifications

It is possible to get change notifications for the service state variables that have attribute sendEvents="yes". We'll demonstrate this by modifying service_proxy_available_cb and using - gupnp_service_proxy_add_notify() to setup a notification callback: + gupnp_service_proxy_add_notify() to setup a notification callback:

static void
 external_ip_address_changed (GUPnPServiceProxy *proxy,
@@ -189,15 +189,15 @@ service_proxy_available_cb (GUPnPControlPoint *cp,
 
 

-Generating Wrappers

+Generating Wrappers

- Using gupnp_service_proxy_send_action() and gupnp_service_proxy_add_notify () + Using gupnp_service_proxy_send_action() and gupnp_service_proxy_add_notify() can become tedious, because of the requirement to specify the types and deal with GValues. An alternative is to use gupnp-binding-tool(1), which generates wrappers that hide the boilerplate code from you. Using a wrapper generated with prefix 'ipconn' would replace - gupnp_service_proxy_send_action() with this code: + gupnp_service_proxy_send_action() with this code:

ipconn_get_external_ip_address (proxy, &ip, &error);

@@ -229,6 +229,6 @@ service_proxy_available_cb (GUPnPControlPoint *cp,

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/glossary.html b/doc/html/glossary.html index bea7da0..f615e5e 100644 --- a/doc/html/glossary.html +++ b/doc/html/glossary.html @@ -2,30 +2,31 @@ -Glossary - +GUPnP Reference Manual: Glossary + - + - - - - - - + + + + + +
-

-Glossary

+

+Glossary

-Action
-
+Action + +

An Action is a method call on a Service, which encapsulated a single piece of @@ -42,8 +43,9 @@

-Control Point
-

+Control Point + +

A Control Point is an entity on the network which communicates with other Devices and Services. In the client/server model the control @@ -53,8 +55,9 @@ UPnP network as whole is peer-to-peer.

-Device
-
+Device + +

A Device is an entity on the network which communicates using the UPnP standards. This can be a dedicated physical @@ -75,19 +78,21 @@

See Also Service.

-
DIDL-Lite
+
DIDL-Lite

See Digital Item Declaration Language - Lite.

-Digital Item Declaration Language - Lite
-

+Digital Item Declaration Language - Lite + +

An XML schema used to represent digital content metadata. Defined by the UPnP Forum.

-
SCPD
+
SCPD

See Service Control Protocol Document.

-Service
-
+Service + +

A Service is a collection of related methods (called Actions) and public variables (called @@ -102,8 +107,9 @@

See Also Action, Device, State Variable.

-Service Control Protocol Document
-
+Service Control Protocol Document + +

An XML document which defines the set of Actions and State Variables that a @@ -112,8 +118,9 @@

See Also Service, Action, State Variable.

-Simple Service Discovery Protocol
-
+Simple Service Discovery Protocol + +

UPnP device discovery protocol. Specifies how Devices advertise their Services in the network and also how @@ -122,22 +129,24 @@

See Also Device, Control Point, Service.

-
SSDP
+
SSDP

See Simple Service Discovery Protocol.

-State Variable
-

+State Variable + +

A State Variable is a public variable exposing some aspect of the service's state. State variables are typed and optionally are evented, which means that any changes will be notified. Control points are said to subscribe to a state variable to receive change notifications.

-
UDN
+
UDN

See Unique Device Name.

-Unique Device Name
-
+Unique Device Name + +

A a unique identifier which is unique for every device but never changes for each particular @@ -154,6 +163,6 @@

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/gupnp-Error-codes.html b/doc/html/gupnp-Error-codes.html index e03eb82..44c879f 100644 --- a/doc/html/gupnp-Error-codes.html +++ b/doc/html/gupnp-Error-codes.html @@ -2,30 +2,27 @@ -Error codes - +GUPnP Reference Manual: Error codes + - + - - - - - - - - - - + + + + + + +
@@ -33,264 +30,323 @@

Error codes

Error codes — Error domains and codes.

- +
-
-

Synopsis

-
#define             GUPNP_SERVER_ERROR
-enum                GUPnPServerError;
-#define             GUPNP_EVENTING_ERROR
-enum                GUPnPEventingError;
-#define             GUPNP_CONTROL_ERROR
-enum                GUPnPControlError;
-#define             GUPNP_XML_ERROR
-enum                GUPnPXMLError;
+
+

Functions

+
++++ + + + + + + + + + + + + + + + + + + +
#defineGUPNP_SERVER_ERROR
#defineGUPNP_EVENTING_ERROR
#defineGUPNP_CONTROL_ERROR
#defineGUPNP_XML_ERROR
+
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + + + + + +
enumGUPnPServerError
enumGUPnPEventingError
enumGUPnPControlError
enumGUPnPXMLError
+
+
+

Object Hierarchy

+
 

Description

-

Details

+

Functions

GUPNP_SERVER_ERROR

#define GUPNP_SERVER_ERROR (gupnp_server_error_quark ())
 
-

-The GQuark uniquely used by GUPnP's server errors. -

-
-- - - - -

Returns :

a GQuark uniquely used by GUPnP's server errors.
+

The GQuark uniquely used by GUPnP's server errors.

+
+

Returns

+

a GQuark uniquely used by GUPnP's server errors.

+

+

-

enum GUPnPServerError

-
typedef enum {
-        GUPNP_SERVER_ERROR_INTERNAL_SERVER_ERROR,
-        GUPNP_SERVER_ERROR_NOT_FOUND,
-        GUPNP_SERVER_ERROR_NOT_IMPLEMENTED,
-        GUPNP_SERVER_ERROR_INVALID_RESPONSE,
-        GUPNP_SERVER_ERROR_INVALID_URL,
-        GUPNP_SERVER_ERROR_OTHER
-} GUPnPServerError;
+

GUPNP_EVENTING_ERROR

+
#define GUPNP_EVENTING_ERROR (gupnp_eventing_error_quark ())
+
+

The GQuark uniquely used by GUPnP's eventing errors.

+
+

Returns

+

a GQuark uniquely used by GUPnP's eventing errors.

+

+
+
+
+
+

GUPNP_CONTROL_ERROR

+
#define GUPNP_CONTROL_ERROR (gupnp_control_error_quark ())
+
+

The GQuark uniquely used by GUPnP's control errors.

+
+

Returns

+

a GQuark uniquely used by GUPnP's control errors.

+

+
+
+
+
+

GUPNP_XML_ERROR

+
#define GUPNP_XML_ERROR (gupnp_xml_error_quark ())
 
-

-GError codes used for errors in the GUPNP_SERVER_ERROR domain, when there -is communication with another server. -

-
-+

The GQuark uniquely used by GUPnP XML processing errors.

+
+

Returns

+

a GQuark uniquely used by GUPnP XML processing errors.

+

+
+ + +
+

Types and Values

+
+

enum GUPnPServerError

+

GError codes used for errors in the GUPNP_SERVER_ERROR domain, when there +is communication with another server.

+
+

Members

+
+++++ - - + + - - + + - - + + - - + + - - + + - - + +

GUPNP_SERVER_ERROR_INTERNAL_SERVER_ERROR

Internal server error. +

GUPNP_SERVER_ERROR_INTERNAL_SERVER_ERROR

+

Internal server error.

 

GUPNP_SERVER_ERROR_NOT_FOUND

The resource was not found. +

GUPNP_SERVER_ERROR_NOT_FOUND

+

The resource was not found.

 

GUPNP_SERVER_ERROR_NOT_IMPLEMENTED

This method is not implemented. +

GUPNP_SERVER_ERROR_NOT_IMPLEMENTED

+

This method is not implemented.

 

GUPNP_SERVER_ERROR_INVALID_RESPONSE

Invalid response. +

GUPNP_SERVER_ERROR_INVALID_RESPONSE

+

Invalid response.

 

GUPNP_SERVER_ERROR_INVALID_URL

Invalid URL. +

GUPNP_SERVER_ERROR_INVALID_URL

+

Invalid URL.

 

GUPNP_SERVER_ERROR_OTHER

Unknown/unhandled error. +

GUPNP_SERVER_ERROR_OTHER

+

Unknown/unhandled error.

 
-
-
-

GUPNP_EVENTING_ERROR

-
#define GUPNP_EVENTING_ERROR (gupnp_eventing_error_quark ())
-
-

-The GQuark uniquely used by GUPnP's eventing errors. -

-
-- - - - -

Returns :

a GQuark uniquely used by GUPnP's eventing errors.

enum GUPnPEventingError

-
typedef enum {
-        GUPNP_EVENTING_ERROR_SUBSCRIPTION_FAILED,
-        GUPNP_EVENTING_ERROR_SUBSCRIPTION_LOST,
-        GUPNP_EVENTING_ERROR_NOTIFY_FAILED
-} GUPnPEventingError;
-
-

-GError codes used for errors in the GUPNP_EVENTING_ERROR domain, during -eventing of state variables. -

-
-+

GError codes used for errors in the GUPNP_EVENTING_ERROR domain, during +eventing of state variables.

+
+

Members

+
+++++ - - + + - - + + - - + +

GUPNP_EVENTING_ERROR_SUBSCRIPTION_FAILED

The subscription attempt failed. +

GUPNP_EVENTING_ERROR_SUBSCRIPTION_FAILED

+

The subscription attempt failed.

 

GUPNP_EVENTING_ERROR_SUBSCRIPTION_LOST

The subscription was lost. +

GUPNP_EVENTING_ERROR_SUBSCRIPTION_LOST

+

The subscription was lost.

 

GUPNP_EVENTING_ERROR_NOTIFY_FAILED

The notification failed. +

GUPNP_EVENTING_ERROR_NOTIFY_FAILED

+

The notification failed.

 
-
-
-

GUPNP_CONTROL_ERROR

-
#define GUPNP_CONTROL_ERROR (gupnp_control_error_quark ())
-
-

-The GQuark uniquely used by GUPnP's control errors. -

-
-- - - - -

Returns :

a GQuark uniquely used by GUPnP's control errors.

enum GUPnPControlError

-
typedef enum {
-        GUPNP_CONTROL_ERROR_INVALID_ACTION = 401,
-        GUPNP_CONTROL_ERROR_INVALID_ARGS   = 402,
-        GUPNP_CONTROL_ERROR_OUT_OF_SYNC    = 403,
-        GUPNP_CONTROL_ERROR_ACTION_FAILED  = 501
-} GUPnPControlError;
-
-

-GError codes used for errors in the GUPNP_CONTROL_ERROR domain, during -invocation of service actions. -

-
-+

GError codes used for errors in the GUPNP_CONTROL_ERROR domain, during +invocation of service actions.

+
+

Members

+
+++++ - - + + - - + + - - + + - - + +

GUPNP_CONTROL_ERROR_INVALID_ACTION

The action name was invalid. +

GUPNP_CONTROL_ERROR_INVALID_ACTION

+

The action name was invalid.

 

GUPNP_CONTROL_ERROR_INVALID_ARGS

The action arguments were invalid. +

GUPNP_CONTROL_ERROR_INVALID_ARGS

+

The action arguments were invalid.

 

GUPNP_CONTROL_ERROR_OUT_OF_SYNC

Out of sync (deprecated). +

GUPNP_CONTROL_ERROR_OUT_OF_SYNC

+

Out of sync (deprecated).

 

GUPNP_CONTROL_ERROR_ACTION_FAILED

The action failed. +

GUPNP_CONTROL_ERROR_ACTION_FAILED

+

The action failed.

 
-
-
-

GUPNP_XML_ERROR

-
#define GUPNP_XML_ERROR (gupnp_xml_error_quark ())
-
-

-The GQuark uniquely used by GUPnP XML processing errors. -

-
-- - - - -

Returns :

a GQuark uniquely used by GUPnP XML processing errors.

enum GUPnPXMLError

-
typedef enum {
-        GUPNP_XML_ERROR_PARSE,
-        GUPNP_XML_ERROR_NO_NODE,
-        GUPNP_XML_ERROR_EMPTY_NODE,
-        GUPNP_XML_ERROR_INVALID_ATTRIBUTE,
-        GUPNP_XML_ERROR_OTHER
-} GUPnPXMLError;
-
-

-GError codes used for errors in the GUPNP_XML_ERROR domain, during -processing of XML data. -

-
-+

GError codes used for errors in the GUPNP_XML_ERROR domain, during +processing of XML data.

+
+

Members

+
+++++ - - + + - - + + - - + + - - + + - - + +

GUPNP_XML_ERROR_PARSE

Generic XML parsing error. +

GUPNP_XML_ERROR_PARSE

+

Generic XML parsing error.

 

GUPNP_XML_ERROR_NO_NODE

A required XML node was not found. +

GUPNP_XML_ERROR_NO_NODE

+

A required XML node was not found.

 

GUPNP_XML_ERROR_EMPTY_NODE

An XML node is unexpectedly empty. +

GUPNP_XML_ERROR_EMPTY_NODE

+

An XML node is unexpectedly empty.

 

GUPNP_XML_ERROR_INVALID_ATTRIBUTE

An XML node has an unknown attribute. +

GUPNP_XML_ERROR_INVALID_ATTRIBUTE

+

An XML node has an unknown attribute.

 

GUPNP_XML_ERROR_OTHER

Unknown/unhandled XML related errors. +

GUPNP_XML_ERROR_OTHER

+

Unknown/unhandled XML related errors.

 
+
+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/gupnp-Special-UPnP-types.html b/doc/html/gupnp-Special-UPnP-types.html index 72858a9..4b95764 100644 --- a/doc/html/gupnp-Special-UPnP-types.html +++ b/doc/html/gupnp-Special-UPnP-types.html @@ -2,30 +2,27 @@ -Special UPnP types - +GUPnP Reference Manual: Special UPnP types + - + - - - - - - - - - - + + + + + + +
@@ -33,105 +30,127 @@

Special UPnP types

Special UPnP types — Extra types for use when calling UPnP actions.

- +
-
-

Synopsis

-
#define             GUPNP_TYPE_BIN_BASE64
-#define             GUPNP_TYPE_BIN_HEX
-#define             GUPNP_TYPE_DATE
-#define             GUPNP_TYPE_DATE_TIME
-#define             GUPNP_TYPE_DATE_TIME_TZ
-#define             GUPNP_TYPE_TIME
-#define             GUPNP_TYPE_TIME_TZ
-#define             GUPNP_TYPE_URI
-#define             GUPNP_TYPE_UUID
+
+

Types and Values

+
++++ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
#defineGUPNP_TYPE_BIN_BASE64
#defineGUPNP_TYPE_BIN_HEX
#defineGUPNP_TYPE_DATE
#defineGUPNP_TYPE_DATE_TIME
#defineGUPNP_TYPE_DATE_TIME_TZ
#defineGUPNP_TYPE_TIME
#defineGUPNP_TYPE_TIME_TZ
#defineGUPNP_TYPE_URI
#defineGUPNP_TYPE_UUID
+
+
+

Object Hierarchy

+
 

Description

-

-These GTypes are used to marshal to and from string data to particular UPnP -types when invoking actions on a GUPnPServiceProxy. -

+

These GTypes are used to marshal to and from string data to particular UPnP +types when invoking actions on a GUPnPServiceProxy.

+
+
+

Functions

-

Details

+

Types and Values

GUPNP_TYPE_BIN_BASE64

#define             GUPNP_TYPE_BIN_BASE64
-

-A string type containing Base-64 encoded binary data. -

+

A string type containing Base-64 encoded binary data.


GUPNP_TYPE_BIN_HEX

#define             GUPNP_TYPE_BIN_HEX
-

-A string type containing binary hexadecimal encoded binary data. -

+

A string type containing binary hexadecimal encoded binary data.


GUPNP_TYPE_DATE

#define             GUPNP_TYPE_DATE
-

-A string type representing a date in ISO 8601 format with no time or timezone. -

+

A string type representing a date in ISO 8601 format with no time or timezone.


GUPNP_TYPE_DATE_TIME

#define             GUPNP_TYPE_DATE_TIME
-

-A string type representing a date in ISO 8601 format with optional time but no timezone. -

+

A string type representing a date in ISO 8601 format with optional time but no timezone.


GUPNP_TYPE_DATE_TIME_TZ

#define             GUPNP_TYPE_DATE_TIME_TZ
-

-A string type representing a date in ISO 8601 format with optional time and timezone. -

+

A string type representing a date in ISO 8601 format with optional time and timezone.


GUPNP_TYPE_TIME

#define             GUPNP_TYPE_TIME
-

-A string type representing a time in ISO 8601 format with no date or timezone. -

+

A string type representing a time in ISO 8601 format with no date or timezone.


GUPNP_TYPE_TIME_TZ

#define             GUPNP_TYPE_TIME_TZ
-

-A string type representing a time in ISO 8601 format with optional timezone and no date. -

+

A string type representing a time in ISO 8601 format with optional timezone and no date.


GUPNP_TYPE_URI

#define             GUPNP_TYPE_URI
-

-A string type representing a Universal Resource Indentifier. -

+

A string type representing a Universal Resource Indentifier.


GUPNP_TYPE_UUID

#define             GUPNP_TYPE_UUID
-

-A Universally Unique ID represented as a hexadecimal-encoded string. -

+

A Universally Unique ID represented as a hexadecimal-encoded string.

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/gupnp-binding-tool.html b/doc/html/gupnp-binding-tool.html index 9b96911..86b348c 100644 --- a/doc/html/gupnp-binding-tool.html +++ b/doc/html/gupnp-binding-tool.html @@ -2,22 +2,22 @@ -gupnp-binding-tool - +GUPnP Reference Manual: gupnp-binding-tool + - + - - - - - - + + + + + +
@@ -26,14 +26,14 @@

gupnp-binding-tool

gupnp-binding-tool — creates C convenience wrappers for UPnP services

- +

Synopsis

gupnp-binding-tool [--prefix {PREFIX}] [--mode {client|server}] {SCPD file}

-

Description

+

Description

gupnp-binding-tool takes a SCPD file and generates convenience C functions which call the actual GUPnP functions. The client-side bindings can be seen @@ -49,7 +49,7 @@

-

Client side bindings

+

Client side bindings

As an example, this action:

@@ -138,7 +138,7 @@ igd_external_ip_address_add_notify (GUPnPServiceProxy *proxy,

-

Server side bindings

+

Server side bindings

The corresponding server bindings for the same UPnP action (DeletePortMapping) look like this: @@ -183,6 +183,6 @@ igd_external_ip_address_variable_notify (GUPnPService *service,

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/gupnp-gupnp-service-introspection.html b/doc/html/gupnp-gupnp-service-introspection.html index a623a71..ecab883 100644 --- a/doc/html/gupnp-gupnp-service-introspection.html +++ b/doc/html/gupnp-gupnp-service-introspection.html @@ -2,34 +2,28 @@ -GUPnPServiceIntrospection - +GUPnP Reference Manual: GUPnPServiceIntrospection + - + - - - - - - - - - - + + + + + + +
@@ -37,94 +31,358 @@

GUPnPServiceIntrospection

GUPnPServiceIntrospection — Service introspection class.

- +
-
-

Object Hierarchy

-
-  GObject
-   +----GUPnPServiceIntrospection
-
+

Functions

+

Properties

-
-  "scpd"                     gpointer              : Write / Construct Only
+
+++++ + + + + + +
gpointerscpdWrite / Construct Only
+
+
+

Types and Values

+ +
+
+

Object Hierarchy

+
    GObject
+    ╰── GUPnPServiceIntrospection
 

Description

-

-The GUPnPServiceIntrospection class provides methods for service +

The GUPnPServiceIntrospection class provides methods for service introspection based on information contained in its service description document (SCPD). There is no constructor provided for this class, please use -gupnp_service_info_get_introspection or -gupnp_service_info_get_introspection_async to create an -GUPnPServiceIntrospection object for a specific service. -

-

-Note that all the introspection information is retreived from the service +gupnp_service_info_get_introspection or +gupnp_service_info_get_introspection_async to create an +GUPnPServiceIntrospection object for a specific service.

+

Note that all the introspection information is retreived from the service description document (SCPD) provided by the service and hence can not be guaranteed to be complete. A UPnP service is required to provide an SCPD but unfortunately, many services either do not provide this document or the -document does not provide any or all of the introspection information. -

-

-This class exposes internals of the UPnP protocol and should not need -to be used for regular device or control point development. -

+document does not provide any or all of the introspection information.

+

This class exposes internals of the UPnP protocol and should not need +to be used for regular device or control point development.

-

Details

+

Functions

+
+

gupnp_service_introspection_list_action_names ()

+
const GList *
+gupnp_service_introspection_list_action_names
+                               (GUPnPServiceIntrospection *introspection);
+

Returns a GList of names of all the actions in this service.

+
+

Parameters

+
+++++ + + + + + +

introspection

A GUPnPServiceIntrospection

 
+
+
+

Returns

+

(transfer none) (element-type utf8) : A GList of names of all +the actions or NULL. Do not modify or free it or its contents.

+

+
+
+
+
+

gupnp_service_introspection_list_actions ()

+
const GList *
+gupnp_service_introspection_list_actions
+                               (GUPnPServiceIntrospection *introspection);
+

Returns a GList of all the actions (of type GUPnPServiceActionInfo) in +this service.

+
+

Parameters

+
+++++ + + + + + +

introspection

A GUPnPServiceIntrospection

 
+
+
+

Returns

+

A +GList of all the actions or NULL. Do not modify or free it or its +contents.

+

[element-type GUPnP.ServiceActionInfo][transfer none]

+
+
+
+
+

gupnp_service_introspection_get_action ()

+
const GUPnPServiceActionInfo *
+gupnp_service_introspection_get_action
+                               (GUPnPServiceIntrospection *introspection,
+                                const gchar *action_name);
+

Returns the action by the name action_name + in this service.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

introspection

A GUPnPServiceIntrospection

 

action_name

The name of the action to retrieve

 
+
+
+

Returns

+

the action or NULL. Do not modify or free +it.

+

[transfer none]

+
+
+
+
+

gupnp_service_introspection_list_state_variable_names ()

+
const GList *
+gupnp_service_introspection_list_state_variable_names
+                               (GUPnPServiceIntrospection *introspection);
+

Returns a GList of names of all the state variables in this service.

+
+

Parameters

+
+++++ + + + + + +

introspection

A GUPnPServiceIntrospection

 
+
+
+

Returns

+

A GList of names of all +the state variables or NULL. Do not modify or free it or its contents.

+

[element-type utf8][transfer none]

+
+
+
+
+

gupnp_service_introspection_list_state_variables ()

+
const GList *
+gupnp_service_introspection_list_state_variables
+                               (GUPnPServiceIntrospection *introspection);
+

Returns a GList of all the state variables (of type +GUPnPServiceStateVariableInfo) in this service.

+
+

Parameters

+
+++++ + + + + + +

introspection

A GUPnPServiceIntrospection

 
+
+
+

Returns

+

A GList of all the state variables or NULL. Do not modify or free it or +its contents.

+

[element-type GUPnP.ServiceStateVariableInfo][transfer none]

+
+
+
+
+

gupnp_service_introspection_get_state_variable ()

+
const GUPnPServiceStateVariableInfo *
+gupnp_service_introspection_get_state_variable
+                               (GUPnPServiceIntrospection *introspection,
+                                const gchar *variable_name);
+

Returns the state variable by the name variable_name + in this service.

+
+

Parameters

+
+++++ + + + + + + + + + + + + +

introspection

A GUPnPServiceIntrospection

 

variable_name

The name of the variable to retrieve

 
+
+
+

Returns

+

the state variable or NULL. Do not modify or +free it.

+

[transfer none]

+
+
+
+
+

Types and Values

enum GUPnPServiceActionArgDirection

-
typedef enum {
-        GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN,
-        GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT
-} GUPnPServiceActionArgDirection;
-
-

-Represents the direction of a service state variable. -

-
-+

Represents the direction of a service state variable.

+
+

Members

+
+++++ - - + + - - + +

GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN

An "in" variable, to the service. +

GUPNP_SERVICE_ACTION_ARG_DIRECTION_IN

+

An "in" variable, to the service.

 

GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT

An "out" variable, from the service. +

GUPNP_SERVICE_ACTION_ARG_DIRECTION_OUT

+

An "out" variable, from the service.

 
+

GUPnPServiceActionArgInfo

@@ -135,32 +393,41 @@ Represents the direction of a service state variable. gboolean retval; } GUPnPServiceActionArgInfo;
-

-This structure contains information about the argument of service action. -

-
-+

This structure contains information about the argument of service action.

+
+

Members

+
+++++ - - + + + - - + + + - - + + + - - + + +

char *name;

The name of the action argument.

char *name;

The name of the action argument.

 

GUPnPServiceActionArgDirection direction;

The direction of the action argument.

GUPnPServiceActionArgDirection direction;

The direction of the action argument.

 

char *related_state_variable;

The name of the state variable associated with this -argument.

char *related_state_variable;

The name of the state variable associated with this +argument.

 

gboolean retval;

Whether this argument is the return value of the action.

gboolean retval;

Whether this argument is the return value of the action.

 
+

GUPnPServiceActionInfo

@@ -169,25 +436,31 @@ argument. GList *arguments; /* list of #GUPnPServiceActionArgInfo */ } GUPnPServiceActionInfo; -

-This structure contains information about a service action. -

-
-+

This structure contains information about a service action.

+
+

Members

+
+++++ - - + + + - - + + +

char *name;

The name of the action argument.

char *name;

The name of the action argument.

 

GList *arguments;

A GList of all the arguments -(of type GUPnPServiceActionArgInfo) of this action. [type GList][element-type GUPnP.ServiceActionArgInfo] -

GList *arguments;

A GList of all the arguments +(of type GUPnPServiceActionArgInfo) of this action.

[type GList][element-type GUPnP.ServiceActionArgInfo]
+

GUPnPServiceStateVariableInfo

@@ -203,243 +476,91 @@ This structure contains information about a service action. GList *allowed_values; } GUPnPServiceStateVariableInfo; -

-This structure contains information about service state variable. -

-
-+

This structure contains information about service state variable.

+
+

Members

+
+++++ - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + + + - - + +contains a list of (char *) strings rather than GValues.

+

char *name;

The name of the state variable.

char *name;

The name of the state variable.

 

gboolean send_events;

Whether this state variable can source events.

gboolean send_events;

Whether this state variable can source events.

 

gboolean is_numeric;

Wether this state variable is a numeric type (integer and -float).

gboolean is_numeric;

Wether this state variable is a numeric type (integer and +float).

 

GType type;

The GType of this state variable.

GType type;

The GType of this state variable.

 

GValue default_value;

The default value of this state variable.

GValue default_value;

The default value of this state variable.

 

GValue minimum;

The minimum value of this state variable. Only applies to numeric -data types.

GValue minimum;

The minimum value of this state variable. Only applies to numeric +data types.

 

GValue maximum;

The maximum value of this state variable. Only applies to numeric -data types.

GValue maximum;

The maximum value of this state variable. Only applies to numeric +data types.

 

GValue step;

The step value of this state variable. Only applies to numeric -data types.

GValue step;

The step value of this state variable. Only applies to numeric +data types.

 

GList *allowed_values;

The allowed values of this state variable. Only applies to +

GList *allowed_values;

The allowed values of this state variable. Only applies to string data types. Unlike the other fields in this structure, this field -contains a list of (char *) strings rather than GValues. [element-type utf8] -

[element-type utf8]
+

struct GUPnPServiceIntrospection

struct GUPnPServiceIntrospection;
-

-This struct contains private data only, and should be accessed using the -functions below. -

-
-
-
-

gupnp_service_introspection_list_action_names ()

-
const GList *       gupnp_service_introspection_list_action_names
-                                                        (GUPnPServiceIntrospection *introspection);
-

-Returns a GList of names of all the actions in this service. -

-
-- - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

Returns :

(transfer none) (element-type utf8) : A GList of names of all -the actions or NULL. Do not modify or free it or its contents.
-
-
-
-

gupnp_service_introspection_list_actions ()

-
const GList *       gupnp_service_introspection_list_actions
-                                                        (GUPnPServiceIntrospection *introspection);
-

-Returns a GList of all the actions (of type GUPnPServiceActionInfo) in -this service. -

-
-- - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

Returns :

A -GList of all the actions or NULL. Do not modify or free it or its -contents. [element-type GUPnP.ServiceActionInfo][transfer none] -
-
-
-
-

gupnp_service_introspection_get_action ()

-
const GUPnPServiceActionInfo * gupnp_service_introspection_get_action
-                                                        (GUPnPServiceIntrospection *introspection,
-                                                         const gchar *action_name);
-

-Returns the action by the name action_name in this service. -

-
-- - - - - - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

action_name :

The name of the action to retrieve

Returns :

the action or NULL. Do not modify or free -it. [transfer none] -
-
-
-
-

gupnp_service_introspection_list_state_variable_names ()

-
const GList *       gupnp_service_introspection_list_state_variable_names
-                                                        (GUPnPServiceIntrospection *introspection);
-

-Returns a GList of names of all the state variables in this service. -

-
-- - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

Returns :

A GList of names of all -the state variables or NULL. Do not modify or free it or its contents. [element-type utf8][transfer none] -
-
-
-
-

gupnp_service_introspection_list_state_variables ()

-
const GList *       gupnp_service_introspection_list_state_variables
-                                                        (GUPnPServiceIntrospection *introspection);
-

-Returns a GList of all the state variables (of type -GUPnPServiceStateVariableInfo) in this service. -

-
-- - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

Returns :

A GList of all the state variables or NULL. Do not modify or free it or -its contents. [element-type GUPnP.ServiceStateVariableInfo][transfer none] -
-
-
-
-

gupnp_service_introspection_get_state_variable ()

-
const GUPnPServiceStateVariableInfo * gupnp_service_introspection_get_state_variable
-                                                        (GUPnPServiceIntrospection *introspection,
-                                                         const gchar *variable_name);
-

-Returns the state variable by the name variable_name in this service. -

-
-- - - - - - - - - - - - - - -

introspection :

A GUPnPServiceIntrospection -

variable_name :

The name of the variable to retrieve

Returns :

the state variable or NULL. Do not modify or -free it. [transfer none] -
+

This struct contains private data only, and should be accessed using the +functions below.

Property Details

-

The "scpd" property

-
  "scpd"                     gpointer              : Write / Construct Only
-

-The scpd of the device description file. -

+

The “scpd” property

+
  “scpd”                     gpointer
+

The scpd of the device description file.

+

Flags: Write / Construct Only

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/gupnp.devhelp2 b/doc/html/gupnp.devhelp2 index b79f7af..33df99d 100644 --- a/doc/html/gupnp.devhelp2 +++ b/doc/html/gupnp.devhelp2 @@ -23,9 +23,12 @@ - + + + + @@ -45,209 +48,226 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - + + + + + + + - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - + + + + + + + + - - - - - - + + - - - - - + + + @@ -258,25 +278,5 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/doc/html/home.png b/doc/html/home.png index fb60b552ed4965b293039b2f814a71afca95e90c..28c2e27c6177f78365ca9fc04e5a1d0f0feaa51e 100644 GIT binary patch literal 169 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`1)eUBAr*|t63ZU^|NpEGYka!G#E`bC#O&kx SInRN1GkCiCxvX-X>9fB5j>l-IX+&z`?}`|kaRPoKYh z`~LIypTGZ3G@p47sO!3?i(^Q|t+nT)!&fY+K7It<8`5*2;fuxNO3aRMvTDwK$8R_2G`Mj{ z^E<0ac3!wQQzE%;MdAv<`$uXnv9`S09_8~rhEee)yK`rlo5QUMbwDpNc)I$ztaD0e F0s!lvLUI5A diff --git a/doc/html/index.html b/doc/html/index.html index 19fb5bc..dded744 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -2,11 +2,11 @@ -GUPnP Reference Manual - +GUPnP Reference Manual: GUPnP Reference Manual + - + @@ -14,11 +14,11 @@
-

Version 0.20.5 +

Version 0.20.12

-

+

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.1 or any later @@ -41,7 +41,7 @@


-
+
I. Tutorial
Overview
@@ -86,13 +86,20 @@ GUPnPService — Class for service implementations.
-
Utility Functions
+
Network context handling
GUPnPContext — Context object wrapping shared networking bits.
-GUPnPContextManager — Manages GUPnPContext objects. +GUPnPContextManager — Manages GUPnPContext objects. +
+
+
Utility Functions
+
+
+GUPnPAcl — Object providing a simple access control list for +GUPnP.
GUPnPWhiteList — Class for network filtering. @@ -127,6 +134,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/index.sgml b/doc/html/index.sgml index 0788f18..91fed0b 100644 --- a/doc/html/index.sgml +++ b/doc/html/index.sgml @@ -1,10 +1,10 @@ - - + + + - - + @@ -31,6 +31,8 @@ + + @@ -41,12 +43,12 @@ - - + + + - - + @@ -59,6 +61,9 @@ + + + @@ -68,41 +73,43 @@ - + + + - - - - - - - - - + + + + + + + - - + + + - - + + + @@ -111,20 +118,20 @@ - + - + + - - + + + - - - + @@ -141,29 +148,36 @@ + + + + + + - - + + - + + - - + + + - - + @@ -172,21 +186,22 @@ + + - - - + + + + - - - + @@ -208,6 +223,9 @@ + + + @@ -215,13 +233,13 @@ - + + + - - - + @@ -231,23 +249,29 @@ + + + + + + - - + + + - - + @@ -255,6 +279,8 @@ + + @@ -262,13 +288,29 @@ + + + + + + + + + + + + + + - + + + - - + + @@ -277,60 +319,56 @@ + + + + + - + + - - + + + - + + - - + + + - + + + - + - - - - - - - - - - - - - - - - + + + + - - - - - - + + - + + @@ -341,12 +379,14 @@ - - - - + + + + + + diff --git a/doc/html/ix01.html b/doc/html/ix01.html index b542543..c4dd56a 100644 --- a/doc/html/ix01.html +++ b/doc/html/ix01.html @@ -2,87 +2,93 @@ -Index - +GUPnP Reference Manual: Index + - + - - - - - - + + + + + +
-

-Index

+

+Index

G

+
GUPnPAcl, GUPnPAcl +
+
GUPnPAclInterface, struct GUPnPAclInterface +
GUPnPContext, struct GUPnPContext
-
GUPnPContext:default-language, The "default-language" property +
GUPnPContext:acl, The “acl” property +
+
GUPnPContext:default-language, The “default-language” property
-
GUPnPContext:port, The "port" property +
GUPnPContext:port, The “port” property
-
GUPnPContext:server, The "server" property +
GUPnPContext:server, The “server” property
-
GUPnPContext:session, The "session" property +
GUPnPContext:session, The “session” property
-
GUPnPContext:subscription-timeout, The "subscription-timeout" property +
GUPnPContext:subscription-timeout, The “subscription-timeout” property
GUPnPContextManager, struct GUPnPContextManager
-
GUPnPContextManager::context-available, The "context-available" signal +
GUPnPContextManager::context-available, The “context-available” signal
-
GUPnPContextManager::context-unavailable, The "context-unavailable" signal +
GUPnPContextManager::context-unavailable, The “context-unavailable” signal
-
GUPnPContextManager:main-context, The "main-context" property +
GUPnPContextManager:main-context, The “main-context” property
-
GUPnPContextManager:port, The "port" property +
GUPnPContextManager:port, The “port” property
-
GUPnPContextManager:white-list, The "white-list" property +
GUPnPContextManager:white-list, The “white-list” property
GUPnPControlError, enum GUPnPControlError
GUPnPControlPoint, struct GUPnPControlPoint
-
GUPnPControlPoint::device-proxy-available, The "device-proxy-available" signal +
GUPnPControlPoint::device-proxy-available, The “device-proxy-available” signal
-
GUPnPControlPoint::device-proxy-unavailable, The "device-proxy-unavailable" signal +
GUPnPControlPoint::device-proxy-unavailable, The “device-proxy-unavailable” signal
-
GUPnPControlPoint::service-proxy-available, The "service-proxy-available" signal +
GUPnPControlPoint::service-proxy-available, The “service-proxy-available” signal
-
GUPnPControlPoint::service-proxy-unavailable, The "service-proxy-unavailable" signal +
GUPnPControlPoint::service-proxy-unavailable, The “service-proxy-unavailable” signal
-
GUPnPControlPoint:resource-factory, The "resource-factory" property +
GUPnPControlPoint:resource-factory, The “resource-factory” property
-
GUPnPDevice, struct GUPnPDevice +
GUPnPDevice, GUPnPDevice
-
GUPnPDevice:root-device, The "root-device" property +
GUPnPDevice:root-device, The “root-device” property
GUPnPDeviceInfo, struct GUPnPDeviceInfo
-
GUPnPDeviceInfo:context, The "context" property +
GUPnPDeviceInfo:context, The “context” property
-
GUPnPDeviceInfo:device-type, The "device-type" property +
GUPnPDeviceInfo:device-type, The “device-type” property
-
GUPnPDeviceInfo:document, The "document" property +
GUPnPDeviceInfo:document, The “document” property
-
GUPnPDeviceInfo:element, The "element" property +
GUPnPDeviceInfo:element, The “element” property
-
GUPnPDeviceInfo:location, The "location" property +
GUPnPDeviceInfo:location, The “location” property
-
GUPnPDeviceInfo:resource-factory, The "resource-factory" property +
GUPnPDeviceInfo:resource-factory, The “resource-factory” property
-
GUPnPDeviceInfo:udn, The "udn" property +
GUPnPDeviceInfo:udn, The “udn” property
-
GUPnPDeviceInfo:url-base, The "url-base" property +
GUPnPDeviceInfo:url-base, The “url-base” property
GUPnPDeviceProxy, struct GUPnPDeviceProxy
@@ -92,25 +98,25 @@
GUPnPRootDevice, struct GUPnPRootDevice
-
GUPnPRootDevice:available, The "available" property +
GUPnPRootDevice:available, The “available” property
-
GUPnPRootDevice:description-dir, The "description-dir" property +
GUPnPRootDevice:description-dir, The “description-dir” property
-
GUPnPRootDevice:description-doc, The "description-doc" property +
GUPnPRootDevice:description-doc, The “description-doc” property
-
GUPnPRootDevice:description-path, The "description-path" property +
GUPnPRootDevice:description-path, The “description-path” property
GUPnPServerError, enum GUPnPServerError
-
GUPnPService, struct GUPnPService +
GUPnPService, GUPnPService
-
GUPnPService::action-invoked, The "action-invoked" signal +
GUPnPService::action-invoked, The “action-invoked” signal
-
GUPnPService::notify-failed, The "notify-failed" signal +
GUPnPService::notify-failed, The “notify-failed” signal
-
GUPnPService::query-variable, The "query-variable" signal +
GUPnPService::query-variable, The “query-variable” signal
-
GUPnPService:root-device, The "root-device" property +
GUPnPService:root-device, The “root-device” property
GUPnPServiceAction, GUPnPServiceAction
@@ -122,291 +128,317 @@
GUPnPServiceInfo, struct GUPnPServiceInfo
-
GUPnPServiceInfo:context, The "context" property +
GUPnPServiceInfo:context, The “context” property
-
GUPnPServiceInfo:document, The "document" property +
GUPnPServiceInfo:document, The “document” property
-
GUPnPServiceInfo:element, The "element" property +
GUPnPServiceInfo:element, The “element” property
-
GUPnPServiceInfo:location, The "location" property +
GUPnPServiceInfo:location, The “location” property
-
GUPnPServiceInfo:service-type, The "service-type" property +
GUPnPServiceInfo:service-type, The “service-type” property
-
GUPnPServiceInfo:udn, The "udn" property +
GUPnPServiceInfo:udn, The “udn” property
-
GUPnPServiceInfo:url-base, The "url-base" property +
GUPnPServiceInfo:url-base, The “url-base” property
GUPnPServiceIntrospection, struct GUPnPServiceIntrospection
-
GUPnPServiceIntrospection:scpd, The "scpd" property +
GUPnPServiceIntrospection:scpd, The “scpd” property
-
GUPnPServiceIntrospectionCallback, GUPnPServiceIntrospectionCallback () +
GUPnPServiceIntrospectionCallback, GUPnPServiceIntrospectionCallback ()
GUPnPServiceProxy, struct GUPnPServiceProxy
-
GUPnPServiceProxy::subscription-lost, The "subscription-lost" signal +
GUPnPServiceProxy::subscription-lost, The “subscription-lost” signal
-
GUPnPServiceProxy:subscribed, The "subscribed" property +
GUPnPServiceProxy:subscribed, The “subscribed” property
GUPnPServiceProxyAction, GUPnPServiceProxyAction
-
GUPnPServiceProxyActionCallback, GUPnPServiceProxyActionCallback () +
GUPnPServiceProxyActionCallback, GUPnPServiceProxyActionCallback ()
-
GUPnPServiceProxyNotifyCallback, GUPnPServiceProxyNotifyCallback () +
GUPnPServiceProxyNotifyCallback, GUPnPServiceProxyNotifyCallback ()
GUPnPServiceStateVariableInfo, GUPnPServiceStateVariableInfo
GUPnPWhiteList, struct GUPnPWhiteList
+
GUPnPWhiteList:enabled, The “enabled” property +
+
GUPnPWhiteList:entries, The “entries” property +
GUPnPXMLDoc, struct GUPnPXMLDoc
GUPnPXMLError, enum GUPnPXMLError
-
gupnp_context_get_default_language, gupnp_context_get_default_language () +
gupnp_acl_can_sync, gupnp_acl_can_sync () +
+
gupnp_acl_is_allowed, gupnp_acl_is_allowed () +
+
gupnp_acl_is_allowed_async, gupnp_acl_is_allowed_async () +
+
gupnp_acl_is_allowed_finish, gupnp_acl_is_allowed_finish () +
+
gupnp_context_add_server_handler, gupnp_context_add_server_handler ()
-
gupnp_context_get_host_ip, gupnp_context_get_host_ip () +
gupnp_context_get_acl, gupnp_context_get_acl ()
-
gupnp_context_get_port, gupnp_context_get_port () +
gupnp_context_get_default_language, gupnp_context_get_default_language ()
-
gupnp_context_get_server, gupnp_context_get_server () +
gupnp_context_get_host_ip, gupnp_context_get_host_ip ()
-
gupnp_context_get_session, gupnp_context_get_session () +
gupnp_context_get_port, gupnp_context_get_port ()
-
gupnp_context_get_subscription_timeout, gupnp_context_get_subscription_timeout () +
gupnp_context_get_server, gupnp_context_get_server ()
-
gupnp_context_host_path, gupnp_context_host_path () +
gupnp_context_get_session, gupnp_context_get_session ()
-
gupnp_context_host_path_for_agent, gupnp_context_host_path_for_agent () +
gupnp_context_get_subscription_timeout, gupnp_context_get_subscription_timeout ()
-
gupnp_context_manager_create, gupnp_context_manager_create () +
gupnp_context_host_path, gupnp_context_host_path ()
-
gupnp_context_manager_get_port, gupnp_context_manager_get_port () +
gupnp_context_host_path_for_agent, gupnp_context_host_path_for_agent ()
-
gupnp_context_manager_get_white_list, gupnp_context_manager_get_white_list () +
gupnp_context_manager_create, gupnp_context_manager_create ()
-
gupnp_context_manager_manage_control_point, gupnp_context_manager_manage_control_point () +
gupnp_context_manager_get_port, gupnp_context_manager_get_port ()
-
gupnp_context_manager_manage_root_device, gupnp_context_manager_manage_root_device () +
gupnp_context_manager_get_white_list, gupnp_context_manager_get_white_list ()
-
gupnp_context_manager_new, gupnp_context_manager_new () +
gupnp_context_manager_manage_control_point, gupnp_context_manager_manage_control_point ()
-
gupnp_context_manager_rescan_control_points, gupnp_context_manager_rescan_control_points () +
gupnp_context_manager_manage_root_device, gupnp_context_manager_manage_root_device ()
-
gupnp_context_new, gupnp_context_new () +
gupnp_context_manager_new, gupnp_context_manager_new (), gupnp_context_manager_new ()
-
gupnp_context_set_default_language, gupnp_context_set_default_language () +
gupnp_context_manager_rescan_control_points, gupnp_context_manager_rescan_control_points ()
-
gupnp_context_set_subscription_timeout, gupnp_context_set_subscription_timeout () +
gupnp_context_new, gupnp_context_new ()
-
gupnp_context_unhost_path, gupnp_context_unhost_path () +
gupnp_context_set_acl, gupnp_context_set_acl () +
+
gupnp_context_set_default_language, gupnp_context_set_default_language () +
+
gupnp_context_set_subscription_timeout, gupnp_context_set_subscription_timeout () +
+
gupnp_context_unhost_path, gupnp_context_unhost_path ()
GUPNP_CONTROL_ERROR, GUPNP_CONTROL_ERROR
-
gupnp_control_point_get_context, gupnp_control_point_get_context () +
gupnp_control_point_get_context, gupnp_control_point_get_context ()
-
gupnp_control_point_get_resource_factory, gupnp_control_point_get_resource_factory () +
gupnp_control_point_get_resource_factory, gupnp_control_point_get_resource_factory ()
-
gupnp_control_point_list_device_proxies, gupnp_control_point_list_device_proxies () +
gupnp_control_point_list_device_proxies, gupnp_control_point_list_device_proxies ()
-
gupnp_control_point_list_service_proxies, gupnp_control_point_list_service_proxies () +
gupnp_control_point_list_service_proxies, gupnp_control_point_list_service_proxies ()
-
gupnp_control_point_new, gupnp_control_point_new () +
gupnp_control_point_new, gupnp_control_point_new ()
-
gupnp_control_point_new_full, gupnp_control_point_new_full () +
gupnp_control_point_new_full, gupnp_control_point_new_full ()
-
gupnp_device_info_get_context, gupnp_device_info_get_context () +
gupnp_device_info_get_context, gupnp_device_info_get_context ()
-
gupnp_device_info_get_description_value, gupnp_device_info_get_description_value () +
gupnp_device_info_get_description_value, gupnp_device_info_get_description_value ()
-
gupnp_device_info_get_device, gupnp_device_info_get_device () +
gupnp_device_info_get_device, gupnp_device_info_get_device ()
-
gupnp_device_info_get_device_type, gupnp_device_info_get_device_type () +
gupnp_device_info_get_device_type, gupnp_device_info_get_device_type ()
-
gupnp_device_info_get_friendly_name, gupnp_device_info_get_friendly_name () +
gupnp_device_info_get_friendly_name, gupnp_device_info_get_friendly_name ()
-
gupnp_device_info_get_icon_url, gupnp_device_info_get_icon_url () +
gupnp_device_info_get_icon_url, gupnp_device_info_get_icon_url ()
-
gupnp_device_info_get_location, gupnp_device_info_get_location () +
gupnp_device_info_get_location, gupnp_device_info_get_location ()
-
gupnp_device_info_get_manufacturer, gupnp_device_info_get_manufacturer () +
gupnp_device_info_get_manufacturer, gupnp_device_info_get_manufacturer ()
-
gupnp_device_info_get_manufacturer_url, gupnp_device_info_get_manufacturer_url () +
gupnp_device_info_get_manufacturer_url, gupnp_device_info_get_manufacturer_url ()
-
gupnp_device_info_get_model_description, gupnp_device_info_get_model_description () +
gupnp_device_info_get_model_description, gupnp_device_info_get_model_description ()
-
gupnp_device_info_get_model_name, gupnp_device_info_get_model_name () +
gupnp_device_info_get_model_name, gupnp_device_info_get_model_name ()
-
gupnp_device_info_get_model_number, gupnp_device_info_get_model_number () +
gupnp_device_info_get_model_number, gupnp_device_info_get_model_number ()
-
gupnp_device_info_get_model_url, gupnp_device_info_get_model_url () +
gupnp_device_info_get_model_url, gupnp_device_info_get_model_url ()
-
gupnp_device_info_get_presentation_url, gupnp_device_info_get_presentation_url () +
gupnp_device_info_get_presentation_url, gupnp_device_info_get_presentation_url ()
-
gupnp_device_info_get_resource_factory, gupnp_device_info_get_resource_factory () +
gupnp_device_info_get_resource_factory, gupnp_device_info_get_resource_factory ()
-
gupnp_device_info_get_serial_number, gupnp_device_info_get_serial_number () +
gupnp_device_info_get_serial_number, gupnp_device_info_get_serial_number ()
-
gupnp_device_info_get_service, gupnp_device_info_get_service () +
gupnp_device_info_get_service, gupnp_device_info_get_service ()
-
gupnp_device_info_get_udn, gupnp_device_info_get_udn () +
gupnp_device_info_get_udn, gupnp_device_info_get_udn ()
-
gupnp_device_info_get_upc, gupnp_device_info_get_upc () +
gupnp_device_info_get_upc, gupnp_device_info_get_upc ()
-
gupnp_device_info_get_url_base, gupnp_device_info_get_url_base () +
gupnp_device_info_get_url_base, gupnp_device_info_get_url_base ()
-
gupnp_device_info_list_devices, gupnp_device_info_list_devices () +
gupnp_device_info_list_devices, gupnp_device_info_list_devices ()
-
gupnp_device_info_list_device_types, gupnp_device_info_list_device_types () +
gupnp_device_info_list_device_types, gupnp_device_info_list_device_types ()
-
gupnp_device_info_list_dlna_capabilities, gupnp_device_info_list_dlna_capabilities () +
gupnp_device_info_list_dlna_capabilities, gupnp_device_info_list_dlna_capabilities ()
-
gupnp_device_info_list_dlna_device_class_identifier, gupnp_device_info_list_dlna_device_class_identifier () +
gupnp_device_info_list_dlna_device_class_identifier, gupnp_device_info_list_dlna_device_class_identifier ()
-
gupnp_device_info_list_services, gupnp_device_info_list_services () +
gupnp_device_info_list_services, gupnp_device_info_list_services ()
-
gupnp_device_info_list_service_types, gupnp_device_info_list_service_types () +
gupnp_device_info_list_service_types, gupnp_device_info_list_service_types ()
GUPNP_EVENTING_ERROR, GUPNP_EVENTING_ERROR
-
gupnp_resource_factory_get_default, gupnp_resource_factory_get_default () +
gupnp_resource_factory_get_default, gupnp_resource_factory_get_default ()
-
gupnp_resource_factory_new, gupnp_resource_factory_new () +
gupnp_resource_factory_new, gupnp_resource_factory_new ()
-
gupnp_resource_factory_register_resource_proxy_type, gupnp_resource_factory_register_resource_proxy_type () +
gupnp_resource_factory_register_resource_proxy_type, gupnp_resource_factory_register_resource_proxy_type ()
-
gupnp_resource_factory_register_resource_type, gupnp_resource_factory_register_resource_type () +
gupnp_resource_factory_register_resource_type, gupnp_resource_factory_register_resource_type ()
-
gupnp_resource_factory_unregister_resource_proxy_type, gupnp_resource_factory_unregister_resource_proxy_type () +
gupnp_resource_factory_unregister_resource_proxy_type, gupnp_resource_factory_unregister_resource_proxy_type ()
-
gupnp_resource_factory_unregister_resource_type, gupnp_resource_factory_unregister_resource_type () +
gupnp_resource_factory_unregister_resource_type, gupnp_resource_factory_unregister_resource_type ()
-
gupnp_root_device_get_available, gupnp_root_device_get_available () +
gupnp_root_device_get_available, gupnp_root_device_get_available ()
-
gupnp_root_device_get_description_dir, gupnp_root_device_get_description_dir () +
gupnp_root_device_get_description_dir, gupnp_root_device_get_description_dir ()
-
gupnp_root_device_get_description_path, gupnp_root_device_get_description_path () +
gupnp_root_device_get_description_path, gupnp_root_device_get_description_path ()
-
gupnp_root_device_get_relative_location, gupnp_root_device_get_relative_location () +
gupnp_root_device_get_relative_location, gupnp_root_device_get_relative_location ()
-
gupnp_root_device_get_ssdp_resource_group, gupnp_root_device_get_ssdp_resource_group () +
gupnp_root_device_get_ssdp_resource_group, gupnp_root_device_get_ssdp_resource_group ()
-
gupnp_root_device_new, gupnp_root_device_new () +
gupnp_root_device_new, gupnp_root_device_new ()
-
gupnp_root_device_new_full, gupnp_root_device_new_full () +
gupnp_root_device_new_full, gupnp_root_device_new_full ()
-
gupnp_root_device_set_available, gupnp_root_device_set_available () +
gupnp_root_device_set_available, gupnp_root_device_set_available ()
GUPNP_SERVER_ERROR, GUPNP_SERVER_ERROR
-
gupnp_service_action_get, gupnp_service_action_get () +
gupnp_service_action_get, gupnp_service_action_get () +
+
gupnp_service_action_get_argument_count, gupnp_service_action_get_argument_count ()
-
gupnp_service_action_get_argument_count, gupnp_service_action_get_argument_count () +
gupnp_service_action_get_gvalue, gupnp_service_action_get_gvalue ()
-
gupnp_service_action_get_gvalue, gupnp_service_action_get_gvalue () +
gupnp_service_action_get_locales, gupnp_service_action_get_locales ()
-
gupnp_service_action_get_locales, gupnp_service_action_get_locales () +
gupnp_service_action_get_message, gupnp_service_action_get_message ()
-
gupnp_service_action_get_message, gupnp_service_action_get_message () +
gupnp_service_action_get_name, gupnp_service_action_get_name ()
-
gupnp_service_action_get_name, gupnp_service_action_get_name () +
gupnp_service_action_get_valist, gupnp_service_action_get_valist ()
-
gupnp_service_action_get_valist, gupnp_service_action_get_valist () +
gupnp_service_action_get_value, gupnp_service_action_get_value ()
-
gupnp_service_action_get_value, gupnp_service_action_get_value () +
gupnp_service_action_get_values, gupnp_service_action_get_values ()
-
gupnp_service_action_get_values, gupnp_service_action_get_values () +
gupnp_service_action_return, gupnp_service_action_return ()
-
gupnp_service_action_return, gupnp_service_action_return () +
gupnp_service_action_return_error, gupnp_service_action_return_error ()
-
gupnp_service_action_return_error, gupnp_service_action_return_error () +
gupnp_service_action_set, gupnp_service_action_set ()
-
gupnp_service_action_set, gupnp_service_action_set () +
gupnp_service_action_set_valist, gupnp_service_action_set_valist ()
-
gupnp_service_action_set_valist, gupnp_service_action_set_valist () +
gupnp_service_action_set_value, gupnp_service_action_set_value ()
-
gupnp_service_action_set_value, gupnp_service_action_set_value () +
gupnp_service_action_set_values, gupnp_service_action_set_values ()
-
gupnp_service_action_set_values, gupnp_service_action_set_values () +
gupnp_service_freeze_notify, gupnp_service_freeze_notify ()
-
gupnp_service_freeze_notify, gupnp_service_freeze_notify () +
gupnp_service_info_get_context, gupnp_service_info_get_context ()
-
gupnp_service_info_get_context, gupnp_service_info_get_context () +
gupnp_service_info_get_control_url, gupnp_service_info_get_control_url ()
-
gupnp_service_info_get_control_url, gupnp_service_info_get_control_url () +
gupnp_service_info_get_event_subscription_url, gupnp_service_info_get_event_subscription_url ()
-
gupnp_service_info_get_event_subscription_url, gupnp_service_info_get_event_subscription_url () +
gupnp_service_info_get_id, gupnp_service_info_get_id ()
-
gupnp_service_info_get_id, gupnp_service_info_get_id () +
gupnp_service_info_get_introspection, gupnp_service_info_get_introspection ()
-
gupnp_service_info_get_introspection, gupnp_service_info_get_introspection () +
gupnp_service_info_get_introspection_async, gupnp_service_info_get_introspection_async ()
-
gupnp_service_info_get_introspection_async, gupnp_service_info_get_introspection_async () +
gupnp_service_info_get_introspection_async_full, gupnp_service_info_get_introspection_async_full ()
-
gupnp_service_info_get_location, gupnp_service_info_get_location () +
gupnp_service_info_get_location, gupnp_service_info_get_location ()
-
gupnp_service_info_get_scpd_url, gupnp_service_info_get_scpd_url () +
gupnp_service_info_get_scpd_url, gupnp_service_info_get_scpd_url ()
-
gupnp_service_info_get_service_type, gupnp_service_info_get_service_type () +
gupnp_service_info_get_service_type, gupnp_service_info_get_service_type ()
-
gupnp_service_info_get_udn, gupnp_service_info_get_udn () +
gupnp_service_info_get_udn, gupnp_service_info_get_udn ()
-
gupnp_service_info_get_url_base, gupnp_service_info_get_url_base () +
gupnp_service_info_get_url_base, gupnp_service_info_get_url_base ()
-
gupnp_service_introspection_get_action, gupnp_service_introspection_get_action () +
gupnp_service_introspection_get_action, gupnp_service_introspection_get_action ()
-
gupnp_service_introspection_get_state_variable, gupnp_service_introspection_get_state_variable () +
gupnp_service_introspection_get_state_variable, gupnp_service_introspection_get_state_variable ()
-
gupnp_service_introspection_list_actions, gupnp_service_introspection_list_actions () +
gupnp_service_introspection_list_actions, gupnp_service_introspection_list_actions ()
-
gupnp_service_introspection_list_action_names, gupnp_service_introspection_list_action_names () +
gupnp_service_introspection_list_action_names, gupnp_service_introspection_list_action_names ()
-
gupnp_service_introspection_list_state_variables, gupnp_service_introspection_list_state_variables () +
gupnp_service_introspection_list_state_variables, gupnp_service_introspection_list_state_variables ()
-
gupnp_service_introspection_list_state_variable_names, gupnp_service_introspection_list_state_variable_names () +
gupnp_service_introspection_list_state_variable_names, gupnp_service_introspection_list_state_variable_names ()
-
gupnp_service_notify, gupnp_service_notify () +
gupnp_service_notify, gupnp_service_notify ()
-
gupnp_service_notify_valist, gupnp_service_notify_valist () +
gupnp_service_notify_valist, gupnp_service_notify_valist ()
-
gupnp_service_notify_value, gupnp_service_notify_value () +
gupnp_service_notify_value, gupnp_service_notify_value ()
-
gupnp_service_proxy_add_notify, gupnp_service_proxy_add_notify () +
gupnp_service_proxy_add_notify, gupnp_service_proxy_add_notify ()
-
gupnp_service_proxy_begin_action, gupnp_service_proxy_begin_action () +
gupnp_service_proxy_add_notify_full, gupnp_service_proxy_add_notify_full ()
-
gupnp_service_proxy_begin_action_hash, gupnp_service_proxy_begin_action_hash () +
gupnp_service_proxy_add_raw_notify, gupnp_service_proxy_add_raw_notify ()
-
gupnp_service_proxy_begin_action_list, gupnp_service_proxy_begin_action_list () +
gupnp_service_proxy_begin_action, gupnp_service_proxy_begin_action ()
-
gupnp_service_proxy_begin_action_valist, gupnp_service_proxy_begin_action_valist () +
gupnp_service_proxy_begin_action_hash, gupnp_service_proxy_begin_action_hash ()
-
gupnp_service_proxy_cancel_action, gupnp_service_proxy_cancel_action () +
gupnp_service_proxy_begin_action_list, gupnp_service_proxy_begin_action_list ()
-
gupnp_service_proxy_end_action, gupnp_service_proxy_end_action () +
gupnp_service_proxy_begin_action_valist, gupnp_service_proxy_begin_action_valist ()
-
gupnp_service_proxy_end_action_hash, gupnp_service_proxy_end_action_hash () +
gupnp_service_proxy_cancel_action, gupnp_service_proxy_cancel_action ()
-
gupnp_service_proxy_end_action_list, gupnp_service_proxy_end_action_list () +
gupnp_service_proxy_end_action, gupnp_service_proxy_end_action ()
-
gupnp_service_proxy_end_action_valist, gupnp_service_proxy_end_action_valist () +
gupnp_service_proxy_end_action_hash, gupnp_service_proxy_end_action_hash ()
-
gupnp_service_proxy_get_subscribed, gupnp_service_proxy_get_subscribed () +
gupnp_service_proxy_end_action_list, gupnp_service_proxy_end_action_list ()
-
gupnp_service_proxy_remove_notify, gupnp_service_proxy_remove_notify () +
gupnp_service_proxy_end_action_valist, gupnp_service_proxy_end_action_valist ()
-
gupnp_service_proxy_send_action, gupnp_service_proxy_send_action () +
gupnp_service_proxy_get_subscribed, gupnp_service_proxy_get_subscribed ()
-
gupnp_service_proxy_send_action_hash, gupnp_service_proxy_send_action_hash () +
gupnp_service_proxy_remove_notify, gupnp_service_proxy_remove_notify ()
-
gupnp_service_proxy_send_action_list, gupnp_service_proxy_send_action_list () +
gupnp_service_proxy_remove_raw_notify, gupnp_service_proxy_remove_raw_notify ()
-
gupnp_service_proxy_send_action_valist, gupnp_service_proxy_send_action_valist () +
gupnp_service_proxy_send_action, gupnp_service_proxy_send_action ()
-
gupnp_service_proxy_set_subscribed, gupnp_service_proxy_set_subscribed () +
gupnp_service_proxy_send_action_hash, gupnp_service_proxy_send_action_hash ()
-
gupnp_service_signals_autoconnect, gupnp_service_signals_autoconnect () +
gupnp_service_proxy_send_action_list, gupnp_service_proxy_send_action_list ()
-
gupnp_service_thaw_notify, gupnp_service_thaw_notify () +
gupnp_service_proxy_send_action_valist, gupnp_service_proxy_send_action_valist () +
+
gupnp_service_proxy_set_subscribed, gupnp_service_proxy_set_subscribed () +
+
gupnp_service_signals_autoconnect, gupnp_service_signals_autoconnect () +
+
gupnp_service_thaw_notify, gupnp_service_thaw_notify ()
GUPNP_TYPE_BIN_BASE64, GUPNP_TYPE_BIN_BASE64
@@ -426,27 +458,29 @@
GUPNP_TYPE_UUID, GUPNP_TYPE_UUID
-
gupnp_white_list_add_entry, gupnp_white_list_add_entry () +
gupnp_white_list_add_entry, gupnp_white_list_add_entry () +
+
gupnp_white_list_add_entryv, gupnp_white_list_add_entryv ()
-
gupnp_white_list_check_context, gupnp_white_list_check_context () +
gupnp_white_list_check_context, gupnp_white_list_check_context ()
-
gupnp_white_list_clear, gupnp_white_list_clear () +
gupnp_white_list_clear, gupnp_white_list_clear ()
-
gupnp_white_list_get_enabled, gupnp_white_list_get_enabled () +
gupnp_white_list_get_enabled, gupnp_white_list_get_enabled ()
-
gupnp_white_list_get_entries, gupnp_white_list_get_entries () +
gupnp_white_list_get_entries, gupnp_white_list_get_entries ()
-
gupnp_white_list_is_empty, gupnp_white_list_is_empty () +
gupnp_white_list_is_empty, gupnp_white_list_is_empty ()
-
gupnp_white_list_new, gupnp_white_list_new () +
gupnp_white_list_new, gupnp_white_list_new ()
-
gupnp_white_list_remove_entry, gupnp_white_list_remove_entry () +
gupnp_white_list_remove_entry, gupnp_white_list_remove_entry ()
-
gupnp_white_list_set_enabled, gupnp_white_list_set_enabled () +
gupnp_white_list_set_enabled, gupnp_white_list_set_enabled ()
-
gupnp_xml_doc_new, gupnp_xml_doc_new () +
gupnp_xml_doc_new, gupnp_xml_doc_new ()
-
gupnp_xml_doc_new_from_path, gupnp_xml_doc_new_from_path () +
gupnp_xml_doc_new_from_path, gupnp_xml_doc_new_from_path ()
GUPNP_XML_ERROR, GUPNP_XML_ERROR
@@ -455,6 +489,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/left-insensitive.png b/doc/html/left-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..9b8005bf04f74b913d9c26a41ba78fa76e9e40fe GIT binary patch literal 329 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}U4T!BE0A8bYSn%)*t~i3jvYI8 z?%cU+*RH*L_wL)b@8H3MKn6q>$b~R~B#;eJ01TUjF><|CTkn!YSTu7x>?>b?vrJd?2?b!}r<6KCkq7b2NS^>|Z~{ zLNc!L5%W?tuN@1`Tt14IOw+j6GmqsQhiiNV!=iaC|5iWK_63^G;OXk;vd$@?2>`nv Br_2BV literal 0 HcmV?d00001 diff --git a/doc/html/left.png b/doc/html/left.png index 48cab276723733c79792bf270990592938a46e1f..c518641ea922e1490796318103566648d4878634 100644 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`O`a}}Ar*{Q&nxmZGD;jPysbV% zgJYF~_9SJGO)GXcTDH7knWa5}W$uz&EGN_2uD|EF|6BFn?e%uIgMZJq%HiY+`f4F8 z<7xWDZNp;Mm&a^4u9;}uog#kF=y&zOc5~xPXFFdpUusc5*k$$7?GC4ziKqDkuMNw6 mciD+IF;9I}q@?j<;Xc-S#lV%la*aUOFnGH9xvXn{z+1{HV^C3RAUx`dg(vwnTdruGcuhx4p|L{wTx5ZYPx&X4B#s`RabR uK2tDo4+%_Il(5uMF~;EeeHHIRk9osW6@K4xn;Q#s7lWs(pUXO@geCwjBg*ao diff --git a/doc/html/overview.html b/doc/html/overview.html index 1205d1b..1986201 100644 --- a/doc/html/overview.html +++ b/doc/html/overview.html @@ -2,22 +2,22 @@ -Overview - +GUPnP Reference Manual: Overview + - + - - - - - - + + + + + +

@@ -50,6 +50,6 @@

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/right-insensitive.png b/doc/html/right-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..f999f0018413541fa62fe8a0efdfd3ba3fae3281 GIT binary patch literal 233 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`8$4YcLn;`PC2A7x@2maa_~XO9 zz12%k8ZoT+D0O85`|t1XuPfYakhL!3XpCVnee!pnZFP>PS<3Bgxo;fKYA?QP#wy*ZYYZ5rCh?m*&=>g6EOp7jZ_N`&-XHu%4I;B68>G^l_kQ3$ z(We^q`PtdoI~!)1IhfY7NEC zcoY;Al$DjWwY41_99FMhy?_7y!-o$aKYslD`Sb7JzX#g+Jp2n#J%dz9kY6wZ2akY= zgp7uXg@b!U^y=;V51+q${r=xGkihYWaF0)nSGL_~4v zsy0qpoBHoRx91b)PML#uY~Cl_6iIcwxhCq(b4!hn#|+g)^Yq0S-!v7Ec$2?7@@M^iZG`mTh716h@d}lb{2iURkP+kX3j17wd>EmBX&=u zvv*uDf3%l(&U^nZl`l8v@kwm9&20<|)bsLR{F2#{Ut#yhsr;NEk9fNJxvX C=EM*H diff --git a/doc/html/schemas-device.html b/doc/html/schemas-device.html index 2f62cba..d32ccd9 100644 --- a/doc/html/schemas-device.html +++ b/doc/html/schemas-device.html @@ -2,22 +2,22 @@ -Device Description - +GUPnP Reference Manual: Device Description + - + - - - - - - + + + + + +

@@ -87,6 +87,6 @@ device = element device {

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/schemas-service.html b/doc/html/schemas-service.html index ed59761..f286d2d 100644 --- a/doc/html/schemas-service.html +++ b/doc/html/schemas-service.html @@ -2,22 +2,22 @@ -Service Description - +GUPnP Reference Manual: Service Description + - + - - - - - - + + + + + +

@@ -83,6 +83,6 @@ scpd = element scpd {

+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/schemas.html b/doc/html/schemas.html index d74aab8..ba1e5dc 100644 --- a/doc/html/schemas.html +++ b/doc/html/schemas.html @@ -2,29 +2,29 @@ -Part III. XML Schemas - +GUPnP Reference Manual: Part III. XML Schemas + - + - - - - - - + + + + + +

Part III. XML Schemas

Table of Contents

-
+
Device Description
Service Description
@@ -32,6 +32,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/server-tutorial.html b/doc/html/server-tutorial.html index f1ec040..5ef12dc 100644 --- a/doc/html/server-tutorial.html +++ b/doc/html/server-tutorial.html @@ -2,29 +2,29 @@ -Writing a UPnP Service - +GUPnP Reference Manual: Writing a UPnP Service + - + - - - - - - + + + + + +

Writing a UPnP Service

-Introduction

+Introduction

This chapter explains how to implement a UPnP service using GUPnP. For this example we will create a virtual UPnP-enabled light bulb. @@ -42,7 +42,7 @@

-Defining the Device

+Defining the Device

The first step is to write the device description file. This is a short XML document which describes the device and what @@ -118,7 +118,7 @@

-Defining Services

+Defining Services

Because we are using a standard service we can use the service description from the specification. This is the SwitchPower1 @@ -211,11 +211,11 @@

-Implementing the Device

+Implementing the Device

Before starting to implement the device, some boilerplate code is needed to initialise GUPnP. GLib types and threading needs to be initialised, - and then a GUPnP context can be created using gupnp_context_new(). + and then a GUPnP context can be created using gupnp_context_new().

GUPnPContext *context;
 /* Initialize required subsystems */
@@ -227,7 +227,7 @@ context = gupnp_context_new (NULL, NULL, 0, NULL);

Next the root device can be created. The name of the device description file can be passed as an absolute file path or a relative path to the - second parameter of gupnp_root_device_new(). The service description + second parameter of gupnp_root_device_new(). The service description files referenced in the device description are expected to be at the path given there as well.

@@ -245,58 +245,54 @@ gupnp_root_device_set_available (dev, TRUE);

-Implementing a Service

+Implementing a Service

- To implement a service we first fetch the #GUPnPService from the root - device using gupnp_device_info_get_service() (#GUPnPRootDevice is a - subclass of #GUPnPDevice, which implements #GUPnPDeviceInfo). This - returns a #GUPnPServiceInfo which again is an interface, implemented by - #GUPnPService (on the server) and #GUPnPServiceProxy (on the client). + To implement a service we first fetch the GUPnPService from the root + device using gupnp_device_info_get_service() (GUPnPRootDevice is a + subclass of GUPnPDevice, which implements GUPnPDeviceInfo). This + returns a GUPnPServiceInfo which again is an interface, implemented by + GUPnPService (on the server) and GUPnPServiceProxy (on the client).

GUPnPServiceInfo *service;
 service = gupnp_device_info_get_service
   (GUPNP_DEVICE_INFO (dev), "urn:schemas-upnp-org:service:SwitchPower:1");

- #GUPnPService handles interacting with the network itself, leaving the + GUPnPService handles interacting with the network itself, leaving the implementation of the service itself to signal handlers that we need to - connect. There are two signals: #GUPnPService::action-invoked and - #GUPnPService::query-variable. #GUPnPService::action-invoked is emitted + connect. There are two signals: “action-invoked” and + “query-variable”. “action-invoked” is emitted when a client invokes an action: the handler is passed a - #GUPnPServiceAction object that identifies which action was invoked, and - is used to return values using gupnp_service_action_set(). - #GUPnPService::query-variable is emitted for evented variables when a + GUPnPServiceAction object that identifies which action was invoked, and + is used to return values using gupnp_service_action_set(). + “query-variable” is emitted for evented variables when a control point subscribes to the service (to announce the initial value), or whenever a client queries the value of a state variable (note that this is now deprecated behaviour for UPnP control points): the handler is - passed the variable name and a #GValue which should be set to the current + passed the variable name and a GValue which should be set to the current value of the variable.

- There are two approaches that clients can take to handle these signals. - They can either connect a single handler to #GUPnPService::action-invoked - or #GUPnPService::query-variable and examine the arguments to decide what - action to take. Alternatively, handlers can be targetted at specific - actions or variables by using the signal detail - when connecting. For example, this causes - on_get_status_action to be called when the - GetStatus action is invoked: + Handlers should be targetted at specific actions or variables by using + the signal detail when connecting. For example, + this causes on_get_status_action to be called when + the GetStatus action is invoked:

static void on_get_status_action (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data);
 …
 g_signal_connect (service, "action-invoked::GetStatus", G_CALLBACK (on_get_status_action), NULL);

The implementation of action handlers is quite simple. The handler is - passed a #GUPnPServiceAction object which represents the in-progress + passed a GUPnPServiceAction object which represents the in-progress action. If required it can be queried using - gupnp_service_action_get_name() to identify the action (this isn't + gupnp_service_action_get_name() to identify the action (this isn't required if detailed signals were connected). Any in arguments can be retrieving using - gupnp_service_action_get(), and then return values can be set using - gupnp_service_action_set(). Once the action has been performed, either - gupnp_service_action_return() or gupnp_service_action_return_error() + gupnp_service_action_get(), and then return values can be set using + gupnp_service_action_set(). Once the action has been performed, either + gupnp_service_action_return() or gupnp_service_action_return_error() should be called to either return successfully or return an error code. If any evented state variables were modified during the action then a - notification should be emitted using gupnp_service_notify(). This is an + notification should be emitted using gupnp_service_notify(). This is an example implementation of GetStatus and SetTarget:

@@ -325,7 +321,7 @@ g_signal_connect (service, "action-invoked::GetStatus", G_CALLBACK (get_status_c g_signal_connect (service, "action-invoked::SetTarget", G_CALLBACK (set_target_cb), NULL);

State variable query handlers are called with the name of the variable and - a #GValue. This value should be initialized with the relevant type and + a GValue. This value should be initialized with the relevant type and then set to the current value. Again signal detail can be used to connect handlers to specific state variable callbacks.

@@ -347,14 +343,14 @@ g_signal_connect (service, "query-variable::Status", G_CALLBACK (query_status_cb

For services which have many actions and variables there is a convenience - method gupnp_service_signals_autoconnect() which will automatically + method gupnp_service_signals_autoconnect() which will automatically connect specially named handlers to signals. See the documentation for full details on how it works.

-Generating Service-specific Wrappers

+Generating Service-specific Wrappers

Using service-specific wrappers can simplify the implementation of a service. Wrappers can be generated with gupnp-binding-tool(1) @@ -418,6 +414,6 @@ switch_status_query_connect (service, query_status_cb, NULL);

+ Generated by GTK-Doc V1.20 \ No newline at end of file diff --git a/doc/html/style.css b/doc/html/style.css index d6f6c26..705a5c9 100644 --- a/doc/html/style.css +++ b/doc/html/style.css @@ -1,15 +1,23 @@ +body +{ + font-family: cantarell, sans-serif; +} .synopsis, .classsynopsis { /* tango:aluminium 1/2 */ background: #eeeeec; - border: solid 1px #d3d7cf; + background: rgba(238, 238, 236, 0.5); + border: solid 1px rgb(238, 238, 236); padding: 0.5em; } .programlisting { /* tango:sky blue 0/1 */ + /* fallback for no rgba support */ background: #e6f3ff; border: solid 1px #729fcf; + background: rgba(114, 159, 207, 0.1); + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0.5em; } .variablelist @@ -27,7 +35,6 @@ { position: relative; top: 0em ! important; - } /* this is needed so that the local anchors are displayed below the naviagtion */ div.footnote a[name], div.refnamediv a[name], div.refsect1 a[name], div.refsect2 a[name], div.index a[name], div.glossary a[name], div.sect1 a[name] @@ -46,16 +53,20 @@ */ body { - padding-top: 3.2em; - padding-bottom: 20em; + padding-top: 5em; + padding-bottom: 500px; + max-width: 60em; + } + p + { + max-width: 60em; } /* style and size the navigation bar */ table.navigation#top { position: fixed; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; + background: #e2e2e2; + border-bottom: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; @@ -65,21 +76,57 @@ } .navigation a, .navigation a:visited { - /* tango:scarlet red 3 */ - color: #a40000; + /* tango:sky blue 3 */ + color: #204a87; } .navigation a:hover { - /* tango:scarlet red 1 */ - color: #ef2929; + /* tango:sky blue 2 */ + color: #3465a4; } td.shortcuts { - /* tango:scarlet red 1 */ - color: #ef2929; + /* tango:sky blue 2 */ + color: #3465a4; font-size: 80%; white-space: nowrap; } + td.shortcuts .dim + { + color: #babdb6; + } +} +@media screen and (min-width: 60em) { + /* screen larger than 60em */ + body { margin: auto; } +} +@media screen and (max-width: 60em) { + /* screen less than 60em */ + #nav_hierarchy { display: none; } + #nav_interfaces { display: none; } + #nav_prerequisites { display: none; } + #nav_derived_interfaces { display: none; } + #nav_implementations { display: none; } + #nav_child_properties { display: none; } + #nav_style_properties { display: none; } + #nav_index { display: none; } + #nav_glossary { display: none; } + .gallery_image { display: none; } + .property_flags { display: none; } + .signal_flags { display: none; } + .parameter_annotations { display: none; } + .enum_member_annotations { display: none; } + .struct_member_annotations { display: none; } + .union_member_annotations { display: none; } + /* now that a column is hidden, optimize space */ + col.parameters_name { width: auto; } + col.parameters_description { width: auto; } + col.struct_members_name { width: auto; } + col.struct_members_description { width: auto; } + col.enum_members_name { width: auto; } + col.enum_members_description { width: auto; } + col.union_members_name { width: auto; } + col.union_members_description { width: auto; } } @media print { table.navigation { @@ -89,9 +136,8 @@ div.titlepage table.navigation { visibility: visible; display: table; - /* tango:scarlet red 0/1 */ - background: #ffe6e6; - border: solid 1px #ef2929; + background: #e2e2e2; + border: solid 1px #babdb6; margin-top: 0; margin-bottom: 0; top: 0; @@ -102,7 +148,7 @@ .navigation .title { - font-size: 200%; + font-size: 120%; } div.gallery-float @@ -132,6 +178,67 @@ a:hover color: #729fcf; } +div.informaltable table +{ + border-collapse: separate; + border-spacing: 20px 3px; + border: none; +} + +div.informaltable table td, div.informaltable table th +{ + vertical-align: top; +} + +.function_type, +.variable_type, +.property_type, +.signal_type, +.parameter_name, +.struct_member_name, +.union_member_name, +.define_keyword, +.datatype_keyword, +.typedef_keyword +{ + text-align: right; +} + +/* dim non-primary columns */ +.c_punctuation, +.function_type, +.variable_type, +.property_type, +.signal_type, +.define_keyword, +.datatype_keyword, +.typedef_keyword, +.property_flags, +.signal_flags, +.parameter_annotations, +.enum_member_annotations, +.struct_member_annotations, +.union_member_annotations +{ + color: #888a85; +} + +.function_type a, +.function_type a:visited, +.function_type a:hover, +.property_type a, +.property_type a:visited, +.property_type a:hover, +.signal_type a, +.signal_type a:visited, +.signal_type a:hover, +.signal_flags a, +.signal_flags a:visited, +.signal_flags a:hover +{ + color: #729fcf; +} + div.table table { border-collapse: collapse; @@ -154,14 +261,43 @@ div.table table th background-color: #d3d7cf; } +h4 +{ + color: #555753; +} + hr { - /* tango:aluminium 3 */ - color: #babdb6; - background: #babdb6; + /* tango:aluminium 1 */ + color: #d3d7cf; + background: #d3d7cf; border: none 0px; height: 1px; clear: both; + margin: 2.0em 0em 2.0em 0em; +} + +dl.toc dt +{ + padding-bottom: 0.25em; +} + +dl.toc > dd > dl > dt +{ + padding-top: 0.25em; + padding-bottom: 0.25em; +} + +dl.toc > dt +{ + padding-top: 1em; + padding-bottom: 0.5em; + font-weight: bold; +} + +.parameter +{ + font-style: normal; } .footer @@ -173,31 +309,70 @@ hr font-size: 80%; } +.informalfigure, +.figure +{ + margin: 1em; +} + +.informalexample, +.example +{ + margin-top: 1em; + margin-bottom: 1em; +} + .warning { /* tango:orange 0/1 */ background: #ffeed9; + background: rgba(252, 175, 62, 0.1); border-color: #ffb04f; + border-color: rgba(252, 175, 62, 0.2); } .note { /* tango:chameleon 0/0.5 */ background: #d8ffb2; + background: rgba(138, 226, 52, 0.1); border-color: #abf562; + border-color: rgba(138, 226, 52, 0.2); } -.note, .warning +div.blockquote +{ + border-color: #eeeeec; +} +.note, .warning, div.blockquote { padding: 0.5em; border-width: 1px; border-style: solid; + margin: 2em; } -.note h3, .warning h3 +.note p, .warning p { - margin-top: 0.0em + margin: 0; } -.note p, .warning p + +div.warning h3.title, +div.note h3.title { - margin-bottom: 0.0em + display: none; +} + +p + div.section +{ + margin-top: 1em; +} + +div.refnamediv, +div.refsynopsisdiv, +div.refsect1, +div.refsect2, +div.toc, +div.section +{ + margin-bottom: 1em; } /* blob links */ @@ -210,11 +385,22 @@ h2 .extralinks, h3 .extralinks font-weight: normal; } +.lineart +{ + color: #d3d7cf; + font-weight: normal; +} + .annotation { /* tango:aluminium 5 */ color: #555753; - font-size: 80%; + font-weight: normal; +} + +.structfield +{ + font-style: normal; font-weight: normal; } @@ -237,6 +423,7 @@ h2 .extralinks, h3 .extralinks .listing_frame { /* tango:sky blue 1 */ border: solid 1px #729fcf; + border: solid 1px rgba(114, 159, 207, 0.2); padding: 0px; } @@ -246,19 +433,27 @@ h2 .extralinks, h3 .extralinks padding: 0.5em; } .listing_lines { + /* this just adds visual clutter and + takes precious room from small screens */ + display: none; +} +.listing_lines { /* tango:sky blue 0.5 */ background: #a6c5e3; + background: rgba(114, 159, 207, 0.2); /* tango:aluminium 6 */ color: #2e3436; } .listing_code { /* tango:sky blue 0 */ background: #e6f3ff; + background: rgba(114, 159, 207, 0.1); } .listing_code .programlisting { /* override from previous */ border: none 0px; padding: 0px; + background: none; } .listing_lines pre, .listing_code pre { margin: 0px; diff --git a/doc/html/tutorial.html b/doc/html/tutorial.html index d07074c..6494394 100644 --- a/doc/html/tutorial.html +++ b/doc/html/tutorial.html @@ -2,29 +2,29 @@ -Part I. Tutorial - +GUPnP Reference Manual: Part I. Tutorial + - + - - - - - - + + + + + +

Part I. Tutorial

Table of Contents

-
+
Overview
Writing a UPnP Client
Writing a UPnP Service
@@ -33,6 +33,6 @@
+ Generated by GTK-Doc V1.20
\ No newline at end of file diff --git a/doc/html/up-insensitive.png b/doc/html/up-insensitive.png new file mode 100644 index 0000000000000000000000000000000000000000..bda3ce2d9f3e267599a27250af5d73c30f4047c5 GIT binary patch literal 293 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!63?wyl`GbK}LV!<*E0F&G|Npja+xG9@fB5iW zAbAiB_UzfS7Yz38+XoaxBY|9q2wV!N79xm7MyD@P1KJ^9666=mz{t)asGw-*>YJID z-_+dIy3{)EG>Eaktack`MuEB~)+_>?XC-S*XWtpgG)Un8ovxXA9=6C3fRr-OIH&#yNOK7Ibg lscqdo`>3sG_h}7RzE@9~Z``;Xn*_9g!PC{xWt~$(697*wl6n9D literal 0 HcmV?d00001 diff --git a/doc/html/up.png b/doc/html/up.png index 8eb591f3b8d09f472b1d32c003da9647394a3823..af46b2ada6174d22fd8cafaa79ea0125c5a891a7 100644 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`O`a}}Ar*|t3LI{Z#scOOS6j+= z{C6&tTRE$?@rSv<|K>;c6AYCawFUmS+?vCA^#8)7buA{+Ods7>wCSmQ%v*88eS?&Y zgJ8#eM^U{W|Nq-7`!Jn~<4AJ4s*zy)Kqlm%qrx+X=`CHdO{*+hH!v{XWBh2SAa>-b k%ZfXmE27FeE@&_?oY|@+-1|-C2GBJOp00i_>zopr0D7ZDX#fBK literal 291 zcmeAS@N?(olHy`uVBq!ia0vp^5+KaM1|%Pp+x`GjuRL8GLn>~)ovO&!Y#`Dmc%rM5 zQ$@(ou+gP}oo|CI>vraXhEtsWyWLqh`I+o4O4_JnaHZ1HsZSD%fxx - There are two approaches that clients can take to handle these signals. - They can either connect a single handler to #GUPnPService::action-invoked - or #GUPnPService::query-variable and examine the arguments to decide what - action to take. Alternatively, handlers can be targetted at specific - actions or variables by using the signal detail - when connecting. For example, this causes - on_get_status_action to be called when the - GetStatus action is invoked: + Handlers should be targetted at specific actions or variables by using + the signal detail when connecting. For example, + this causes on_get_status_action to be called when + the GetStatus action is invoked: static void on_get_status_action (GUPnPService *service, GUPnPServiceAction *action, gpointer user_data); … diff --git a/examples/Makefile.in b/examples/Makefile.in index a397ab9..812717a 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -54,7 +81,8 @@ host_triplet = @host@ target_triplet = @target@ noinst_PROGRAMS = light-server$(EXEEXT) light-client$(EXEEXT) subdir = examples -DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp README ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -75,6 +103,7 @@ light_client_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = light_client_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(light_client_LDFLAGS) $(LDFLAGS) -o $@ @@ -85,6 +114,18 @@ light_server_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la light_server_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(light_server_LDFLAGS) $(LDFLAGS) -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -97,20 +138,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(light_client_SOURCES) $(light_server_SOURCES) DIST_SOURCES = $(light_client_SOURCES) $(light_server_SOURCES) am__can_run_installinfo = \ @@ -118,6 +155,23 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -148,17 +202,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -211,6 +265,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -322,9 +377,11 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + light-client$(EXEEXT): $(light_client_OBJECTS) $(light_client_DEPENDENCIES) $(EXTRA_light_client_DEPENDENCIES) @rm -f light-client$(EXEEXT) $(AM_V_CCLD)$(light_client_LINK) $(light_client_OBJECTS) $(light_client_LDADD) $(LIBS) + light-server$(EXEEXT): $(light_server_OBJECTS) $(light_server_DEPENDENCIES) $(EXTRA_light_server_DEPENDENCIES) @rm -f light-server$(EXEEXT) $(AM_V_CCLD)$(light_server_LINK) $(light_server_OBJECTS) $(light_server_LDADD) $(LIBS) @@ -343,14 +400,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -365,26 +422,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -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) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -396,15 +442,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -413,6 +455,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -555,18 +612,19 @@ uninstall-am: .MAKE: install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libtool clean-noinstPROGRAMS ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am 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-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 +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libtool clean-noinstPROGRAMS cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am 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-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 tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/examples/light-client.c b/examples/light-client.c index 60ce266..cdb9aab 100644 --- a/examples/light-client.c +++ b/examples/light-client.c @@ -20,9 +20,21 @@ static enum { TOGGLE } mode; +static gboolean quiet; +static gint repeat_counter = 1; +static gint repeat_delay; + +static GOptionEntry entries[] = +{ + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off output", NULL }, + { "repeat-counter", 'c', 0, G_OPTION_ARG_INT, &repeat_counter, "Repeat counter", "value" }, + { "repeat-delay", 'd', 0, G_OPTION_ARG_INT, &repeat_delay, "Delay in [ms] between each iteration", "value" }, + { NULL } +}; + + static void -service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy) +send_cmd (GUPnPServiceProxy *proxy) { GError *error = NULL; gboolean target; @@ -51,12 +63,16 @@ service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, NULL)) { goto error; } else { - g_print ("Set switch to %s.\n", target ? "on" : "off"); + if (!quiet) { + g_print ("Set switch to %s.\n", target ? "on" : "off"); + } } done: /* Only manipulate the first light switch that is found */ - g_main_loop_quit (main_loop); + if (--repeat_counter <= 0) { + g_main_loop_quit (main_loop); + } return; error: @@ -65,15 +81,41 @@ service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, goto done; } +static gboolean timeout_func (gpointer user_data) +{ + GUPnPServiceProxy *proxy = (GUPnPServiceProxy *) user_data; + + send_cmd (proxy); + return TRUE; +} + static void -usage (void) +service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy) { - g_printerr ("$ light-client [on|off|toggle]\n"); + if (repeat_counter>0) + { + send_cmd (proxy); + g_timeout_add (repeat_delay, timeout_func, proxy); + } else { + g_main_loop_quit (main_loop); + } +} + +static void +usage (GOptionContext *optionContext) +{ + gchar *help_text; + + help_text = g_option_context_get_help (optionContext, TRUE, NULL); + g_printerr ("%s", help_text); + g_free (help_text); } int main (int argc, char **argv) { + GOptionContext *optionContext; GError *error = NULL; GUPnPContext *context; GUPnPControlPoint *cp; @@ -82,10 +124,17 @@ main (int argc, char **argv) g_type_init (); #endif + optionContext = g_option_context_new ("[on|off|toggle]"); + g_option_context_add_main_entries (optionContext, entries, NULL); + if (!g_option_context_parse (optionContext, &argc, &argv, &error)) + { + g_print ("option parsing failed: %s\n", error->message); + exit (1); + } /* Check and parse command line arguments */ if (argc != 2) { - usage (); + usage (optionContext); return EXIT_FAILURE; } @@ -96,7 +145,7 @@ main (int argc, char **argv) } else if (g_str_equal (argv[1], "toggle")) { mode = TOGGLE; } else { - usage (); + usage (optionContext); return EXIT_FAILURE; } diff --git a/examples/light-server.c b/examples/light-server.c index 2dcddf3..f1b7162 100644 --- a/examples/light-server.c +++ b/examples/light-server.c @@ -14,6 +14,13 @@ #include static gboolean status; +static gboolean quiet; + +static GOptionEntry entries[] = +{ + { "quiet", 'q', 0, G_OPTION_ARG_NONE, &quiet, "Turn off output", NULL }, + { NULL } +}; G_BEGIN_DECLS G_MODULE_EXPORT void set_target_cb (GUPnPService *service, @@ -55,7 +62,10 @@ set_target_cb (GUPnPService *service, "Status", G_TYPE_BOOLEAN, status, NULL); - g_print ("The light is now %s.\n", status ? "on" : "off"); + if (!quiet) + { + g_print ("The light is now %s.\n", status ? "on" : "off"); + } } /* Return success to the client */ @@ -116,6 +126,7 @@ query_status_cb (G_GNUC_UNUSED GUPnPService *service, int main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) { + GOptionContext *optionContext; GMainLoop *main_loop; GError *error = NULL; GUPnPContext *context; @@ -126,9 +137,20 @@ main (G_GNUC_UNUSED int argc, G_GNUC_UNUSED char **argv) g_type_init (); #endif + optionContext = g_option_context_new (NULL); + g_option_context_add_main_entries (optionContext, entries, NULL); + if (!g_option_context_parse (optionContext, &argc, &argv, &error)) + { + g_print ("option parsing failed: %s\n", error->message); + exit (1); + } + /* By default the light is off */ status = FALSE; - g_print ("The light is now %s.\n", status ? "on" : "off"); + if (!quiet) + { + g_print ("The light is now %s.\n", status ? "on" : "off"); + } /* Create the UPnP context */ context = gupnp_context_new (NULL, NULL, 0, &error); diff --git a/gtk-doc.make b/gtk-doc.make index 9841de4..e791656 100644 --- a/gtk-doc.make +++ b/gtk-doc.make @@ -49,9 +49,13 @@ REPORT_FILES = \ $(DOC_MODULE)-undeclared.txt \ $(DOC_MODULE)-unused.txt -CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) +gtkdoc-check.test: Makefile + $(AM_V_GEN)echo "#!/bin/sh -e" > $@; \ + echo "$(GTKDOC_CHECK_PATH) || exit 1" >> $@; \ + chmod +x $@ + +CLEANFILES = $(SCANOBJ_FILES) $(REPORT_FILES) $(DOC_STAMPS) gtkdoc-check.test -if ENABLE_GTK_DOC if GTK_DOC_BUILD_HTML HTML_BUILD_STAMP=html-build.stamp else @@ -63,9 +67,11 @@ else PDF_BUILD_STAMP= endif -all-local: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) -else -all-local: +all-gtk-doc: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) +.PHONY: all-gtk-doc + +if ENABLE_GTK_DOC +all-local: all-gtk-doc endif docs: $(HTML_BUILD_STAMP) $(PDF_BUILD_STAMP) @@ -74,31 +80,42 @@ $(REPORT_FILES): sgml-build.stamp #### setup #### +GTK_DOC_V_SETUP=$(GTK_DOC_V_SETUP_$(V)) +GTK_DOC_V_SETUP_=$(GTK_DOC_V_SETUP_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SETUP_0=@echo " DOC Preparing build"; + setup-build.stamp: - -@if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ - echo ' DOC Preparing build'; \ + -$(GTK_DOC_V_SETUP)if test "$(abs_srcdir)" != "$(abs_builddir)" ; then \ files=`echo $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types`; \ if test "x$$files" != "x" ; then \ for file in $$files ; do \ + destdir=`dirname $(abs_builddir)/$$file`; \ + test -d "$$destdir" || mkdir -p "$$destdir"; \ test -f $(abs_srcdir)/$$file && \ - cp -pu $(abs_srcdir)/$$file $(abs_builddir)/ || true; \ + cp -pf $(abs_srcdir)/$$file $(abs_builddir)/$$file || true; \ done; \ fi; \ fi - @touch setup-build.stamp + $(AM_V_at)touch setup-build.stamp #### scan #### -scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) - @echo ' DOC Scanning header files' - @_source_dir='' ; \ +GTK_DOC_V_SCAN=$(GTK_DOC_V_SCAN_$(V)) +GTK_DOC_V_SCAN_=$(GTK_DOC_V_SCAN_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_SCAN_0=@echo " DOC Scanning header files"; + +GTK_DOC_V_INTROSPECT=$(GTK_DOC_V_INTROSPECT_$(V)) +GTK_DOC_V_INTROSPECT_=$(GTK_DOC_V_INTROSPECT_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_INTROSPECT_0=@echo " DOC Introspecting gobjects"; + +scan-build.stamp: setup-build.stamp $(HFILE_GLOB) $(CFILE_GLOB) + $(GTK_DOC_V_SCAN)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-scan --module=$(DOC_MODULE) --ignore-headers="$(IGNORE_HFILES)" $${_source_dir} $(SCAN_OPTIONS) $(EXTRA_HFILES) - @if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ - echo " DOC Introspecting gobjects"; \ + $(GTK_DOC_V_INTROSPECT)if grep -l '^..*$$' $(DOC_MODULE).types > /dev/null 2>&1 ; then \ scanobj_options=""; \ gtkdoc-scangobj 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ @@ -113,32 +130,41 @@ scan-build.stamp: $(HFILE_GLOB) $(CFILE_GLOB) test -f $$i || touch $$i ; \ done \ fi - @touch scan-build.stamp + $(AM_V_at)touch scan-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt: scan-build.stamp @true #### xml #### +GTK_DOC_V_XML=$(GTK_DOC_V_XML_$(V)) +GTK_DOC_V_XML_=$(GTK_DOC_V_XML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XML_0=@echo " DOC Building XML"; + sgml-build.stamp: setup-build.stamp $(DOC_MODULE)-decl.txt $(SCANOBJ_FILES) $(DOC_MODULE)-sections.txt $(DOC_MODULE)-overrides.txt $(expand_content_files) - @echo ' DOC Building XML' - @_source_dir='' ; \ + $(GTK_DOC_V_XML)_source_dir='' ; \ for i in $(DOC_SOURCE_DIR) ; do \ _source_dir="$${_source_dir} --source-dir=$$i" ; \ done ; \ gtkdoc-mkdb --module=$(DOC_MODULE) --output-format=xml --expand-content-files="$(expand_content_files)" --main-sgml-file=$(DOC_MAIN_SGML_FILE) $${_source_dir} $(MKDB_OPTIONS) - @touch sgml-build.stamp + $(AM_V_at)touch sgml-build.stamp sgml.stamp: sgml-build.stamp @true #### html #### +GTK_DOC_V_HTML=$(GTK_DOC_V_HTML_$(V)) +GTK_DOC_V_HTML_=$(GTK_DOC_V_HTML_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_HTML_0=@echo " DOC Building HTML"; + +GTK_DOC_V_XREF=$(GTK_DOC_V_XREF_$(V)) +GTK_DOC_V_XREF_=$(GTK_DOC_V_XREF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_XREF_0=@echo " DOC Fixing cross-references"; + html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building HTML' - @rm -rf html - @mkdir html - @mkhtml_options=""; \ + $(GTK_DOC_V_HTML)rm -rf html && mkdir html && \ + mkhtml_options=""; \ gtkdoc-mkhtml 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ @@ -159,16 +185,18 @@ html-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) cp $(abs_builddir)/$$file $(abs_builddir)/html; \ fi; \ done; - @echo ' DOC Fixing cross-references' - @gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) - @touch html-build.stamp + $(GTK_DOC_V_XREF)gtkdoc-fixxref --module=$(DOC_MODULE) --module-dir=html --html-dir=$(HTML_DIR) $(FIXXREF_OPTIONS) + $(AM_V_at)touch html-build.stamp #### pdf #### +GTK_DOC_V_PDF=$(GTK_DOC_V_PDF_$(V)) +GTK_DOC_V_PDF_=$(GTK_DOC_V_PDF_$(AM_DEFAULT_VERBOSITY)) +GTK_DOC_V_PDF_0=@echo " DOC Building PDF"; + pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) - @echo ' DOC Building PDF' - @rm -f $(DOC_MODULE).pdf - @mkpdf_options=""; \ + $(GTK_DOC_V_PDF)rm -f $(DOC_MODULE).pdf && \ + mkpdf_options=""; \ gtkdoc-mkpdf 2>&1 --help | grep >/dev/null "\-\-verbose"; \ if test "$(?)" = "0"; then \ if test "x$(V)" = "x1"; then \ @@ -185,13 +213,16 @@ pdf-build.stamp: sgml.stamp $(DOC_MAIN_SGML_FILE) $(content_files) done; \ fi; \ gtkdoc-mkpdf --path="$(abs_srcdir)" $$mkpdf_options $(DOC_MODULE) $(DOC_MAIN_SGML_FILE) $(MKPDF_OPTIONS) - @touch pdf-build.stamp + $(AM_V_at)touch pdf-build.stamp ############## clean-local: @rm -f *~ *.bak @rm -rf .libs + @if echo $(SCAN_OPTIONS) | grep -q "\-\-rebuild-types" ; then \ + rm -f $(DOC_MODULE).types; \ + fi distclean-local: @rm -rf xml html $(REPORT_FILES) $(DOC_MODULE).pdf \ @@ -200,7 +231,7 @@ distclean-local: rm -f $(SETUP_FILES) $(expand_content_files) $(DOC_MODULE).types; \ fi -maintainer-clean-local: clean +maintainer-clean-local: @rm -rf xml html install-data-local: @@ -236,15 +267,17 @@ uninstall-local: # # Require gtk-doc when making dist # -if ENABLE_GTK_DOC -dist-check-gtkdoc: +if HAVE_GTK_DOC +dist-check-gtkdoc: docs else dist-check-gtkdoc: - @echo "*** gtk-doc must be installed and enabled in order to make dist" + @echo "*** gtk-doc is needed to run 'make dist'. ***" + @echo "*** gtk-doc was not found when 'configure' ran. ***" + @echo "*** please install gtk-doc and rerun 'configure'. ***" @false endif -dist-hook: dist-check-gtkdoc dist-hook-local +dist-hook: dist-check-gtkdoc all-gtk-doc dist-hook-local @mkdir $(distdir)/html @cp ./html/* $(distdir)/html @-cp ./$(DOC_MODULE).pdf $(distdir)/ diff --git a/gupnp-1.0-uninstalled.pc.in b/gupnp-1.0-uninstalled.pc.in index 40e75ca..c44a201 100644 --- a/gupnp-1.0-uninstalled.pc.in +++ b/gupnp-1.0-uninstalled.pc.in @@ -8,4 +8,4 @@ Description: GObject-based UPnP library Version: @VERSION@ Libs: ${libdir}/libgupnp-1.0.la Cflags: -I${includedir} -Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 +Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 @UUID_LIBS@ diff --git a/gupnp-1.0.pc.in b/gupnp-1.0.pc.in index d2612b4..51e0128 100644 --- a/gupnp-1.0.pc.in +++ b/gupnp-1.0.pc.in @@ -8,4 +8,4 @@ Description: GObject-based UPnP library Version: @VERSION@ Libs: -L${libdir} -lgupnp-1.0 Cflags: -I${includedir}/gupnp-1.0 -Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 +Requires.private: gssdp-1.0 libxml-2.0 libsoup-2.4 @UUID_LIBS@ diff --git a/libgupnp/Makefile.am b/libgupnp/Makefile.am index 6d30acb..771434d 100644 --- a/libgupnp/Makefile.am +++ b/libgupnp/Makefile.am @@ -7,8 +7,12 @@ CONTEXT_MANAGER_CFLAGS = CONTEXT_MANAGER_LIBS = -lws2_32 -liphlpapi WIN32_LDFLAGS = -no-undefined else +if HAVE_IFADDRS_H CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ gupnp-unix-context-manager.h +else +CONTEXT_MANAGER_IMPL = +endif if USE_NETWORK_MANAGER CONTEXT_MANAGER_IMPL += gupnp-network-manager.c \ gupnp-network-manager.h @@ -44,7 +48,8 @@ libgupnpincdir = $(includedir)/gupnp-1.0/libgupnp lib_LTLIBRARIES = libgupnp-1.0.la -libgupnpinc_HEADERS = gupnp-context.h \ +libgupnpinc_HEADERS = gupnp-acl.h \ + gupnp-context.h \ gupnp-context-manager.h \ gupnp-control-point.h \ gupnp-device.h \ @@ -63,6 +68,7 @@ libgupnpinc_HEADERS = gupnp-context.h \ gupnp.h introspection_sources = $(libgupnpinc_HEADERS) \ + gupnp-acl.c \ gupnp-context.c \ gupnp-context-manager.c \ gupnp-control-point.c \ @@ -102,6 +108,7 @@ libgupnp_1_0_la_SOURCES = $(introspection_sources) \ gupnp-error-private.h \ gupnp-resource-factory-private.h \ gupnp-service-introspection-private.h \ + gupnp-acl-private.h \ gupnp-types-private.h \ gvalue-util.c \ gvalue-util.h \ diff --git a/libgupnp/Makefile.in b/libgupnp/Makefile.in index 594ae20..2884c15 100644 --- a/libgupnp/Makefile.in +++ b/libgupnp/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -18,23 +17,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -66,8 +93,8 @@ target_triplet = @target@ @HAVE_INTROSPECTION_TRUE@am__append_4 = GUPnP-1.0.gir subdir = libgupnp -DIST_COMMON = $(libgupnpinc_HEADERS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp $(libgupnpinc_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -113,32 +140,32 @@ LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = libgupnp_1_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) -am__libgupnp_1_0_la_SOURCES_DIST = gupnp-context.h \ +am__libgupnp_1_0_la_SOURCES_DIST = gupnp-acl.h gupnp-context.h \ gupnp-context-manager.h gupnp-control-point.h gupnp-device.h \ gupnp-device-info.h gupnp-device-proxy.h gupnp-error.h \ gupnp-resource-factory.h gupnp-root-device.h gupnp-service.h \ gupnp-service-info.h gupnp-service-proxy.h \ gupnp-service-introspection.h gupnp-xml-doc.h \ - gupnp-white-list.h gupnp-types.h gupnp.h gupnp-context.c \ - gupnp-context-manager.c gupnp-control-point.c gupnp-device.c \ - gupnp-device-info.c gupnp-device-proxy.c gupnp-error.c \ - gupnp-resource-factory.c gupnp-root-device.c gupnp-service.c \ - gupnp-service-info.c gupnp-service-proxy.c \ + gupnp-white-list.h gupnp-types.h gupnp.h gupnp-acl.c \ + gupnp-context.c gupnp-context-manager.c gupnp-control-point.c \ + gupnp-device.c gupnp-device-info.c gupnp-device-proxy.c \ + gupnp-error.c gupnp-resource-factory.c gupnp-root-device.c \ + gupnp-service.c gupnp-service-info.c gupnp-service-proxy.c \ gupnp-service-introspection.c gupnp-xml-doc.c \ gupnp-white-list.c gupnp-types.c http-headers.c http-headers.h \ - gupnp-context-private.h gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h gupnp-network-manager.c \ + gupnp-context-private.h gupnp-network-manager.c \ gupnp-network-manager.h gupnp-connman-manager.c \ gupnp-connman-manager.h gupnp-linux-context-manager.c \ - gupnp-linux-context-manager.h gupnp-windows-context-manager.c \ + gupnp-linux-context-manager.h gupnp-unix-context-manager.c \ + gupnp-unix-context-manager.h gupnp-windows-context-manager.c \ gupnp-windows-context-manager.h gupnp-simple-context-manager.h \ gupnp-simple-context-manager.c gupnp-device-info-private.h \ gupnp-error-private.h gupnp-resource-factory-private.h \ - gupnp-service-introspection-private.h gupnp-types-private.h \ - gvalue-util.c gvalue-util.h xml-util.c xml-util.h \ - gena-protocol.h gupnp-marshal.c gupnp-marshal.h + gupnp-service-introspection-private.h gupnp-acl-private.h \ + gupnp-types-private.h gvalue-util.c gvalue-util.h xml-util.c \ + xml-util.h gena-protocol.h gupnp-marshal.c gupnp-marshal.h am__objects_1 = -am__objects_2 = $(am__objects_1) gupnp-context.lo \ +am__objects_2 = $(am__objects_1) gupnp-acl.lo gupnp-context.lo \ gupnp-context-manager.lo gupnp-control-point.lo \ gupnp-device.lo gupnp-device-info.lo gupnp-device-proxy.lo \ gupnp-error.lo gupnp-resource-factory.lo gupnp-root-device.lo \ @@ -148,9 +175,14 @@ am__objects_2 = $(am__objects_1) gupnp-context.lo \ @OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@am__objects_3 = gupnp-network-manager.lo @OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__objects_4 = gupnp-connman-manager.lo @HAVE_NETLINK_TRUE@am__objects_5 = gupnp-linux-context-manager.lo -@OS_WIN32_FALSE@am__objects_6 = gupnp-unix-context-manager.lo \ -@OS_WIN32_FALSE@ $(am__objects_3) $(am__objects_4) \ -@OS_WIN32_FALSE@ $(am__objects_5) +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@am__objects_6 = \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__objects_3) \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__objects_4) \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__objects_5) +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@am__objects_6 = gupnp-unix-context-manager.lo \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__objects_3) \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__objects_4) \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__objects_5) @OS_WIN32_TRUE@am__objects_6 = gupnp-windows-context-manager.lo \ @OS_WIN32_TRUE@ $(am__objects_3) $(am__objects_4) \ @OS_WIN32_TRUE@ $(am__objects_5) @@ -162,10 +194,23 @@ libgupnp_1_0_la_OBJECTS = $(am_libgupnp_1_0_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = libgupnp_1_0_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libgupnp_1_0_la_LDFLAGS) $(LDFLAGS) \ -o $@ +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -178,20 +223,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(libgupnp_1_0_la_SOURCES) DIST_SOURCES = $(am__libgupnp_1_0_la_SOURCES_DIST) am__can_run_installinfo = \ @@ -201,6 +242,23 @@ am__can_run_installinfo = \ esac DATA = $(gir_DATA) $(typelib_DATA) HEADERS = $(libgupnpinc_HEADERS) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) @@ -231,17 +289,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -294,6 +352,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -353,9 +412,15 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LTVERSION = 4:0:0 -@OS_WIN32_FALSE@CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ -@OS_WIN32_FALSE@ gupnp-unix-context-manager.h $(am__append_1) \ -@OS_WIN32_FALSE@ $(am__append_2) $(am__append_3) +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@CONTEXT_MANAGER_IMPL = \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__append_1) \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__append_2) \ +@HAVE_IFADDRS_H_FALSE@@OS_WIN32_FALSE@ $(am__append_3) +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ gupnp-unix-context-manager.h \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__append_1) \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__append_2) \ +@HAVE_IFADDRS_H_TRUE@@OS_WIN32_FALSE@ $(am__append_3) @OS_WIN32_TRUE@CONTEXT_MANAGER_IMPL = gupnp-windows-context-manager.c \ @OS_WIN32_TRUE@ gupnp-windows-context-manager.h $(am__append_1) \ @OS_WIN32_TRUE@ $(am__append_2) $(am__append_3) @@ -374,7 +439,8 @@ AM_CFLAGS = $(LIBGUPNP_CFLAGS) \ libgupnpincdir = $(includedir)/gupnp-1.0/libgupnp lib_LTLIBRARIES = libgupnp-1.0.la -libgupnpinc_HEADERS = gupnp-context.h \ +libgupnpinc_HEADERS = gupnp-acl.h \ + gupnp-context.h \ gupnp-context-manager.h \ gupnp-control-point.h \ gupnp-device.h \ @@ -393,6 +459,7 @@ libgupnpinc_HEADERS = gupnp-context.h \ gupnp.h introspection_sources = $(libgupnpinc_HEADERS) \ + gupnp-acl.c \ gupnp-context.c \ gupnp-context-manager.c \ gupnp-control-point.c \ @@ -423,6 +490,7 @@ libgupnp_1_0_la_SOURCES = $(introspection_sources) \ gupnp-error-private.h \ gupnp-resource-factory-private.h \ gupnp-service-introspection-private.h \ + gupnp-acl-private.h \ gupnp-types-private.h \ gvalue-util.c \ gvalue-util.h \ @@ -500,6 +568,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): + install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ @@ -526,12 +595,15 @@ uninstall-libLTLIBRARIES: 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 + @list='$(lib_LTLIBRARIES)'; \ + locs=`for p in $$list; do echo $$p; done | \ + sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ + sort -u`; \ + test -z "$$locs" || { \ + echo rm -f $${locs}; \ + rm -f $${locs}; \ + } + libgupnp-1.0.la: $(libgupnp_1_0_la_OBJECTS) $(libgupnp_1_0_la_DEPENDENCIES) $(EXTRA_libgupnp_1_0_la_DEPENDENCIES) $(AM_V_CCLD)$(libgupnp_1_0_la_LINK) -rpath $(libdir) $(libgupnp_1_0_la_OBJECTS) $(libgupnp_1_0_la_LIBADD) $(LIBS) @@ -541,6 +613,7 @@ mostlyclean-compile: distclean-compile: -rm -f *.tab.c +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-acl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-connman-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-context.Plo@am__quote@ @@ -573,14 +646,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -658,26 +731,15 @@ uninstall-libgupnpincHEADERS: files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libgupnpincdir)'; $(am__uninstall_files_from_dir) -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) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -689,15 +751,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -706,6 +764,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -858,20 +931,21 @@ uninstall-am: uninstall-girDATA uninstall-libLTLIBRARIES \ .MAKE: all check install install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ - clean-libLTLIBRARIES clean-libtool ctags distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-girDATA \ - install-html install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libgupnpincHEADERS install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip install-typelibDATA 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-girDATA uninstall-libLTLIBRARIES \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ + clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ + ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-girDATA install-html install-html-am \ + install-info install-info-am install-libLTLIBRARIES \ + install-libgupnpincHEADERS install-man install-pdf \ + install-pdf-am install-ps install-ps-am install-strip \ + install-typelibDATA installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ + uninstall-girDATA uninstall-libLTLIBRARIES \ uninstall-libgupnpincHEADERS uninstall-typelibDATA diff --git a/libgupnp/gupnp-acl-private.h b/libgupnp/gupnp-acl-private.h new file mode 100644 index 0000000..16c9187 --- /dev/null +++ b/libgupnp/gupnp-acl-private.h @@ -0,0 +1,89 @@ +/* + * Copyright (C) 2013,2014 Jens Georg + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_ACL_PRIVATE_H__ +#define __GUPNP_ACL_PRIVATE_H__ + +#include +#include +#include + +#include "gupnp-acl.h" +#include "gupnp-context.h" + +G_BEGIN_DECLS + +/** + * AclServerHandler: + * + * Closure for the ACL server handler that adds + * a) Some data from the original server handler such as user_data and callback + * b) Saves information for later use to pass on to ACL such as the service and context + */ +typedef struct _AclServerHandler +{ + GUPnPService *service; + GUPnPContext *context; + SoupServerCallback callback; + gpointer user_data; + GDestroyNotify notify; +} AclServerHandler; + +/** + * AclAsyncHandler: + * + * Closure when doing an async ACL request. Stores everything passed into the server handler + */ +typedef struct _AclAsyncHandler +{ + SoupServer *server; + SoupMessage *message; + char *path; + GHashTable *query; + SoupClientContext *client; + AclServerHandler *handler; +} AclAsyncHandler; + +G_GNUC_INTERNAL AclServerHandler * +acl_server_handler_new (GUPnPService *service, + GUPnPContext *context, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify notify); + +G_GNUC_INTERNAL void +acl_server_handler_free (AclServerHandler *handler); + +G_GNUC_INTERNAL AclAsyncHandler * +acl_async_handler_new (SoupServer *server, + SoupMessage *message, + const char *path, + GHashTable *query, + SoupClientContext *client, + AclServerHandler *handler); + +G_GNUC_INTERNAL void +acl_async_handler_free (AclAsyncHandler *handler); + + +G_END_DECLS + +#endif diff --git a/libgupnp/gupnp-acl.c b/libgupnp/gupnp-acl.c new file mode 100644 index 0000000..0d4c55a --- /dev/null +++ b/libgupnp/gupnp-acl.c @@ -0,0 +1,269 @@ +/* + * Copyright (C) 2013,2014 Jens Georg + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +/** + * SECTION:gupnp-acl + * @short_description: Object providing a simple access control list for + * GUPnP. + * + * #GUPnPAcl provides either synchronous or asynchronous functions to check + * whether a peer sould be able to access a resource or not. + * + * Since: 0.20.11 + */ + +#include "gupnp-acl.h" +#include "gupnp-acl-private.h" + +G_DEFINE_INTERFACE(GUPnPAcl, gupnp_acl, G_TYPE_OBJECT) + +static void +gupnp_acl_default_init (GUPnPAclInterface *klass) +{ +} + +/** + * gupnp_acl_is_allowed: + * @self: an instance of #GUPnPAcl + * @device: (allow-none): The #GUPnPDevice associated with @path or %NULL if + * unknown. + * @service: (allow-none): The #GUPnPService associated with @path or %NULL if + * unknown. + * @path: The path being served. + * @address: IP address of the peer. + * @agent: (allow-none): The User-Agent header of the peer or %NULL if not + * unknown. + * @returns %TRUE if the peer is allowed, %FALSE otherwise + * + * Check whether an IP address is allowed to access this resource. + * + * Since: 0.20.11 + */ +gboolean +gupnp_acl_is_allowed (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent) +{ + g_return_val_if_fail (GUPNP_IS_ACL (self), FALSE); + + return GUPNP_ACL_GET_INTERFACE (self)->is_allowed (self, + device, + service, + path, + address, + agent); +} + +/** + * gupnp_acl_is_allowed_async: + * @self: a #GUPnPAcl + * @device: (allow-none): The #GUPnPDevice associated with @path or %NULL if + * unknown. + * @service: (allow-none): The #GUPnPService associated with @path or %NULL if + * unknown. + * @path: The path being served. + * @address: IP address of the peer + * @agent: (allow-none): The User-Agent header of the peer or %NULL if not + * unknown. + * @cancellable: (allow-none): A #GCancellable which can be used to cancel the + * operation. + * @callback: Callback to call after the function is done. + * @user_data: Some user data. + * + * Optional. Check asynchronously whether an IP address is allowed to access + * this resource. Use this function if the process of verifying the access right + * is expected to take some time, for example when using D-Bus etc. + * + * If this function is supported, gupnp_acl_can_sync() should return %TRUE. + * + * Use gupnp_acl_is_allowed_finish() to retrieve the result. + * +* Since: 0.20.11 + */ +void +gupnp_acl_is_allowed_async (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data) +{ + g_return_if_fail (GUPNP_IS_ACL (self)); + + GUPNP_ACL_GET_INTERFACE (self)->is_allowed_async (self, + device, + service, + path, + address, + agent, + cancellable, + callback, + user_data); +} + +/** + * gupnp_acl_is_allowed_finish: + * @self: An instance of #GUPnPAcl + * @res: %GAsyncResult obtained from the callback in gupnp_acl_is_allowed_async() + * @error: (allow-none): A return location for a #GError describing the failure + * @returns %TRUE if the authentication was successful, %FALSE otherwise and on + * error. Check @error for details. + * + * Since: 0.20.11 + */ +gboolean +gupnp_acl_is_allowed_finish (GUPnPAcl *self, + GAsyncResult *res, + GError **error) +{ + g_return_val_if_fail (GUPNP_IS_ACL (self), FALSE); + + return GUPNP_ACL_GET_INTERFACE (self)->is_allowed_finish (self, + res, + error); +} + +/** + * gupnp_acl_can_sync: + * @self: A #GUPnPAcl + * @returns %TRUE, if gupnp_acl_is_allowed_async() is supported, %FALSE + * otherwise. + * + * Check whether gupnp_acl_is_allowed_async() is supported. + * + * Since: 0.20.11 + */ +gboolean +gupnp_acl_can_sync (GUPnPAcl *self) +{ + g_return_val_if_fail (GUPNP_IS_ACL (self), FALSE); + + return GUPNP_ACL_GET_INTERFACE (self)->can_sync (self); +} + +/** + * acl_server_handler_new: + * @service: (allow-none): A #GUPnPContext or %NULL if unknown + * @context: The #GUPnPContext the server handler is run on. + * @callback: The #SoupServerCallback we're wrapping. + * @user_data: The user_data for @callback + * @notify: (allow-none): The #GDestroyNotify for @user_data or %NULL if none. + * @returns: A newly allocated #AclServerHandler + * + * Allocate a new #AclServerHandler. + * + */ +AclServerHandler * +acl_server_handler_new (GUPnPService *service, + GUPnPContext *context, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify notify) +{ + AclServerHandler *handler = g_new0 (AclServerHandler, 1); + + handler->service = service ? g_object_ref (service) : NULL; + handler->context = g_object_ref (context); + handler->callback = callback; + handler->user_data = user_data; + handler->notify = notify; + + return handler; +} + +/** + * acl_server_handler_free: + * @handler: An #AclServerHandler instance. + * + * Free an #AclServerHandler previously allocated with acl_server_handler_new(). + * + */ +void +acl_server_handler_free (AclServerHandler *handler) +{ + g_clear_object (&handler->service); + g_clear_object (&handler->context); + + if (handler->notify != NULL) + handler->notify (handler->user_data); + + g_free (handler); +} + +/** + * acl_async_handler_new: + * @server: A #SoupServer instance. + * @message: The #SoupMessage we want to handle. + * @path: The path we're trying to serve. + * @query: (allow-none): The query parameters of the request. + * @client: The #SoupClientContext for this request. + * @handler: The #AclServerHandler used with this request. + * @returns: A new instance of #AclAsyncHandler. + * + * Create a new async closure. + * + */ +AclAsyncHandler * +acl_async_handler_new (SoupServer *server, + SoupMessage *message, + const char *path, + GHashTable *query, + SoupClientContext *client, + AclServerHandler *handler) +{ + AclAsyncHandler *data = g_slice_new0 (AclAsyncHandler); + + data->server = g_object_ref (server); + data->message = g_object_ref (message); + data->path = g_strdup (path); + if (query != NULL) + data->query = g_hash_table_ref (query); + data->client = g_boxed_copy (SOUP_TYPE_CLIENT_CONTEXT, client); + data->handler = handler; + + return data; +} + +/** + * acl_async_handler_free: + * @handler: An instance allocated with acl_async_handler_new() + * + * Free an #AclAsyncHandler allocated with acl_async_handler_new(). + * + */ +void +acl_async_handler_free (AclAsyncHandler *handler) +{ + g_object_unref (handler->server); + g_object_unref (handler->message); + g_free (handler->path); + if (handler->query != NULL) + g_hash_table_unref (handler->query); + g_boxed_free (SOUP_TYPE_CLIENT_CONTEXT, handler->client); + + g_slice_free (AclAsyncHandler, handler); +} diff --git a/libgupnp/gupnp-acl.h b/libgupnp/gupnp-acl.h new file mode 100644 index 0000000..df5ebe8 --- /dev/null +++ b/libgupnp/gupnp-acl.h @@ -0,0 +1,138 @@ +/* + * Copyright (C) 2013,2014 Jens Georg + * + * Author: Jens Georg + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, + * Boston, MA 02110-1301, USA. + */ + +#ifndef __GUPNP_ACL_H__ +#define __GUPNP_ACL_H__ + +#include +#include +#include + +G_BEGIN_DECLS + +GType +gupnp_acl_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_ACL (gupnp_acl_get_type()) + +#define GUPNP_ACL(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_ACL, \ + GUPnPAcl)) + +#define GUPNP_IS_ACL(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_ACL)) + +#define GUPNP_ACL_GET_INTERFACE(obj) \ + (G_TYPE_INSTANCE_GET_INTERFACE ((obj), \ + GUPNP_TYPE_ACL, GUPnPAclInterface)) + +/** + * GUPnPAcl: + * + * Handle to an object implementing the #GUPnPAclInterface interface. + */ +typedef struct _GUPnPAcl GUPnPAcl; + +/** + * GUPnPAclInterface: + * @parent: The parent interface. + * @is_allowed: Check whether access to the resource is granted. + * @is_allowed_async: Asynchronously check whether the access is granted. + * @is_allowed_finish: Conclude the @is_allowed_async operation. + * @can_sync: Whether the ACL can do sync queries. + * + * Implement a simple access control list for GUPnP. + * + * Since: 0.20.11 + */ +typedef struct _GUPnPAclInterface GUPnPAclInterface; + +/* Forward declarations to avoid recursive includes */ +typedef struct _GUPnPDevice GUPnPDevice; +typedef struct _GUPnPService GUPnPService; + +struct _GUPnPAclInterface { + GTypeInterface parent; + + gboolean (*is_allowed) (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent); + + void (*is_allowed_async) (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + + gboolean (*is_allowed_finish) (GUPnPAcl *self, + GAsyncResult *res, + GError **error); + + gboolean (*can_sync) (GUPnPAcl *self); + + + /*< private >*/ + /* future padding */ + void (* _gupnp_reserved1) (void); + void (* _gupnp_reserved2) (void); + void (* _gupnp_reserved3) (void); + void (* _gupnp_reserved4) (void); +}; + +gboolean +gupnp_acl_is_allowed (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent); + +void +gupnp_acl_is_allowed_async (GUPnPAcl *self, + GUPnPDevice *device, + GUPnPService *service, + const char *path, + const char *address, + const char *agent, + GCancellable *cancellable, + GAsyncReadyCallback callback, + gpointer user_data); + +gboolean +gupnp_acl_is_allowed_finish (GUPnPAcl *self, + GAsyncResult *res, + GError **error); + +gboolean +gupnp_acl_can_sync (GUPnPAcl *self); + +G_END_DECLS + +#endif diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c index 21ce53b..7c58f31 100644 --- a/libgupnp/gupnp-context-manager.c +++ b/libgupnp/gupnp-context-manager.c @@ -25,12 +25,13 @@ /** * SECTION:gupnp-context-manager - * @short_description: Manages #GUPnPContext objects. + * @short_description: Manages GUPnPContext objects. * * A Utility class that takes care of creation and destruction of * #GUPnPContext objects for all available network interfaces as they go up * (connect) and down (disconnect), respectively. * + * Since: 0.13.0 */ #include @@ -45,7 +46,17 @@ #include "gupnp.h" #include "gupnp-marshal.h" +#ifdef HAVE_IFADDRS_H #include "gupnp-unix-context-manager.h" +#endif + +#ifdef G_OS_WIN32 +#include "gupnp-windows-context-manager.h" +#elif defined(USE_NETWORK_MANAGER) +#include "gupnp-network-manager.h" +#elif defined(USE_CONNMAN) +#include "gupnp-connman-manager.h" +#endif G_DEFINE_ABSTRACT_TYPE (GUPnPContextManager, gupnp_context_manager, @@ -169,20 +180,19 @@ gupnp_context_manager_filter_context (GUPnPWhiteList *white_list, GList *obj; GList *blk; gboolean match; - GUPnPContext *context; - GSSDPResourceBrowser *browser; obj = manager->priv->objects; blk = manager->priv->blacklisted; while (obj != NULL) { - if (!GUPNP_IS_CONTROL_POINT (obj->data)) - continue; - /* If the white list is empty, treat it as disabled */ if (check) { - /* Filter out context */ - context = gupnp_control_point_get_context (obj->data); + GUPnPContext *context; + + g_object_get (G_OBJECT (obj->data), + "context", &context, + NULL); + match = gupnp_white_list_check_context (white_list, context); } else { @@ -190,11 +200,18 @@ gupnp_context_manager_filter_context (GUPnPWhiteList *white_list, match = TRUE; } - browser = GSSDP_RESOURCE_BROWSER (obj->data); - gssdp_resource_browser_set_active (browser, match); + if (GUPNP_IS_CONTROL_POINT (obj->data)) { + GSSDPResourceBrowser *browser; + + browser = GSSDP_RESOURCE_BROWSER (obj->data); + gssdp_resource_browser_set_active (browser, match); + } else if (GUPNP_IS_ROOT_DEVICE (obj->data)) { + GSSDPResourceGroup *group; - if (match) - (void) gssdp_resource_browser_rescan (browser); + group = GSSDP_RESOURCE_GROUP (obj->data); + gssdp_resource_group_set_available (group, match); + } else + g_assert_not_reached (); obj = obj->next; } @@ -492,6 +509,7 @@ gupnp_context_manager_class_init (GUPnPContextManagerClass *klass) * Same as gupnp_context_manager_create(). * * Returns: (transfer full): A new #GUPnPContextManager object. + * Since: 0.13.0 * Deprecated: 0.17.2: Use gupnp_context_manager_create(). **/ GUPnPContextManager * @@ -520,6 +538,8 @@ gupnp_context_manager_new (GMainContext *main_context, * the implementation falls back to the basic Unix context manager instead. * * Returns: (transfer full): A new #GUPnPContextManager object. + * + * Since: 0.17.2 **/ GUPnPContextManager * gupnp_context_manager_create (guint port) @@ -529,22 +549,19 @@ gupnp_context_manager_create (guint port) #endif GUPnPContextManager *impl; GType impl_type = G_TYPE_INVALID; -#ifdef G_OS_WIN32 -#include "gupnp-windows-context-manager.h" +#ifdef G_OS_WIN32 impl_type = GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER; #else -#ifdef USE_NETWORK_MANAGER -#include "gupnp-network-manager.h" +#if defined(USE_NETWORK_MANAGER) system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); - if (gupnp_network_manager_is_available ()) + if (system_bus != NULL && gupnp_network_manager_is_available ()) impl_type = GUPNP_TYPE_NETWORK_MANAGER; -#elif USE_CONNMAN -#include "gupnp-connman-manager.h" +#elif defined(USE_CONNMAN) system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); - if (gupnp_connman_manager_is_available ()) + if (system_bus != NULL && gupnp_connman_manager_is_available ()) impl_type = GUPNP_TYPE_CONNMAN_MANAGER; #endif @@ -553,21 +570,28 @@ gupnp_context_manager_create (guint port) * are using one of the DBus managers but it's not available, so we * fall-back to it. */ #if defined (USE_NETLINK) || defined (HAVE_LINUX_RTNETLINK_H) +#if defined (HAVE_IFADDRS_H) if (gupnp_linux_context_manager_is_available ()) impl_type = GUPNP_TYPE_LINUX_CONTEXT_MANAGER; else impl_type = GUPNP_TYPE_UNIX_CONTEXT_MANAGER; #else + impl_type = GUPNP_TYPE_LINUX_CONTEXT_MANAGER; + +#endif +#elif defined (HAVE_IFADDRS_H) impl_type = GUPNP_TYPE_UNIX_CONTEXT_MANAGER; +#else +#error No context manager defined #endif } #endif /* G_OS_WIN32 */ - impl = g_object_new (impl_type, - "port", port, - NULL); + impl = GUPNP_CONTEXT_MANAGER (g_object_new (impl_type, + "port", port, + NULL)); #if defined(USE_NETWORK_MANAGER) || defined(USE_CONNMAN) - g_object_unref (system_bus); + g_clear_object (&system_bus); #endif return impl; } @@ -580,6 +604,8 @@ gupnp_context_manager_create (guint port) * Only the active control points send discovery messages. * This function should be called when servers are suspected to have * disappeared. + * + * Since: 0.20.3 **/ void gupnp_context_manager_rescan_control_points (GUPnPContextManager *manager) @@ -611,6 +637,8 @@ gupnp_context_manager_rescan_control_points (GUPnPContextManager *manager) * You usually want to call this function from * #GUPnPContextManager::context-available handler after you create a * #GUPnPControlPoint object for the newly available context. + * + * Since: 0.13.0 **/ void gupnp_context_manager_manage_control_point (GUPnPContextManager *manager, @@ -633,6 +661,8 @@ gupnp_context_manager_manage_control_point (GUPnPContextManager *manager, * usually want to call this function from * #GUPnPContextManager::context-available handler after you create a * #GUPnPRootDevice object for the newly available context. + * + * Since: 0.13.0 **/ void gupnp_context_manager_manage_root_device (GUPnPContextManager *manager, @@ -651,6 +681,8 @@ gupnp_context_manager_manage_root_device (GUPnPContextManager *manager, * * Get the network port associated with this context manager. * Returns: The network port asssociated with this context manager. + * + * Since: 0.19.1 */ guint gupnp_context_manager_get_port (GUPnPContextManager *manager) diff --git a/libgupnp/gupnp-context-private.h b/libgupnp/gupnp-context-private.h index 18c4813..212d5e0 100644 --- a/libgupnp/gupnp-context-private.h +++ b/libgupnp/gupnp-context-private.h @@ -24,11 +24,18 @@ #include +#include "gupnp-acl-private.h" + G_BEGIN_DECLS G_GNUC_INTERNAL const char * _gupnp_context_get_server_url (GUPnPContext *context); +G_GNUC_INTERNAL void +_gupnp_context_add_server_handler_with_data (GUPnPContext *context, + const char *path, + AclServerHandler *data); + G_END_DECLS #endif /* __GUPNP_CONTEXT_PRIVATE_H__ */ diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c index 81c030c..b942369 100644 --- a/libgupnp/gupnp-context.c +++ b/libgupnp/gupnp-context.c @@ -41,7 +41,9 @@ #include #include #include -#ifndef G_OS_WIN32 +#ifdef G_OS_WIN32 +#include +#else #include #endif #include @@ -49,6 +51,8 @@ #include #include +#include "gupnp-acl.h" +#include "gupnp-acl-private.h" #include "gupnp-context.h" #include "gupnp-context-private.h" #include "gupnp-error.h" @@ -59,6 +63,14 @@ #define GUPNP_CONTEXT_DEFAULT_LANGUAGE "en" static void +gupnp_acl_server_handler (SoupServer *server, + SoupMessage *msg, + const char *path, + GHashTable *query, + SoupClientContext *client, + gpointer user_data); + +static void gupnp_context_initable_iface_init (gpointer g_iface, gpointer iface_data); @@ -83,6 +95,8 @@ struct _GUPnPContextPrivate { char *default_language; GList *host_path_datas; + + GUPnPAcl *acl; }; enum { @@ -91,7 +105,8 @@ enum { PROP_SERVER, PROP_SESSION, PROP_SUBSCRIPTION_TIMEOUT, - PROP_DEFAULT_LANGUAGE + PROP_DEFAULT_LANGUAGE, + PROP_ACL }; typedef struct { @@ -251,6 +266,10 @@ gupnp_context_set_property (GObject *object, gupnp_context_set_default_language (context, g_value_get_string (value)); break; + case PROP_ACL: + gupnp_context_set_acl (context, g_value_get_object (value)); + + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -290,6 +309,11 @@ gupnp_context_get_property (GObject *object, gupnp_context_get_default_language (context)); break; + case PROP_ACL: + g_value_set_object (value, + gupnp_context_get_acl (context)); + + break; default: G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); break; @@ -335,11 +359,7 @@ gupnp_context_finalize (GObject *object) context = GUPNP_CONTEXT (object); - if (context->priv->default_language) { - g_free (context->priv->default_language); - context->priv->default_language = NULL; - } - + g_free (context->priv->default_language); g_free (context->priv->server_url); /* Call super */ @@ -347,6 +367,43 @@ gupnp_context_finalize (GObject *object) object_class->finalize (object); } +static GObject * +gupnp_context_constructor (GType type, + guint n_construct_params, + GObjectConstructParam *construct_params) +{ + GObjectClass *object_class; + guint port = 0, msearch_port = 0; + int i, msearch_idx = -1; + + for (i = 0; i < n_construct_params; i++) { + const char *par_name; + + par_name = construct_params[i].pspec->name; + + if (strcmp (par_name, "port") == 0) + port = g_value_get_uint (construct_params[i].value); + else if (strcmp (par_name, "msearch-port") == 0) { + msearch_idx = i; + msearch_port = g_value_get_uint + (construct_params[i].value); + } + } + + object_class = G_OBJECT_CLASS (gupnp_context_parent_class); + + /* Override msearch-port property if port is set, the property exists + * and wasn't provided otherwise */ + if (port != 0 && msearch_idx != -1 && msearch_port == 0) { + g_value_set_uint (construct_params[msearch_idx].value, port); + } + + return object_class->constructor (type, + n_construct_params, + construct_params); +} + + static void gupnp_context_class_init (GUPnPContextClass *klass) { @@ -358,6 +415,7 @@ gupnp_context_class_init (GUPnPContextClass *klass) object_class->get_property = gupnp_context_get_property; object_class->dispose = gupnp_context_dispose; object_class->finalize = gupnp_context_finalize; + object_class->constructor = gupnp_context_constructor; g_type_class_add_private (klass, sizeof (GUPnPContextPrivate)); @@ -440,6 +498,8 @@ gupnp_context_class_init (GUPnPContextClass *klass) * The content of the Content-Language header id the client * sends Accept-Language and no language-specific pages to serve * exist. The property defaults to 'en'. + * + * Since: 0.17.0 **/ g_object_class_install_property (object_class, @@ -453,6 +513,24 @@ gupnp_context_class_init (GUPnPContextClass *klass) G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | G_PARAM_STATIC_BLURB)); + + /** + * GUPnPContext:acl: + * + * An access control list. + * + * Since: 0.20.11 + */ + g_object_class_install_property + (object_class, + PROP_ACL, + g_param_spec_object ("acl", + "Access control list", + "Access control list", + GUPNP_TYPE_ACL, + G_PARAM_CONSTRUCT | + G_PARAM_READWRITE | + G_PARAM_STATIC_STRINGS)); } /** @@ -463,6 +541,8 @@ gupnp_context_class_init (GUPnPContextClass *klass) * * Return value: (transfer none): The #SoupSession used by GUPnP. Do not unref * this when finished. + * + * Since: 0.12.3 **/ SoupSession * gupnp_context_get_session (GUPnPContext *context) @@ -676,9 +756,7 @@ host_path_data_set_language (HostPathData *data, const char *language) data->default_language = g_strdup (language); - - if (old_language != NULL) - g_free (old_language); + g_free (old_language); } /** @@ -692,6 +770,8 @@ host_path_data_set_language (HostPathData *data, const char *language) * is required to send a Content-Language header in return. If there are * no files hosted in languages which match the requested ones the * Content-Language header is set to this value. The default value is "en". + * + * Since: 0.17.0 */ void gupnp_context_set_default_language (GUPnPContext *context, @@ -712,8 +792,7 @@ gupnp_context_set_default_language (GUPnPContext *context, (GFunc) host_path_data_set_language, (gpointer) language); - if (old_language != NULL) - g_free (old_language); + g_free (old_language); } /** @@ -724,6 +803,8 @@ gupnp_context_set_default_language (GUPnPContext *context, * * Returns: (transfer none): The default content of the Content-Language * header. + * + * Since: 0.17.0 */ const char * gupnp_context_get_default_language (GUPnPContext *context) @@ -854,6 +935,17 @@ host_path_handler (G_GNUC_UNUSED SoupServer *server, goto DONE; } + /* Always send HTTP 1.1 for device description requests + * Also set Connection: close header, since the request originated + * from a HTTP 1.0 client + */ + if (soup_message_get_http_version (msg) == SOUP_HTTP_1_0) { + soup_message_set_http_version (msg, SOUP_HTTP_1_1); + soup_message_headers_append (msg->response_headers, + "Connection", + "close"); + } + user_agent = soup_message_headers_get_one (msg->request_headers, "User-Agent"); @@ -1040,10 +1132,7 @@ host_path_handler (G_GNUC_UNUSED SoupServer *server, g_free (path_to_open); g_free (local_path); - while (orig_locales) { - g_free (orig_locales->data); - orig_locales = g_list_delete_link (orig_locales, orig_locales); - } + g_list_free_full (orig_locales, g_free); } static UserAgent * @@ -1092,17 +1181,8 @@ host_path_data_free (HostPathData *path_data) g_free (path_data->server_path); g_free (path_data->default_language); - while (path_data->user_agents) { - UserAgent *agent; - - agent = path_data->user_agents->data; - - user_agent_free (agent); - - path_data->user_agents = g_list_delete_link ( - path_data->user_agents, - path_data->user_agents); - } + g_list_free_full (path_data->user_agents, + (GDestroyNotify) user_agent_free); g_slice_free (HostPathData, path_data); } @@ -1165,6 +1245,8 @@ path_compare_func (HostPathData *path_data, * path @server_path must already be hosted by @context. * * Return value: %TRUE on success, %FALSE otherwise. + * + * Since: 0.13.3 **/ gboolean gupnp_context_host_path_for_agent (GUPnPContext *context, @@ -1230,3 +1312,201 @@ gupnp_context_unhost_path (GUPnPContext *context, soup_server_remove_handler (server, server_path); host_path_data_free (path_data); } + +/** + * gupnp_context_get_acl: + * @context: A #GUPnPContext + * + * Returns:(transfer none): The access control list associated with this context or %NULL + * if no acl is set. + * + * Since: 0.20.11 + **/ +GUPnPAcl * +gupnp_context_get_acl (GUPnPContext *context) +{ + g_return_val_if_fail (GUPNP_IS_CONTEXT (context), NULL); + + return context->priv->acl; +} + +/** + * gupnp_context_set_acl: + * @context: A #GUPnPContext + * @acl: (allow-none): The new access control list or %NULL to remove the + * current list. + * + * Since: 0.20.11 + **/ +void +gupnp_context_set_acl (GUPnPContext *context, GUPnPAcl *acl) +{ + g_return_if_fail (GUPNP_IS_CONTEXT (context)); + + if (context->priv->acl != NULL) { + g_object_unref (context->priv->acl); + context->priv->acl = NULL; + } + + if (acl != NULL) + context->priv->acl = g_object_ref (acl); + + g_object_notify (G_OBJECT (context), "acl"); +} + +static void +gupnp_acl_async_callback (GUPnPAcl *acl, + GAsyncResult *res, + AclAsyncHandler *data) +{ + gboolean allowed; + GError *error = NULL; + + allowed = gupnp_acl_is_allowed_finish (acl, res, &error); + soup_server_unpause_message (data->server, data->message); + if (!allowed) + soup_message_set_status (data->message, SOUP_STATUS_FORBIDDEN); + else + data->handler->callback (data->server, + data->message, + data->path, + data->query, + data->client, + data->handler->user_data); + + acl_async_handler_free (data); +} + +static void +gupnp_acl_server_handler (SoupServer *server, + SoupMessage *msg, + const char *path, + GHashTable *query, + SoupClientContext *client, + gpointer user_data) +{ + AclServerHandler *handler = (AclServerHandler *) user_data; + const char *agent; + GUPnPDevice *device = NULL; + + if (handler->service) { + g_object_get (handler->service, + "root-device", &device, + NULL); + + if (device != NULL) { + g_object_unref (device); + } + } + + agent = soup_message_headers_get_one (msg->request_headers, + "User-Agent"); + + if (handler->context->priv->acl != NULL) { + if (gupnp_acl_can_sync (handler->context->priv->acl)) { + if (!gupnp_acl_is_allowed (handler->context->priv->acl, + device, + handler->service, + path, + soup_client_context_get_host (client), + agent)) { + soup_message_set_status (msg, SOUP_STATUS_FORBIDDEN); + + return; + } + } else { + AclAsyncHandler *data; + + data = acl_async_handler_new (server, msg, path, query, client, handler); + + soup_server_pause_message (server, msg); + gupnp_acl_is_allowed_async (handler->context->priv->acl, + device, + handler->service, + path, + soup_client_context_get_host (client), + agent, + NULL, + (GAsyncReadyCallback) gupnp_acl_async_callback, + data); + + return; + } + } + + /* Delegate to orignal callback */ + handler->callback (server, msg, path, query, client, handler->user_data); +} + +/** + * gupnp_context_add_server_handler: + * @context: a #GUPnPContext + * @use_acl: %TRUE, if the path should query the GUPnPContext::acl before + * serving the resource, %FALSE otherwise. + * @path: the toplevel path for the handler. + * @callback: callback to invoke for requests under @path + * @user_data: the user_data passed to @callback + * @destroy: (allow-none): A #GDestroyNotify for @user_data or %NULL if none. + * + * Add a #SoupServerCallback to the #GUPnPContext's #SoupServer. + * + * Since: 0.20.11 + */ +void +gupnp_context_add_server_handler (GUPnPContext *context, + gboolean use_acl, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy) +{ + g_return_if_fail (GUPNP_IS_CONTEXT (context)); + + if (use_acl) { + AclServerHandler *handler; + handler = acl_server_handler_new (NULL, context, callback, user_data, destroy); + soup_server_add_handler (context->priv->server, + path, + gupnp_acl_server_handler, + handler, + (GDestroyNotify) acl_server_handler_free); + } else + soup_server_add_handler (context->priv->server, + path, + callback, + user_data, + destroy); +} + +void +_gupnp_context_add_server_handler_with_data (GUPnPContext *context, + const char *path, + AclServerHandler *handler) +{ + g_return_if_fail (GUPNP_IS_CONTEXT (context)); + + soup_server_add_handler (context->priv->server, + path, + gupnp_acl_server_handler, + handler, + (GDestroyNotify) acl_server_handler_free); +} + +/** + * gupnp_context_remove_server_handler: + * @context: a #GUPnPContext + * @use_acl: %TRUE, if the path should query the GUPnPContext::acl before + * serving the resource, %FALSE otherwise. + * @path: the toplevel path for the handler. + * + * Add a #SoupServerCallback to the #GUPnPContext's #SoupServer. + * + * Since: 0.20.11 + */ +void +gupnp_context_remove_server_handler (GUPnPContext *context, const char *path) +{ + g_return_if_fail (GUPNP_IS_CONTEXT (context)); + + soup_server_remove_handler (context->priv->server, path); +} diff --git a/libgupnp/gupnp-context.h b/libgupnp/gupnp-context.h index a2e2f9e..233d2fa 100644 --- a/libgupnp/gupnp-context.h +++ b/libgupnp/gupnp-context.h @@ -26,6 +26,8 @@ #include #include +#include "gupnp-acl.h" + G_BEGIN_DECLS GType @@ -129,6 +131,20 @@ void gupnp_context_unhost_path (GUPnPContext *context, const char *server_path); +GUPnPAcl * +gupnp_context_get_acl (GUPnPContext *context); + +void +gupnp_context_set_acl (GUPnPContext *context, + GUPnPAcl *acl); + +void +gupnp_context_add_server_handler (GUPnPContext *context, + gboolean use_acl, + const char *path, + SoupServerCallback callback, + gpointer user_data, + GDestroyNotify destroy); G_END_DECLS #endif /* __GUPNP_CONTEXT_H__ */ diff --git a/libgupnp/gupnp-device-info.c b/libgupnp/gupnp-device-info.c index 9ef38fd..b314eee 100644 --- a/libgupnp/gupnp-device-info.c +++ b/libgupnp/gupnp-device-info.c @@ -334,7 +334,7 @@ gupnp_device_info_class_init (GUPnPDeviceInfoClass *klass) "The XML document related to this " "device", GUPNP_TYPE_XML_DOC, - G_PARAM_WRITABLE | + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY | G_PARAM_STATIC_NAME | G_PARAM_STATIC_NICK | @@ -864,10 +864,7 @@ gupnp_device_info_get_icon_url (GUPnPDeviceInfo *info, } /* Cleanup */ - while (icons) { - icon_free (icons->data); - icons = g_list_delete_link (icons, icons); - } + g_list_free_full (icons, (GDestroyNotify) icon_free); return ret; } @@ -938,6 +935,8 @@ resource_type_match (const char *query, * Returns: (transfer full) (element-type utf8): a #GList of newly allocated strings or * %NULL if the device description doesn't contain the <dlna:X_DLNADOC> * element. + * + * Since: 0.20.4 **/ GList * gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info) @@ -952,9 +951,18 @@ gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info) for (element = element->children; element; element = element->next) { /* No early exit since the node explicitly may appear multiple * times: 7.2.10.3 */ - if (!strcmp ("X_DLNADOC", (char *) element->name)) + if (!strcmp ("X_DLNADOC", (char *) element->name)) { + xmlChar *content = NULL; + + content = xmlNodeGetContent (element); + + if (content == NULL) + continue; + list = g_list_prepend (list, - xmlNodeGetContent(element)); + g_strdup ((char *) content)); + xmlFree (content); + } } /* Return in order of appearance in document */ @@ -971,6 +979,8 @@ gupnp_device_info_list_dlna_device_class_identifier (GUPnPDeviceInfo *info) * Returns: (transfer full) (element-type utf8): a #GList of newly allocated strings or * %NULL if the device description doesn't contain the <dlna:X_DLNACAP> * element. + * + * Since: 0.13.0 **/ GList * gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info) @@ -1025,6 +1035,8 @@ gupnp_device_info_list_dlna_capabilities (GUPnPDeviceInfo *info) * * Return value: a newly allocated string or %NULL if the device * description doesn't contain the given @element + * + * Since: 0.13.0 **/ char * gupnp_device_info_get_description_value (GUPnPDeviceInfo *info, diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c index 2257a6e..46a5408 100644 --- a/libgupnp/gupnp-linux-context-manager.c +++ b/libgupnp/gupnp-linux-context-manager.c @@ -23,6 +23,19 @@ * SECTION:gupnp-linux-context-manager * @short_description: Linux-specific implementation of #GUPnPContextManager * + * This is a Linux-specific context manager which uses Netlink + * to detect the changes in network interface configurations, such as + * added or removed interfaces, network addresses, ... + * + * The context manager works in two phase. + * + * Phase one is the "bootstrapping" phase where we query all currently + * configured interfaces and addresses. + * + * Phase two is the "listening" phase where we just listen to the netlink + * messages that are happening and create or destroy #GUPnPContexts + * accordingly. */ #include @@ -38,6 +51,9 @@ #include #include +#include +#include + #include "gupnp-linux-context-manager.h" #include "gupnp-context.h" @@ -46,12 +62,23 @@ G_DEFINE_TYPE (GUPnPLinuxContextManager, GUPNP_TYPE_CONTEXT_MANAGER); struct _GUPnPLinuxContextManagerPrivate { + /* Socket used for IOCTL calls */ int fd; + + /* Netlink sequence number; nl_seq > 1 means bootstrapping done */ int nl_seq; + + /* Socket used to do netlink communication */ GSocket *netlink_socket; + + /* Socket source used for normal netlink communication */ GSource *netlink_socket_source; + + /* Idle source used during bootstrap */ GSource *bootstrap_source; + /* A hash table mapping system interface indices to a NetworkInterface + * structure */ GHashTable *interfaces; }; @@ -144,8 +171,7 @@ network_device_update_essid (NetworkInterface *device) else old_essid = NULL; #endif - if (old_essid) - g_free (old_essid); + g_free (old_essid); } static void @@ -200,7 +226,7 @@ context_signal_up (G_GNUC_UNUSED gpointer key, gpointer value, gpointer user_data) { - g_signal_emit_by_name (user_data, "context-available", value); + g_signal_emit_by_name (user_data, "context-available", value); } static void @@ -208,7 +234,7 @@ context_signal_down (G_GNUC_UNUSED gpointer key, gpointer value, gpointer user_data) { - g_signal_emit_by_name (user_data, "context-unavailable", value); + g_signal_emit_by_name (user_data, "context-unavailable", value); } static void @@ -244,10 +270,8 @@ network_device_down (NetworkInterface *device) static void network_device_free (NetworkInterface *device) { - if (device->name != NULL) - g_free (device->name); - if (device->essid != NULL) - g_free (device->essid); + g_free (device->name); + g_free (device->essid); if (device->contexts != NULL) { GHashTableIter iter; @@ -258,15 +282,17 @@ network_device_free (NetworkInterface *device) while (g_hash_table_iter_next (&iter, (gpointer *) &key, (gpointer *) &value)) { - g_signal_emit_by_name (device->manager, - "context-unavailable", - value); - g_hash_table_iter_remove (&iter); + g_signal_emit_by_name (device->manager, + "context-unavailable", + value); + g_hash_table_iter_remove (&iter); } } g_hash_table_unref (device->contexts); device->contexts = NULL; + + g_slice_free (NetworkInterface, device); } @@ -301,18 +327,19 @@ on_netlink_message_available (G_GNUC_UNUSED GSocket *socket, static void extract_info (struct nlmsghdr *header, char **label) { - int rt_attr_len; - struct rtattr *rt_attr; - - rt_attr = IFLA_RTA (NLMSG_DATA (header)); - rt_attr_len = IFLA_PAYLOAD (header); - while (RT_ATTR_OK (rt_attr, rt_attr_len)) { - if (rt_attr->rta_type == IFA_LABEL) { - *label = g_strdup ((char *) RTA_DATA (rt_attr)); - break; + int rt_attr_len; + struct rtattr *rt_attr; + + rt_attr = IFLA_RTA (NLMSG_DATA (header)); + rt_attr_len = IFLA_PAYLOAD (header); + while (RT_ATTR_OK (rt_attr, rt_attr_len)) { + if (rt_attr->rta_type == IFA_LABEL) { + *label = g_strdup ((char *) RTA_DATA (rt_attr)); + + break; + } + rt_attr = RTA_NEXT (rt_attr, rt_attr_len); } - rt_attr = RTA_NEXT (rt_attr, rt_attr_len); - } } static gboolean @@ -354,9 +381,8 @@ create_context (GUPnPLinuxContextManager *self, } /* If device isn't one we consider, silently skip address */ - if (device->flags & NETWORK_INTERFACE_IGNORE) { + if (device->flags & NETWORK_INTERFACE_IGNORE) return; - } network_device_create_context (device, label); } @@ -468,6 +494,8 @@ send_netlink_request (GUPnPLinuxContextManager *self, strerror (errno)); } +/* Query all available interfaces and immediately process all answers. We need + * to do this to be able to send RTM_GETADDR in the next step */ static void query_all_network_interfaces (GUPnPLinuxContextManager *self) { @@ -481,6 +509,8 @@ query_all_network_interfaces (GUPnPLinuxContextManager *self) g_error_free (error); } +/* Start query of all currenly available network addresses. The answer will be + * processed by the normal netlink socket source call-back. */ static void query_all_addresses (GUPnPLinuxContextManager *self) { @@ -494,6 +524,7 @@ query_all_addresses (GUPnPLinuxContextManager *self) (((ifi)->ifi_flags & (IFF_MULTICAST | IFF_LOOPBACK)) && \ !((ifi)->ifi_flags & IFF_POINTOPOINT)) +/* Handle status changes (up, down, new address, ...) on network interfaces */ static void handle_device_status_change (GUPnPLinuxContextManager *self, struct ifinfomsg *ifi) @@ -538,6 +569,8 @@ remove_device (GUPnPLinuxContextManager *self, #define NLMSG_IS_VALID(msg,len) \ (NLMSG_OK(msg,len) && (msg->nlmsg_type != NLMSG_DONE)) +/* Process the raw netlink message and dispatch to helper functions + * accordingly */ static void receive_netlink_message (GUPnPLinuxContextManager *self, GError **error) { @@ -690,6 +723,8 @@ create_netlink_socket (GUPnPLinuxContextManager *self, GError **error) return TRUE; } +/* public helper function to determine runtime-fallback depending on netlink + * availability. */ gboolean gupnp_linux_context_manager_is_available (void) { @@ -705,6 +740,8 @@ gupnp_linux_context_manager_is_available (void) return TRUE; } +/* GObject virtual functions */ + static void gupnp_linux_context_manager_init (GUPnPLinuxContextManager *self) { @@ -722,6 +759,7 @@ gupnp_linux_context_manager_init (GUPnPLinuxContextManager *self) (GDestroyNotify) network_device_free); } +/* Constructor, kicks off bootstrapping */ static void gupnp_linux_context_manager_constructed (GObject *object) { diff --git a/libgupnp/gupnp-linux-context-manager.h b/libgupnp/gupnp-linux-context-manager.h index 76b1f80..0f6658e 100644 --- a/libgupnp/gupnp-linux-context-manager.h +++ b/libgupnp/gupnp-linux-context-manager.h @@ -22,6 +22,9 @@ #ifndef __GUPNP_LINUX_CONTEXT_MANAGER_H__ #define __GUPNP_LINUX_CONTEXT_MANAGER_H__ +#include +#include + #include "gupnp-context-manager.h" G_BEGIN_DECLS diff --git a/libgupnp/gupnp-network-manager.c b/libgupnp/gupnp-network-manager.c index 3b4e424..f9c304e 100644 --- a/libgupnp/gupnp-network-manager.c +++ b/libgupnp/gupnp-network-manager.c @@ -714,12 +714,7 @@ gupnp_network_manager_dispose (GObject *object) priv->manager_proxy = NULL; } - if (priv->nm_devices != NULL) { - g_list_foreach (priv->nm_devices, (GFunc) nm_device_unref, - NULL); - g_list_free (priv->nm_devices); - priv->nm_devices = NULL; - } + g_list_free_full (priv->nm_devices, (GDestroyNotify) nm_device_unref); if (priv->cancellable != NULL) { g_object_unref (priv->cancellable); diff --git a/libgupnp/gupnp-resource-factory.c b/libgupnp/gupnp-resource-factory.c index 0ff9aea..3a65b4d 100644 --- a/libgupnp/gupnp-resource-factory.c +++ b/libgupnp/gupnp-resource-factory.c @@ -206,7 +206,8 @@ gupnp_resource_factory_create_device_proxy * @element: The #xmlNode ponting to the right service element * @location: The location of the service description file * @udn: The UDN of the device the service is contained in - * @service_type: The service type + * @service_type: (allow-none): The service type, or %NULL to use service + * type from @element * @url_base: The URL base for this service, or %NULL if none * * Create a #GUPnPServiceProxy for the service with element @element, as @@ -225,6 +226,7 @@ gupnp_resource_factory_create_service_proxy const char *location, const SoupURI *url_base) { + char *type_from_xml = NULL; GUPnPServiceProxy *proxy; GType proxy_type = GUPNP_TYPE_SERVICE_PROXY; @@ -235,6 +237,13 @@ gupnp_resource_factory_create_service_proxy g_return_val_if_fail (location != NULL, NULL); g_return_val_if_fail (url_base != NULL, NULL); + if (!service_type) { + type_from_xml = + xml_util_get_child_element_content_glib (element, + "serviceType"); + service_type = type_from_xml; + } + if (service_type) { gpointer value; @@ -254,6 +263,8 @@ gupnp_resource_factory_create_service_proxy "element", element, NULL); + g_free (type_from_xml); + return proxy; } diff --git a/libgupnp/gupnp-root-device.c b/libgupnp/gupnp-root-device.c index 1e46798..fe6affc 100644 --- a/libgupnp/gupnp-root-device.c +++ b/libgupnp/gupnp-root-device.c @@ -481,6 +481,8 @@ gupnp_root_device_class_init (GUPnPRootDeviceClass *klass) * GUPnPRootDevice:description-doc: * * Device description document. Constructor property. + * + * Since: 0.13.0 **/ g_object_class_install_property (object_class, @@ -500,6 +502,8 @@ gupnp_root_device_class_init (GUPnPRootDeviceClass *klass) * * The path to device description document. This could either be an * absolute path or path relative to GUPnPRootDevice:description-dir. + * + * Since: 0.13.0 **/ g_object_class_install_property (object_class, @@ -706,6 +710,8 @@ gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device) * Get the #GSSDPResourceGroup used by @root_device. * * Returns: (transfer none): The #GSSDPResourceGroup of @root_device. + * + * Since: 0.19.2 **/ GSSDPResourceGroup * gupnp_root_device_get_ssdp_resource_group (GUPnPRootDevice *root_device) diff --git a/libgupnp/gupnp-service-info.c b/libgupnp/gupnp-service-info.c index 1da6c19..7e84303 100644 --- a/libgupnp/gupnp-service-info.c +++ b/libgupnp/gupnp-service-info.c @@ -77,12 +77,18 @@ typedef struct { GUPnPServiceIntrospectionCallback callback; gpointer user_data; + GCancellable *cancellable; + gulong cancelled_id; + SoupMessage *message; } GetSCPDURLData; static void get_scpd_url_data_free (GetSCPDURLData *data) { + if (data->cancellable) + g_object_unref (data->cancellable); + g_slice_free (GetSCPDURLData, data); } @@ -187,6 +193,10 @@ gupnp_service_info_dispose (GObject *object) data = info->priv->pending_gets->data; + if (data->cancellable) + g_cancellable_disconnect (data->cancellable, + data->cancelled_id); + soup_session_cancel_message (session, data->message, SOUP_STATUS_CANCELLED); @@ -649,6 +659,12 @@ got_scpd_url (G_GNUC_UNUSED SoupSession *session, } else error = _gupnp_error_new_server_error (msg); + /* prevent the callback from canceling the cancellable + * (and so freeing data just before we do) */ + if (data->cancellable) + g_cancellable_disconnect (data->cancellable, + data->cancelled_id); + data->info->priv->pending_gets = g_list_remove (data->info->priv->pending_gets, data); @@ -663,6 +679,38 @@ got_scpd_url (G_GNUC_UNUSED SoupSession *session, get_scpd_url_data_free (data); } +static void +cancellable_cancelled_cb (GCancellable *cancellable, + gpointer user_data) +{ + GUPnPServiceInfo *info; + GetSCPDURLData *data; + SoupSession *session; + GError *error; + + data = user_data; + info = data->info; + + session = gupnp_context_get_session (info->priv->context); + soup_session_cancel_message (session, + data->message, + SOUP_STATUS_CANCELLED); + + info->priv->pending_gets = + g_list_remove (info->priv->pending_gets, data); + + error = g_error_new (G_IO_ERROR, + G_IO_ERROR_CANCELLED, + "The call was canceled"); + + data->callback (data->info, + NULL, + error, + data->user_data); + + get_scpd_url_data_free (data); +} + /** * gupnp_service_info_get_introspection_async: * @info: A #GUPnPServiceInfo @@ -679,6 +727,35 @@ gupnp_service_info_get_introspection_async GUPnPServiceIntrospectionCallback callback, gpointer user_data) { + gupnp_service_info_get_introspection_async_full (info, + callback, + NULL, + user_data); +} + +/** + * gupnp_service_info_get_introspection_async_full: + * @info: A #GUPnPServiceInfo + * @callback: (scope async) : callback to be called when introspection object is ready. + * @cancellable: GCancellable that can be used to cancel the call, or %NULL. + * @user_data: user_data to be passed to the callback. + * + * Note that introspection object is created from the information in service + * description document (SCPD) provided by the service so it can not be created + * if the service does not provide an SCPD. + * + * If @cancellable is used to cancel the call, @callback will be called with + * error code %G_IO_ERROR_CANCELLED. + * + * Since: 0.20.9. + **/ +void +gupnp_service_info_get_introspection_async_full + (GUPnPServiceInfo *info, + GUPnPServiceIntrospectionCallback callback, + GCancellable *cancellable, + gpointer user_data) +{ GetSCPDURLData *data; char *scpd_url; SoupSession *session; @@ -729,4 +806,14 @@ gupnp_service_info_get_introspection_async data->message, (SoupSessionCallback) got_scpd_url, data); + + data->cancellable = cancellable; + if (data->cancellable) { + g_object_ref (cancellable); + data->cancelled_id = g_cancellable_connect + (data->cancellable, + G_CALLBACK (cancellable_cancelled_cb), + data, + NULL); + } } diff --git a/libgupnp/gupnp-service-info.h b/libgupnp/gupnp-service-info.h index c81c29e..3fe2b3e 100644 --- a/libgupnp/gupnp-service-info.h +++ b/libgupnp/gupnp-service-info.h @@ -133,6 +133,13 @@ gupnp_service_info_get_introspection_async GUPnPServiceIntrospectionCallback callback, gpointer user_data); +void +gupnp_service_info_get_introspection_async_full + (GUPnPServiceInfo *info, + GUPnPServiceIntrospectionCallback callback, + GCancellable *cancellable, + gpointer user_data); + G_END_DECLS #endif /* __GUPNP_SERVICE_INFO_H__ */ diff --git a/libgupnp/gupnp-service-introspection.c b/libgupnp/gupnp-service-introspection.c index ebcc7a2..4453495 100644 --- a/libgupnp/gupnp-service-introspection.c +++ b/libgupnp/gupnp-service-introspection.c @@ -95,10 +95,8 @@ gupnp_service_state_variable_info_free g_value_unset (&variable->maximum); g_value_unset (&variable->step); } - g_list_foreach (variable->allowed_values, - (GFunc) g_free, - NULL); - g_list_free (variable->allowed_values); + + g_list_free_full (variable->allowed_values, g_free); g_slice_free (GUPnPServiceStateVariableInfo, variable); } @@ -164,12 +162,8 @@ gupnp_service_action_info_free (GUPnPServiceActionInfo *action_info) GList *iter; g_free (action_info->name); - - for (iter = action_info->arguments; iter; iter = iter->next) { - gupnp_service_action_arg_info_free ( - (GUPnPServiceActionArgInfo *) iter->data); - } - g_list_free (action_info->arguments); + g_list_free_full (action_info->arguments, + (GDestroyNotify) gupnp_service_action_arg_info_free); g_slice_free (GUPnPServiceActionInfo, action_info); } @@ -180,23 +174,19 @@ gupnp_service_introspection_finalize (GObject *object) introspection = GUPNP_SERVICE_INTROSPECTION (object); - if (introspection->priv->variables) { - g_list_foreach (introspection->priv->variables, - (GFunc) gupnp_service_state_variable_info_free, - NULL); - g_list_free (introspection->priv->variables); - } + g_list_free_full (introspection->priv->variables, + (GDestroyNotify) gupnp_service_state_variable_info_free); - if (introspection->priv->actions) { - g_list_foreach (introspection->priv->actions, - (GFunc) gupnp_service_action_info_free, - NULL); - g_list_free (introspection->priv->actions); - } + g_list_free_full (introspection->priv->actions, + (GDestroyNotify) gupnp_service_action_info_free); + /* Contents don't need to be freed, they were owned by priv->variables + */ if (introspection->priv->variable_names) g_list_free (introspection->priv->variable_names); + /* Contents don't need to be freed, they were owned by priv->actions + */ if (introspection->priv->action_names) g_list_free (introspection->priv->action_names); } diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c index 6a06598..7a48ac9 100644 --- a/libgupnp/gupnp-service-proxy.c +++ b/libgupnp/gupnp-service-proxy.c @@ -94,13 +94,15 @@ struct _GUPnPServiceProxyAction { }; typedef struct { - GType type; + GType type; /* type of the variable this notification is for */ - GList *callbacks; + GList *callbacks; /* list of CallbackData */ + GList *next_emit; /* pointer into callbacks as which callback to call next*/ } NotifyData; typedef struct { GUPnPServiceProxyNotifyCallback callback; + GDestroyNotify notify; gpointer user_data; } CallbackData; @@ -133,9 +135,19 @@ gupnp_service_proxy_action_free (GUPnPServiceProxyAction *action) } static void +callback_data_free (CallbackData *data) +{ + if (data->notify) + data->notify (data->user_data); + + g_slice_free (CallbackData, data); +} + +static void notify_data_free (NotifyData *data) { - g_list_free (data->callbacks); + g_list_free_full (data->callbacks, + (GDestroyNotify) callback_data_free); g_slice_free (NotifyData, data); } @@ -282,12 +294,9 @@ gupnp_service_proxy_dispose (GObject *object) proxy->priv->notify_idle_src = NULL; } - while (proxy->priv->pending_notifies) { - emit_notify_data_free (proxy->priv->pending_notifies->data); - proxy->priv->pending_notifies = - g_list_delete_link (proxy->priv->pending_notifies, - proxy->priv->pending_notifies); - } + g_list_free_full (proxy->priv->pending_notifies, + (GDestroyNotify) emit_notify_data_free); + proxy->priv->pending_notifies = NULL; /* Call super */ object_class = G_OBJECT_CLASS (gupnp_service_proxy_parent_class); @@ -370,7 +379,7 @@ gupnp_service_proxy_class_init (GUPnPServiceProxyClass *klass) * gupnp_service_proxy_send_action: * @proxy: A #GUPnPServiceProxy * @action: An action - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @...: tuples of in parameter name, in parameter type, and in parameter * value, followed by %NULL, and then tuples of out parameter name, * out parameter type, and out parameter value location, terminated with %NULL @@ -462,7 +471,7 @@ stop_main_loop (G_GNUC_UNUSED GUPnPServiceProxy *proxy, /* Initializes hash table to hold arg names as keys and GValues of * given type and value. */ -#define VAR_ARGS_TO_IN_HASH_TABLE(var_args, hash) \ +#define VAR_ARGS_TO_IN_LIST(var_args, names, values) \ G_STMT_START { \ const gchar *arg_name = va_arg (var_args, const gchar *); \ \ @@ -477,7 +486,8 @@ stop_main_loop (G_GNUC_UNUSED GUPnPServiceProxy *proxy, G_VALUE_NOCOPY_CONTENTS, \ &error); \ if (error == NULL) { \ - g_hash_table_insert (hash, g_strdup (arg_name), value); \ + names = g_list_prepend (names, g_strdup (arg_name)); \ + values = g_list_prepend (values, value); \ } else { \ g_warning ("Failed to collect value of type %s for %s: %s", \ g_type_name (type), \ @@ -487,6 +497,8 @@ stop_main_loop (G_GNUC_UNUSED GUPnPServiceProxy *proxy, } \ arg_name = va_arg (var_args, const gchar *); \ } \ + names = g_list_reverse (names); \ + values = g_list_reverse (values); \ } G_STMT_END /* Puts values stored in hash table with GValues into var args. @@ -538,7 +550,7 @@ value_free (gpointer data) * gupnp_service_proxy_send_action_valist: * @proxy: A #GUPnPServiceProxy * @action: An action - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @var_args: va_list of tuples of in parameter name, in parameter type, and in * parameter value, followed by %NULL, and then tuples of out parameter name, * out parameter type, and out parameter value location @@ -553,20 +565,22 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, GError **error, va_list var_args) { - GHashTable *in_hash; - GHashTable *out_hash; + GList *in_names = NULL, *in_values = NULL; + GHashTable *out_hash = NULL; va_list var_args_copy; gboolean result; GError *local_error; + GMainLoop *main_loop; + GUPnPServiceProxyAction *handle; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); - in_hash = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - value_free); - VAR_ARGS_TO_IN_HASH_TABLE (var_args, in_hash); + + main_loop = g_main_loop_new (g_main_context_get_thread_default (), + TRUE); + + VAR_ARGS_TO_IN_LIST (var_args, in_names, in_values); G_VA_COPY (var_args_copy, var_args); out_hash = g_hash_table_new_full (g_str_hash, g_str_equal, @@ -606,7 +620,8 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, } out: va_end (var_args_copy); - g_hash_table_unref (in_hash); + g_list_free_full (in_names, g_free); + g_list_free_full (in_values, value_free); g_hash_table_unref (out_hash); return result; @@ -616,7 +631,7 @@ out: * gupnp_service_proxy_send_action_hash: * @proxy: A #GUPnPServiceProxy * @action: An action - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @in_hash: (element-type utf8 GValue) (transfer none): A #GHashTable of in * parameter name and #GValue pairs * @out_hash: (inout) (element-type utf8 GValue) (transfer full): A #GHashTable @@ -625,7 +640,13 @@ out: * See gupnp_service_proxy_send_action(); this version takes a pair of * #GHashTables for runtime determined parameter lists. * + * Do not use this function in newly written code; it cannot guarantee the + * order of arguments and thus breaks interaction with many devices. + * * Return value: %TRUE if sending the action was succesful. + * + * Deprecated: 0.20.9: Use gupnp_service_proxy_send_action() or + * gupnp_service_proxy_send_action_list() **/ gboolean gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, @@ -643,11 +664,13 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, main_loop = g_main_loop_new (g_main_context_get_thread_default (), TRUE); + G_GNUC_BEGIN_IGNORE_DEPRECATIONS handle = gupnp_service_proxy_begin_action_hash (proxy, action, stop_main_loop, main_loop, in_hash); + G_GNUC_END_IGNORE_DEPRECATIONS if (!handle) { g_main_loop_unref (main_loop); @@ -671,9 +694,9 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, /** * gupnp_service_proxy_send_action_list: - * @proxy: (transfer none) : A #GUPnPServiceProxy + * @proxy: A #GUPnPServiceProxy * @action: An action - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @in_names: (element-type utf8) (transfer none): #GList of 'in' parameter * names (as strings) * @in_values: (element-type GValue) (transfer none): #GList of values (as @@ -689,6 +712,8 @@ gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, * #gupnp_service_proxy_end_action_list. * * Return value: %TRUE if sending the action was succesful. + * + * Since: 0.13.3 **/ gboolean gupnp_service_proxy_send_action_list (GUPnPServiceProxy *proxy, @@ -964,6 +989,16 @@ write_in_parameter (const char *arg_name, xml_util_end_element (msg_str, arg_name); } +static gboolean +action_error_idle_cb (gpointer user_data) +{ + GUPnPServiceProxyAction *action = (GUPnPServiceProxyAction *) user_data; + + action->callback (action->proxy, action, action->user_data); + + return FALSE; +} + /** * gupnp_service_proxy_begin_action_valist: * @proxy: A #GUPnPServiceProxy @@ -989,24 +1024,21 @@ gupnp_service_proxy_begin_action_valist va_list var_args) { GUPnPServiceProxyAction *ret; - GHashTable *in_hash; + GList *in_names = NULL, *in_values = NULL; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), NULL); g_return_val_if_fail (action, NULL); g_return_val_if_fail (callback, NULL); - - in_hash = g_hash_table_new_full (g_str_hash, - g_str_equal, - g_free, - value_free); - VAR_ARGS_TO_IN_HASH_TABLE (var_args, in_hash); - ret = gupnp_service_proxy_begin_action_hash (proxy, + VAR_ARGS_TO_IN_LIST (var_args, in_names, in_values); + ret = gupnp_service_proxy_begin_action_list (proxy, action, + in_names, + in_values, callback, - user_data, - in_hash); - g_hash_table_unref (in_hash); + user_data); + g_list_free_full (in_names, g_free); + g_list_free_full (in_values, value_free); return ret; } @@ -1027,8 +1059,10 @@ gupnp_service_proxy_begin_action_valist * in-parameter names, types and values. * * Return value: (transfer none): A #GUPnPServiceProxyAction handle. This will - * be freed when calling #gupnp_service_proxy_cancel_action or - * #gupnp_service_proxy_end_action_list. + * be freed when calling gupnp_service_proxy_cancel_action() or + * gupnp_service_proxy_end_action_list(). + * + * Since: 0.13.3 **/ GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_list @@ -1054,7 +1088,7 @@ gupnp_service_proxy_begin_action_list ret = begin_action_msg (proxy, action, callback, user_data); if (ret->error) { - callback (proxy, ret, user_data); + g_idle_add (action_error_idle_cb, ret); return ret; } @@ -1090,9 +1124,16 @@ gupnp_service_proxy_begin_action_list * See gupnp_service_proxy_begin_action(); this version takes a #GHashTable * for runtime generated parameter lists. * + * Do not use this function in newly written code; it cannot guarantee the + * order of arguments and thus breaks interaction with many devices. + * * Return value: (transfer none): A #GUPnPServiceProxyAction handle. This will * be freed when calling gupnp_service_proxy_cancel_action() or * gupnp_service_proxy_end_action_hash(). + * + * Deprecated: 0.20.9: Use gupnp_service_proxy_send_action() or + * gupnp_service_proxy_send_action_list() + * **/ GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_hash @@ -1112,7 +1153,7 @@ gupnp_service_proxy_begin_action_hash ret = begin_action_msg (proxy, action, callback, user_data); if (ret->error) { - callback (proxy, ret, user_data); + g_idle_add (action_error_idle_cb, ret); return ret; } @@ -1130,14 +1171,14 @@ gupnp_service_proxy_begin_action_hash * gupnp_service_proxy_end_action: * @proxy: A #GUPnPServiceProxy * @action: A #GUPnPServiceProxyAction handle - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @...: tuples of out parameter name, out parameter type, and out parameter * value location, terminated with %NULL. The out parameter values should be * freed after use * * Retrieves the result of @action. The out parameters in @Varargs will be * filled in, and if an error occurred, @error will be set. In case of - * a UPnPError the error code will be the same in @error. + * an UPnP error the error code will be the same in @error. * * Return value: %TRUE on success. **/ @@ -1316,7 +1357,7 @@ read_out_parameter (const char *arg_name, * gupnp_service_proxy_end_action_valist: * @proxy: A #GUPnPServiceProxy * @action: A #GUPnPServiceProxyAction handle - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @var_args: A va_list of tuples of out parameter name, out parameter type, * and out parameter value location. The out parameter values should be * freed after use @@ -1367,7 +1408,7 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy, * gupnp_service_proxy_end_action_list: * @proxy: A #GUPnPServiceProxy * @action: A #GUPnPServiceProxyAction handle - * @error: The location where to store any error, or %NULL + * @error: (allow-none): The location where to store any error, or %NULL * @out_names: (element-type utf8) (transfer none): #GList of 'out' parameter * names (as strings) * @out_types: (element-type GType) (transfer none): #GList of types (as #GType) @@ -1404,11 +1445,7 @@ gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy, /* Check for saved error from begin_action() */ if (action->error) { - if (error) - *error = action->error; - else - g_error_free (action->error); - + g_propagate_error (error, action->error); gupnp_service_proxy_action_free (action); return FALSE; @@ -1475,11 +1512,7 @@ gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy, /* Check for saved error from begin_action() */ if (action->error) { - if (error) - *error = action->error; - else - g_error_free (action->error); - + g_propagate_error (error, action->error); gupnp_service_proxy_action_free (action); return FALSE; @@ -1539,7 +1572,7 @@ gupnp_service_proxy_cancel_action (GUPnPServiceProxy *proxy, } /** - * gupnp_service_proxy_add_notify: + * gupnp_service_proxy_add_notify: (skip) * @proxy: A #GUPnPServiceProxy * @variable: The variable to add notification for * @type: The type of the variable @@ -1557,6 +1590,39 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, GType type, GUPnPServiceProxyNotifyCallback callback, gpointer user_data) + +{ + return gupnp_service_proxy_add_notify_full (proxy, + variable, + type, + callback, + user_data, + NULL); +} + +/** + * gupnp_service_proxy_add_notify_full: (rename-to gupnp_service_proxy_add_notify) + * @proxy: A #GUPnPServiceProxy + * @variable: The variable to add notification for + * @type: The type of the variable + * @callback: (scope notified): The callback to call when @variable changes + * @user_data: User data for @callback + * @notify: (allow-none): Function to call when the notification is removed, or %NULL + * + * Sets up @callback to be called whenever a change notification for + * @variable is recieved. + * + * Since: 0.20.12 + * + * Return value: %TRUE on success. + **/ +gboolean +gupnp_service_proxy_add_notify_full (GUPnPServiceProxy *proxy, + const char *variable, + GType type, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data, + GDestroyNotify notify) { NotifyData *data; CallbackData *callback_data; @@ -1574,6 +1640,7 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, data->type = type; data->callbacks = NULL; + data->next_emit = NULL; g_hash_table_insert (proxy->priv->notify_hash, g_strdup (variable), @@ -1596,13 +1663,48 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, callback_data->callback = callback; callback_data->user_data = user_data; + callback_data->notify = notify; data->callbacks = g_list_append (data->callbacks, callback_data); + if (data->next_emit == NULL) + data->next_emit = g_list_last (data->callbacks); + return TRUE; } /** + * gupnp_service_proxy_add_raw_notify: + * @proxy: A #GUPnPServiceProxy + * @callback: (scope notified): The callback to call when the peer issues any + * variable notification. + * @user_data: User data for @callback + * @notify: (allow-none): A #GDestroyNotify for @user_data + * + * Get a notification for anything that happens on the peer. @value in + * @callback will be of type #G_TYPE_POINTER and contain the pre-parsed + * #xmlDoc. Do NOT free or modify this document. + * + * Return value: %TRUE on success. + * + * Since: 0.20.12 + **/ +gboolean +gupnp_service_proxy_add_raw_notify (GUPnPServiceProxy *proxy, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data, + GDestroyNotify notify) +{ + return gupnp_service_proxy_add_notify_full (proxy, + "*", + G_TYPE_NONE, + callback, + user_data, + notify); +} + + +/** * gupnp_service_proxy_remove_notify: * @proxy: A #GUPnPServiceProxy * @variable: The variable to add notification for @@ -1611,9 +1713,10 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, * * Cancels the variable change notification for @callback and @user_data. * - * This function must not be called directly or indirectly from a - * #GUPnPServiceProxyNotifyCallback associated with this service proxy, even - * if it is for another variable. + * Up to version 0.20.9 this function must not be called directlya or + * indirectly from a #GUPnPServiceProxyNotifyCallback associated with this + * service proxy, even if it is for another variable. In later versions such + * calls are allowed. * * Return value: %TRUE on success. **/ @@ -1650,8 +1753,12 @@ gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, if (callback_data->callback == callback && callback_data->user_data == user_data) { + /* Gotcha! */ - g_slice_free (CallbackData, callback_data); + callback_data_free (callback_data); + + if (data->next_emit == l) + data->next_emit = data->next_emit->next; data->callbacks = g_list_delete_link (data->callbacks, l); @@ -1673,6 +1780,31 @@ gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, return found; } +/** + * gupnp_service_proxy_remove_raw_notify: + * @proxy: A #GUPnPServiceProxy + * @callback: (scope call): The callback to call when @variable changes + * @user_data: User data for @callback + * + * Cancels the variable change notification for @callback and @user_data. + * + * This function must not be called directly or indirectly from a + * #GUPnPServiceProxyNotifyCallback associated with this service proxy, even + * if it is for another variable. + * + * Return value: %TRUE on success. + **/ +gboolean +gupnp_service_proxy_remove_raw_notify (GUPnPServiceProxy *proxy, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data) +{ + return gupnp_service_proxy_remove_notify (proxy, + "*", + callback, + user_data); +} + static void emit_notification (GUPnPServiceProxy *proxy, xmlNode *var_node) @@ -1694,11 +1826,13 @@ emit_notification (GUPnPServiceProxy *proxy, return; } - /* Call callbacks */ - for (l = data->callbacks; l; l = l->next) { + /* Call callbacks. Note that data->next_emit may change if + * callback calls remove_notify() or add_notify() */ + for (l = data->callbacks; l; l = data->next_emit) { CallbackData *callback_data; callback_data = l->data; + data->next_emit = l->next; callback_data->callback (proxy, (const char *) var_node->name, @@ -1714,6 +1848,7 @@ static void emit_notifications_for_doc (GUPnPServiceProxy *proxy, xmlDoc *doc) { + NotifyData *data = NULL; xmlNode *node; node = xmlDocGetRootElement (doc); @@ -1734,6 +1869,26 @@ emit_notifications_for_doc (GUPnPServiceProxy *proxy, emit_notification (proxy, var_node); } } + + data = g_hash_table_lookup (proxy->priv->notify_hash, "*"); + if (data != NULL) { + GValue value = {0, }; + GList *it = NULL; + + g_value_init (&value, G_TYPE_POINTER); + g_value_set_pointer (&value, doc); + + for (it = data->callbacks; it != NULL; it = it->next) { + CallbackData *callback_data = it->data; + + callback_data->callback (proxy, + "*", + &value, + callback_data->user_data); + } + + g_value_unset (&value); + } } /* Emit pending notifications. See comment below on why we do this. */ @@ -1786,13 +1941,9 @@ emit_notifications (gpointer user_data) } /* Cleanup */ - while (proxy->priv->pending_notifies != NULL) { - emit_notify_data_free (proxy->priv->pending_notifies->data); - - proxy->priv->pending_notifies = - g_list_delete_link (proxy->priv->pending_notifies, - proxy->priv->pending_notifies); - } + g_list_free_full (proxy->priv->pending_notifies, + (GDestroyNotify) emit_notify_data_free); + proxy->priv->pending_notifies = NULL; proxy->priv->notify_idle_src = NULL; diff --git a/libgupnp/gupnp-service-proxy.h b/libgupnp/gupnp-service-proxy.h index a11057a..be7d240 100644 --- a/libgupnp/gupnp-service-proxy.h +++ b/libgupnp/gupnp-service-proxy.h @@ -130,13 +130,15 @@ gupnp_service_proxy_send_action_valist GError **error, va_list var_args); +#ifndef GUPNP_DISABLE_DEPRECATED gboolean gupnp_service_proxy_send_action_hash (GUPnPServiceProxy *proxy, const char *action, GError **error, GHashTable *in_hash, - GHashTable *out_hash); + GHashTable *out_hash) G_GNUC_DEPRECATED; +#endif gboolean @@ -174,13 +176,15 @@ gupnp_service_proxy_begin_action_list GUPnPServiceProxyActionCallback callback, gpointer user_data); +#ifndef GUPNP_DISABLE_DEPRECATED GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_hash (GUPnPServiceProxy *proxy, const char *action, GUPnPServiceProxyActionCallback callback, gpointer user_data, - GHashTable *hash); + GHashTable *hash) G_GNUC_DEPRECATED; +#endif gboolean gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy, @@ -223,11 +227,31 @@ gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, gpointer user_data); gboolean +gupnp_service_proxy_add_notify_full (GUPnPServiceProxy *proxy, + const char *variable, + GType type, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data, + GDestroyNotify notify); + +gboolean +gupnp_service_proxy_add_raw_notify (GUPnPServiceProxy *proxy, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data, + GDestroyNotify notify); + +gboolean gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, const char *variable, GUPnPServiceProxyNotifyCallback callback, gpointer user_data); +gboolean +gupnp_service_proxy_remove_raw_notify + (GUPnPServiceProxy *proxy, + GUPnPServiceProxyNotifyCallback callback, + gpointer user_data); + void gupnp_service_proxy_set_subscribed (GUPnPServiceProxy *proxy, gboolean subscribed); diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c index 459ed77..d971118 100644 --- a/libgupnp/gupnp-service.c +++ b/libgupnp/gupnp-service.c @@ -31,11 +31,13 @@ #include #include #include + #include "gupnp-service.h" #include "gupnp-root-device.h" #include "gupnp-context-private.h" #include "gupnp-marshal.h" #include "gupnp-error.h" +#include "gupnp-acl.h" #include "http-headers.h" #include "gena-protocol.h" #include "xml-util.h" @@ -166,11 +168,7 @@ subscription_data_free (SubscriptionData *data) } /* Further cleanup */ - while (data->callbacks) { - g_free (data->callbacks->data); - data->callbacks = g_list_delete_link (data->callbacks, - data->callbacks); - } + g_list_free_full (data->callbacks, g_free); g_free (data->sid); @@ -425,8 +423,10 @@ gupnp_service_action_get_valist (GUPnPServiceAction *action, * A variant of #gupnp_service_action_get that uses #GList instead of varargs. * * Return value: (element-type GValue) (transfer full): The values as #GList of - * #GValue. #g_list_free the returned list and #g_value_unset and #g_slice_free + * #GValue. g_list_free() the returned list and g_value_unset() and g_slice_free() * each element. + * + * Since: 0.13.3 **/ GList * gupnp_service_action_get_values (GUPnPServiceAction *action, @@ -497,19 +497,19 @@ gupnp_service_action_get_value (GUPnPServiceAction *action, } /** - * gupnp_service_action_get_gvalue: + * gupnp_service_action_get_gvalue: (rename-to gupnp_service_action_get_value) * @action: A #GUPnPServiceAction * @argument: The name of the argument to retrieve * @type: The type of argument to retrieve * * Retrieves the value of @argument into a GValue of type @type and returns it. * The method exists only and only to satify PyGI, please use - * #gupnp_service_action_get_value and ignore this if possible. + * gupnp_service_action_get_value() and ignore this if possible. * * Return value: (transfer full): Value as #GValue associated with @action. - * #g_value_unset and #g_slice_free it after usage. + * g_value_unset() and g_slice_free() it after usage. * - * Rename To: gupnp_service_action_get_value + * Since: 0.13.3 **/ GValue * gupnp_service_action_get_gvalue (GUPnPServiceAction *action, @@ -533,6 +533,8 @@ gupnp_service_action_get_gvalue (GUPnPServiceAction *action, * Get the number of IN arguments from the @action and return it. * * Return value: The number of IN arguments from the @action. + * + * Since: 0.17.0 */ guint gupnp_service_action_get_argument_count (GUPnPServiceAction *action) @@ -615,6 +617,8 @@ gupnp_service_action_set_valist (GUPnPServiceAction *action, * #GValues) that line up with @arg_names. * * Sets the specified action return values. + * + * Since: 0.13.3 **/ void gupnp_service_action_set_values (GUPnPServiceAction *action, @@ -791,6 +795,8 @@ gupnp_service_action_return_error (GUPnPServiceAction *action, * * Return value: (transfer full): #SoupMessage associated with @action. Unref * after using it. + * + * Since: 0.13.0 **/ SoupMessage * gupnp_service_action_get_message (GUPnPServiceAction *action) @@ -1302,6 +1308,8 @@ subscription_server_handler (G_GNUC_UNUSED SoupServer *server, gpointer user_data) { GUPnPService *service; + GUPnPContext *context; + GUPnPAcl *acl; const char *callback, *nt, *sid; service = GUPNP_SERVICE (user_data); @@ -1432,7 +1440,7 @@ gupnp_service_constructor (GType type, GObject *object; GUPnPServiceInfo *info; GUPnPContext *context; - SoupServer *server; + AclServerHandler *handler; char *url; char *path; @@ -1443,7 +1451,7 @@ gupnp_service_constructor (GType type, n_construct_params, construct_params); - info = GUPNP_SERVICE_INFO (object); + info = GUPNP_SERVICE_INFO (object); /* Get introspection and save state variable names */ gupnp_service_info_get_introspection_async (info, @@ -1452,21 +1460,28 @@ gupnp_service_constructor (GType type, /* Get server */ context = gupnp_service_info_get_context (info); - server = gupnp_context_get_server (context); /* Run listener on controlURL */ url = gupnp_service_info_get_control_url (info); path = path_from_url (url); - soup_server_add_handler (server, path, - control_server_handler, object, NULL); + handler = acl_server_handler_new (GUPNP_SERVICE (object), + context, + control_server_handler, + g_object_ref (object), + g_object_unref); + _gupnp_context_add_server_handler_with_data (context, path, handler); g_free (path); g_free (url); /* Run listener on eventSubscriptionURL */ url = gupnp_service_info_get_event_subscription_url (info); path = path_from_url (url); - soup_server_add_handler (server, path, - subscription_server_handler, object, NULL); + handler = acl_server_handler_new (GUPNP_SERVICE (object), + context, + subscription_server_handler, + g_object_ref (object), + g_object_unref); + _gupnp_context_add_server_handler_with_data (context, path, handler); g_free (path); g_free (url); @@ -1553,7 +1568,6 @@ gupnp_service_dispose (GObject *object) GObjectClass *object_class; GUPnPServiceInfo *info; GUPnPContext *context; - SoupServer *server; char *url; char *path; @@ -1562,19 +1576,18 @@ gupnp_service_dispose (GObject *object) /* Get server */ info = GUPNP_SERVICE_INFO (service); context = gupnp_service_info_get_context (info); - server = gupnp_context_get_server (context); /* Remove listener on controlURL */ url = gupnp_service_info_get_control_url (info); path = path_from_url (url); - soup_server_remove_handler (server, path); + gupnp_context_remove_server_handler (context, path); g_free (path); g_free (url); /* Remove listener on eventSubscriptionURL */ url = gupnp_service_info_get_event_subscription_url (info); path = path_from_url (url); - soup_server_remove_handler (server, path); + gupnp_context_remove_server_handler (context, path); g_free (path); g_free (url); @@ -1617,12 +1630,7 @@ gupnp_service_finalize (GObject *object) g_hash_table_destroy (service->priv->subscriptions); /* Free state variable list */ - while (service->priv->state_variables) { - g_free (service->priv->state_variables->data); - service->priv->state_variables = - g_list_delete_link (service->priv->state_variables, - service->priv->state_variables); - } + g_list_free_full (service->priv->state_variables, g_free); /* Free notify queue */ while ((data = g_queue_pop_head (service->priv->notify_queue))) @@ -1840,23 +1848,20 @@ notify_got_response (G_GNUC_UNUSED SoupSession *session, } else { /* Other failure: Try next callback or signal failure. */ if (data->callbacks->next) { - SoupURI *uri; - SoupSession *service_session; + SoupBuffer *buffer; + guint8 *property_set; + gsize length; /* Call next callback */ data->callbacks = data->callbacks->next; - uri = soup_uri_new (data->callbacks->data); - soup_message_set_uri (msg, uri); - soup_uri_free (uri); - - /* And re-queue */ - data->pending_messages = - g_list_prepend (data->pending_messages, msg); - - service_session = gupnp_service_get_session (data->service); - - soup_session_requeue_message (service_session, msg); + /* Get property-set from old message */ + buffer = soup_message_body_flatten (msg->request_body); + soup_buffer_get_data (buffer, + (const guint8 **) &property_set, + &length); + notify_subscriber (NULL, data, property_set); + soup_buffer_free (buffer); } else { /* Emit 'notify-failed' signal */ GError *error; diff --git a/libgupnp/gupnp-white-list.c b/libgupnp/gupnp-white-list.c index 599bd2e..67f96a2 100644 --- a/libgupnp/gupnp-white-list.c +++ b/libgupnp/gupnp-white-list.c @@ -27,6 +27,8 @@ * of entries that will be used to filter networks. * The #GUPnPWhiteList could be enabled or not. If it's enabled but the entries * list is empty, it behaves as disabled. + * + * Since: 0.20.5 */ #include @@ -143,6 +145,8 @@ gupnp_white_list_class_init (GUPnPWhiteListClass *klass) * GUPnPWhiteList:enabled: * * Whether this white list is active or not. + * + * Since: 0.20.5 **/ g_object_class_install_property (object_class, @@ -157,11 +161,11 @@ gupnp_white_list_class_init (GUPnPWhiteListClass *klass) G_PARAM_STATIC_STRINGS)); /** - * GUPnPWhiteList:entries: + * GUPnPWhiteList:entries: (type GList(utf8)) * * Whether this white list is active or not. - * Type: GList - * Transfer: none + * + * Since: 0.20.5 **/ g_object_class_install_property (object_class, @@ -182,6 +186,8 @@ gupnp_white_list_class_init (GUPnPWhiteListClass *klass) * The white list is disabled by default. * * Returns: (transfer full): A new #GUPnPWhiteList object. + * + * Since: 0.20.5 **/ GUPnPWhiteList * gupnp_white_list_new (void) @@ -195,7 +201,9 @@ gupnp_white_list_new (void) * @enable: %TRUE to enable @white_list, %FALSE otherwise * * Enable or disable the #GUPnPWhiteList to perform the network filtering. -**/ + * + * Since: 0.20.5 + **/ void gupnp_white_list_set_enabled (GUPnPWhiteList *white_list, gboolean enable) { @@ -212,6 +220,8 @@ gupnp_white_list_set_enabled (GUPnPWhiteList *white_list, gboolean enable) * Return the status of the #GUPnPWhiteList * * Return value: %TRUE if @white_list is enabled, %FALSE otherwise. + * + * Since: 0.20.5 **/ gboolean gupnp_white_list_get_enabled (GUPnPWhiteList *white_list) @@ -228,6 +238,8 @@ gupnp_white_list_get_enabled (GUPnPWhiteList *white_list) * Return the state of the entries list of #GUPnPWhiteList * * Return value: %TRUE if @white_list is empty, %FALSE otherwise. + * + * Since: 0.20.5 **/ gboolean gupnp_white_list_is_empty (GUPnPWhiteList *white_list) @@ -247,6 +259,8 @@ gupnp_white_list_is_empty (GUPnPWhiteList *white_list) * if @entry already exists, it won't be added a second time. * * Return value: %TRUE if @entry is added, %FALSE otherwise. + * + * Since: 0.20.5 **/ gboolean gupnp_white_list_add_entry (GUPnPWhiteList *white_list, gchar* entry) @@ -272,6 +286,29 @@ gupnp_white_list_add_entry (GUPnPWhiteList *white_list, gchar* entry) } /** + * gupnp_white_list_add_entryv: + * @white_list: A #GUPnPWhiteList + * @entries: (array zero-terminated=1): A %NULL-terminated list of strings + * + * Add a list of entries to a #GUPnPWhiteList. This is a helper function to + * directly add a %NULL-terminated array of string usually aquired from + * commandline args. + * + * Since: 0.20.8 + */ +void +gupnp_white_list_add_entryv (GUPnPWhiteList *white_list, gchar **entries) +{ + gchar * const * iter = entries; + + g_return_if_fail (GUPNP_IS_WHITE_LIST (white_list)); + g_return_if_fail ((entries != NULL)); + + for (; *iter != NULL; iter++) + gupnp_white_list_add_entry (white_list, *iter); + } + +/** * gupnp_white_list_remove_entry: * @white_list: A #GUPnPWhiteList * @entry: A value to remove from the filter list. @@ -280,6 +317,8 @@ gupnp_white_list_add_entry (GUPnPWhiteList *white_list, gchar* entry) * filter networks. * * Return value: %TRUE if @entry is removed, %FALSE otherwise. + * + * Since: 0.20.5 **/ gboolean gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry) @@ -297,7 +336,7 @@ gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry) if (s_entry != NULL) { priv->entries = g_list_remove_link (priv->entries, s_entry); - g_list_free_full (s_entry, g_free); + g_list_free_full (s_entry, g_free); g_object_notify (G_OBJECT (white_list), "entries"); } @@ -313,6 +352,8 @@ gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, gchar* entry) * Return value: (element-type utf8) (transfer none): a #GList of entries * used to filter networks, interfaces,... or %NULL. * Do not modify or free the list nor its elements. + * + * Since: 0.20.5 **/ GList * gupnp_white_list_get_entries (GUPnPWhiteList *white_list) @@ -329,7 +370,9 @@ gupnp_white_list_get_entries (GUPnPWhiteList *white_list) * Remove all entries from #GList that compose the white list. * The list is now empty. Even if #GUPnPWhiteList is enabled, it will have the * same behavior as if it was disabled. -**/ + * + * Since: 0.20.5 + **/ void gupnp_white_list_clear (GUPnPWhiteList *white_list) { @@ -355,6 +398,8 @@ gupnp_white_list_clear (GUPnPWhiteList *white_list) * * Return value: %TRUE if @context is matching the @white_list criterias, * %FALSE otherwise. + * + * Since: 0.20.5 **/ gboolean gupnp_white_list_check_context (GUPnPWhiteList *white_list, diff --git a/libgupnp/gupnp-white-list.h b/libgupnp/gupnp-white-list.h index 9b21b12..8c3ad5d 100644 --- a/libgupnp/gupnp-white-list.h +++ b/libgupnp/gupnp-white-list.h @@ -87,6 +87,9 @@ gupnp_white_list_is_empty (GUPnPWhiteList *white_list); gboolean gupnp_white_list_add_entry (GUPnPWhiteList *white_list, gchar* entry); +void +gupnp_white_list_add_entryv (GUPnPWhiteList *white_list, + gchar** entries); gboolean gupnp_white_list_remove_entry (GUPnPWhiteList *white_list, diff --git a/libgupnp/gupnp-xml-doc.c b/libgupnp/gupnp-xml-doc.c index fae4fa1..9c4740a 100644 --- a/libgupnp/gupnp-xml-doc.c +++ b/libgupnp/gupnp-xml-doc.c @@ -28,6 +28,8 @@ * * GObject wrapper for xmlDoc, so that we can use refcounting and weak * references. + * + * Since: 0.13.0 */ #include @@ -73,6 +75,8 @@ gupnp_xml_doc_class_init (GUPnPXMLDocClass *klass) * Create a new #GUPnPXMLDoc for @xml_doc. * * Return value: A new #GUPnPXMLDoc, or %NULL on an error + * + * Since: 0.13.0 **/ GUPnPXMLDoc * gupnp_xml_doc_new (xmlDoc *xml_doc) @@ -96,6 +100,8 @@ gupnp_xml_doc_new (xmlDoc *xml_doc) * Create a new #GUPnPXMLDoc for the XML document at @path. * * Return value: A new #GUPnPXMLDoc, or %NULL on an error + * + * Since: 0.13.0 **/ GUPnPXMLDoc * gupnp_xml_doc_new_from_path (const char *path, diff --git a/libgupnp/gupnp.h b/libgupnp/gupnp.h index 42ef2a8..10a3fe7 100644 --- a/libgupnp/gupnp.h +++ b/libgupnp/gupnp.h @@ -19,6 +19,7 @@ * Boston, MA 02110-1301, USA. */ +#include "gupnp-acl.h" #include "gupnp-context.h" #include "gupnp-context-manager.h" #include "gupnp-control-point.h" diff --git a/m4/gtk-doc.m4 b/m4/gtk-doc.m4 index 0ada151..3675543 100644 --- a/m4/gtk-doc.m4 +++ b/m4/gtk-doc.m4 @@ -1,6 +1,6 @@ dnl -*- mode: autoconf -*- -# serial 1 +# serial 2 dnl Usage: dnl GTK_DOC_CHECK([minimum-gtk-doc-version]) @@ -10,8 +10,24 @@ AC_DEFUN([GTK_DOC_CHECK], AC_BEFORE([AC_PROG_LIBTOOL],[$0])dnl setup libtool first AC_BEFORE([AM_PROG_LIBTOOL],[$0])dnl setup libtool first + ifelse([$1],[],[gtk_doc_requires="gtk-doc"],[gtk_doc_requires="gtk-doc >= $1"]) + AC_MSG_CHECKING([for gtk-doc]) + PKG_CHECK_EXISTS([$gtk_doc_requires],[have_gtk_doc=yes],[have_gtk_doc=no]) + AC_MSG_RESULT($have_gtk_doc) + + if test "$have_gtk_doc" = "no"; then + AC_MSG_WARN([ + You will not be able to create source packages with 'make dist' + because $gtk_doc_requires is not found.]) + fi + dnl check for tools we added during development - AC_PATH_PROG([GTKDOC_CHECK],[gtkdoc-check]) + dnl Use AC_CHECK_PROG to avoid the check target using an absolute path that + dnl may not be writable by the user. Currently, automake requires that the + dnl test name must end in '.test'. + dnl https://bugzilla.gnome.org/show_bug.cgi?id=701638 + AC_CHECK_PROG([GTKDOC_CHECK],[gtkdoc-check],[gtkdoc-check.test]) + AC_PATH_PROG([GTKDOC_CHECK_PATH],[gtkdoc-check]) AC_PATH_PROGS([GTKDOC_REBASE],[gtkdoc-rebase],[true]) AC_PATH_PROG([GTKDOC_MKPDF],[gtkdoc-mkpdf]) @@ -28,22 +44,22 @@ AC_DEFUN([GTK_DOC_CHECK], [use gtk-doc to build documentation [[default=no]]]),, [enable_gtk_doc=no]) - if test x$enable_gtk_doc = xyes; then - ifelse([$1],[], - [PKG_CHECK_EXISTS([gtk-doc],, - AC_MSG_ERROR([gtk-doc not installed and --enable-gtk-doc requested]))], - [PKG_CHECK_EXISTS([gtk-doc >= $1],, - AC_MSG_ERROR([You need to have gtk-doc >= $1 installed to build $PACKAGE_NAME]))]) - dnl don't check for glib if we build glib - if test "x$PACKAGE_NAME" != "xglib"; then - dnl don't fail if someone does not have glib - PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,) - fi - fi - AC_MSG_CHECKING([whether to build gtk-doc documentation]) AC_MSG_RESULT($enable_gtk_doc) + if test "x$enable_gtk_doc" = "xyes" && test "$have_gtk_doc" = "no"; then + AC_MSG_ERROR([ + You must have $gtk_doc_requires installed to build documentation for + $PACKAGE_NAME. Please install gtk-doc or disable building the + documentation by adding '--disable-gtk-doc' to '[$]0'.]) + fi + + dnl don't check for glib if we build glib + if test "x$PACKAGE_NAME" != "xglib"; then + dnl don't fail if someone does not have glib + PKG_CHECK_MODULES(GTKDOC_DEPS, glib-2.0 >= 2.10.0 gobject-2.0 >= 2.10.0,,[:]) + fi + dnl enable/disable output formats AC_ARG_ENABLE([gtk-doc-html], AS_HELP_STRING([--enable-gtk-doc-html], @@ -58,7 +74,12 @@ AC_DEFUN([GTK_DOC_CHECK], enable_gtk_doc_pdf=no fi + if test -z "$AM_DEFAULT_VERBOSITY"; then + AM_DEFAULT_VERBOSITY=1 + fi + AC_SUBST([AM_DEFAULT_VERBOSITY]) + AM_CONDITIONAL([HAVE_GTK_DOC], [test x$have_gtk_doc = xyes]) AM_CONDITIONAL([ENABLE_GTK_DOC], [test x$enable_gtk_doc = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_HTML], [test x$enable_gtk_doc_html = xyes]) AM_CONDITIONAL([GTK_DOC_BUILD_PDF], [test x$enable_gtk_doc_pdf = xyes]) diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 02b4bbe..d7c043f 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -1312,7 +1312,7 @@ ia64-*-hpux*) rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1333,7 +1333,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) ;; esac ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1352,7 +1355,10 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) diff --git a/packaging/GUPnP.changes b/packaging/GUPnP.changes deleted file mode 100644 index 11bc645..0000000 --- a/packaging/GUPnP.changes +++ /dev/null @@ -1,20 +0,0 @@ -* Wed Aug 21 2013 Regis Merlino -- Update gupnp to 0.20.5 (fdeb6f9f) - -* Tue Jul 16 00:01:36 UTC 2013 - tracy.graydon@intel.com -- Stripped old yaml cruft out of spec file - -* Tue Jun 11 2013 Regis Merlino -- Update gupnp to 0.20.3 (161969f) - -* Thu Apr 04 2013 Regis Merlino -- Fix browsing of WMP DMS running on Windows 7 - -* Wed Mar 20 2013 Regis Merlino -- Submit version 0.20.1 of GUPnP (4186015) - -* Tue Nov 27 10:22:57 CET 2012 - Mark Ryan -- Submit version 0.19.1 (24bd15c) of GUPnP - -* Wed Sep 12 13:42:24 CEST 2012 - Mark Ryan -- Submit version 0.18.0 (fcd9eb4) of GUPnP diff --git a/packaging/GUPnP.spec b/packaging/GUPnP.spec deleted file mode 100644 index bde84c1..0000000 --- a/packaging/GUPnP.spec +++ /dev/null @@ -1,95 +0,0 @@ -# -# Do NOT Edit the Auto-generated Part! -# Generated by: spectacle version 0.22 -# -# >> macros -# << macros - -Name: gupnp -Summary: GUPnP is an framework for creating UPnP devices & control points -Version: 0.20.5 -Release: 1 -Group: System/Libraries -License: LGPLv2+ -URL: http://www.gupnp.org/ -Source0: http://download.gnome.org/sources/%{name}/0.20/%{name}-%{version}.tar.bz2 -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(gio-2.0) -BuildRequires: pkgconfig(gmodule-2.0) -BuildRequires: pkgconfig(gssdp-1.0) -BuildRequires: pkgconfig(libsoup-2.4) -BuildRequires: pkgconfig(libxml-2.0) -BuildRequires: pkgconfig(uuid) - - -%description -GUPnP is an object-oriented open source framework for creating UPnP -devices and control points, written in C using GObject and libsoup. -The GUPnP API is intended to be easy to use, efficient and flexible. - - - -%package devel -Summary: Development package for gupnp -Group: Development/Libraries -Requires: %{name} = %{version}-%{release} - -%description devel -Files for development with gupnp. - - -%prep -%setup -q -n %{name}-%{version} - -# >> setup -# << setup - -%build -# >> build pre -# << build pre - -%configure --disable-static -make %{?jobs:-j%jobs} - -# >> build post -# << build post -%install -rm -rf %{buildroot} -# >> install pre -# << install pre -%make_install - -# >> install post -rm -rf $RPM_BUILD_ROOT%{_datadir}/gtk-doc -# << install post - - - -%post -p /sbin/ldconfig - -%postun -p /sbin/ldconfig - - - - - -%files -%defattr(-,root,root,-) -# >> files -%doc AUTHORS COPYING README -%{_libdir}/*.so.* -# << files - - -%files devel -%defattr(-,root,root,-) -# >> files devel -%{_libdir}/pkgconfig/gupnp-1.0.pc -%{_libdir}/*.so -%{_includedir}/gupnp-1.0 -%{_bindir}/gupnp-binding-tool -# << files devel - - diff --git a/tests/Makefile.in b/tests/Makefile.in index 9f8fcb1..1c9f138 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -56,7 +83,8 @@ noinst_PROGRAMS = test-browsing$(EXEEXT) test-proxy$(EXEEXT) \ test-server$(EXEEXT) test-introspection$(EXEEXT) \ test-white-list$(EXEEXT) subdir = tests -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -78,6 +106,7 @@ test_browsing_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am_test_introspection_OBJECTS = test-introspection.$(OBJEXT) test_introspection_OBJECTS = $(am_test_introspection_OBJECTS) test_introspection_DEPENDENCIES = \ @@ -99,6 +128,18 @@ test_white_list_OBJECTS = $(am_test_white_list_OBJECTS) test_white_list_DEPENDENCIES = \ $(top_builddir)/libgupnp/libgupnp-1.0.la $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -111,33 +152,30 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(test_browsing_SOURCES) $(test_introspection_SOURCES) \ $(test_proxy_SOURCES) $(test_server_SOURCES) \ $(test_white_list_SOURCES) DIST_SOURCES = $(test_browsing_SOURCES) $(test_introspection_SOURCES) \ $(test_proxy_SOURCES) $(test_server_SOURCES) \ $(test_white_list_SOURCES) -RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ - html-recursive info-recursive install-data-recursive \ - install-dvi-recursive install-exec-recursive \ - install-html-recursive install-info-recursive \ - install-pdf-recursive install-ps-recursive install-recursive \ - installcheck-recursive installdirs-recursive pdf-recursive \ - ps-recursive uninstall-recursive +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -145,9 +183,29 @@ am__can_run_installinfo = \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive -AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ - $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) @@ -204,17 +262,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -267,6 +325,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -399,18 +458,23 @@ clean-noinstPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + test-browsing$(EXEEXT): $(test_browsing_OBJECTS) $(test_browsing_DEPENDENCIES) $(EXTRA_test_browsing_DEPENDENCIES) @rm -f test-browsing$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_browsing_OBJECTS) $(test_browsing_LDADD) $(LIBS) + test-introspection$(EXEEXT): $(test_introspection_OBJECTS) $(test_introspection_DEPENDENCIES) $(EXTRA_test_introspection_DEPENDENCIES) @rm -f test-introspection$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_introspection_OBJECTS) $(test_introspection_LDADD) $(LIBS) + test-proxy$(EXEEXT): $(test_proxy_OBJECTS) $(test_proxy_DEPENDENCIES) $(EXTRA_test_proxy_DEPENDENCIES) @rm -f test-proxy$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_proxy_OBJECTS) $(test_proxy_LDADD) $(LIBS) + test-server$(EXEEXT): $(test_server_OBJECTS) $(test_server_DEPENDENCIES) $(EXTRA_test_server_DEPENDENCIES) @rm -f test-server$(EXEEXT) $(AM_V_CCLD)$(test_server_LINK) $(test_server_OBJECTS) $(test_server_LDADD) $(LIBS) + test-white-list$(EXEEXT): $(test_white_list_OBJECTS) $(test_white_list_DEPENDENCIES) $(EXTRA_test_white_list_DEPENDENCIES) @rm -f test-white-list$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_white_list_OBJECTS) $(test_white_list_LDADD) $(LIBS) @@ -432,14 +496,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -455,22 +519,25 @@ clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd -# into them and run `make' without going through this Makefile. -# To change the values of `make' variables: instead of editing Makefiles, -# (1) if the variable is set in `config.status', edit `config.status' -# (which will cause the Makefiles to be regenerated when you run `make'); -# (2) otherwise, pass the desired values on the `make' command line. -$(RECURSIVE_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ - list='$(SUBDIRS)'; for subdir in $$list; do \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ @@ -485,57 +552,12 @@ $(RECURSIVE_TARGETS): $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" -$(RECURSIVE_CLEAN_TARGETS): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ - dot_seen=no; \ - case "$@" in \ - distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ - *) list='$(SUBDIRS)' ;; \ - esac; \ - rev=''; for subdir in $$list; do \ - if test "$$subdir" = "."; then :; else \ - rev="$$subdir $$rev"; \ - fi; \ - done; \ - rev="$$rev ."; \ - target=`echo $@ | sed s/-recursive//`; \ - for subdir in $$rev; do \ - echo "Making $$target in $$subdir"; \ - if test "$$subdir" = "."; then \ - local_target="$$target-am"; \ - else \ - local_target="$$target"; \ - fi; \ - ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ - || eval $$failcom; \ - done && test -z "$$fail" -tags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ - done -ctags-recursive: - list='$(SUBDIRS)'; for subdir in $$list; do \ - test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ - done +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags -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: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ @@ -551,12 +573,7 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ - 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -568,15 +585,11 @@ TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$unique; \ fi; \ fi -ctags: CTAGS -CTAGS: ctags-recursive $(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; }; }'`; \ +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -585,6 +598,21 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags @@ -753,12 +781,11 @@ ps-am: uninstall-am: -.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \ - install-am install-strip tags-recursive +.MAKE: $(am__recursive_targets) install-am install-strip -.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ - all all-am check check-am clean clean-generic clean-libtool \ - clean-noinstPROGRAMS ctags ctags-recursive distclean \ +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + check-am clean clean-generic clean-libtool \ + clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ @@ -768,8 +795,8 @@ uninstall-am: install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-recursive \ - uninstall uninstall-am + mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ + uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/gtest/Makefile.am b/tests/gtest/Makefile.am index 2602a00..24f56a6 100644 --- a/tests/gtest/Makefile.am +++ b/tests/gtest/Makefile.am @@ -16,4 +16,4 @@ AM_CFLAGS = \ -I $(top_srcdir) \ -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST=data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml +EXTRA_DIST=data/random4k.bin data/TestService.xml data/TestDevice.xml diff --git a/tests/gtest/Makefile.in b/tests/gtest/Makefile.in index f527241..a57755d 100644 --- a/tests/gtest/Makefile.in +++ b/tests/gtest/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -15,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,7 +80,9 @@ host_triplet = @host@ target_triplet = @target@ check_PROGRAMS = test-context$(EXEEXT) test-bugs$(EXEEXT) subdir = tests/gtest -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(top_srcdir)/build-aux/depcomp \ + $(top_srcdir)/build-aux/test-driver ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -75,11 +104,24 @@ test_bugs_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent +am__v_lt_1 = am_test_context_OBJECTS = test-context.$(OBJEXT) test_context_OBJECTS = $(am_test_context_OBJECTS) test_context_LDADD = $(LDADD) test_context_DEPENDENCIES = $(top_builddir)/libgupnp/libgupnp-1.0.la \ $(am__DEPENDENCIES_1) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles @@ -92,20 +134,16 @@ LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -AM_V_at = $(am__v_at_@AM_V@) -am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) -am__v_at_0 = @ +am__v_CC_0 = @echo " CC " $@; +am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -AM_V_GEN = $(am__v_GEN_@AM_V@) -am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_CCLD_0 = @echo " CCLD " $@; +am__v_CCLD_1 = SOURCES = $(test_bugs_SOURCES) $(test_context_SOURCES) DIST_SOURCES = $(test_bugs_SOURCES) $(test_context_SOURCES) am__can_run_installinfo = \ @@ -113,10 +151,229 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -am__tty_colors = \ -red=; grn=; lgn=; blu=; std= +am__tty_colors_dummy = \ + mgn= red= grn= lgn= blu= brg= std=; \ + am__color_tests=no +am__tty_colors = { \ + $(am__tty_colors_dummy); \ + if test "X$(AM_COLOR_TESTS)" = Xno; then \ + am__color_tests=no; \ + elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ + am__color_tests=yes; \ + elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ + am__color_tests=yes; \ + fi; \ + if test $$am__color_tests = yes; then \ + red=''; \ + grn=''; \ + lgn=''; \ + blu=''; \ + mgn=''; \ + brg=''; \ + std=''; \ + fi; \ +} +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__recheck_rx = ^[ ]*:recheck:[ ]* +am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* +am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* +# A command that, given a newline-separated list of test names on the +# standard input, print the name of the tests that are to be re-run +# upon "make recheck". +am__list_recheck_tests = $(AWK) '{ \ + recheck = 1; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + { \ + if ((getline line2 < ($$0 ".log")) < 0) \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ + { \ + recheck = 0; \ + break; \ + } \ + else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ + { \ + break; \ + } \ + }; \ + if (recheck) \ + print $$0; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# A command that, given a newline-separated list of test names on the +# standard input, create the global log from their .trs and .log files. +am__create_global_log = $(AWK) ' \ +function fatal(msg) \ +{ \ + print "fatal: making $@: " msg | "cat >&2"; \ + exit 1; \ +} \ +function rst_section(header) \ +{ \ + print header; \ + len = length(header); \ + for (i = 1; i <= len; i = i + 1) \ + printf "="; \ + printf "\n\n"; \ +} \ +{ \ + copy_in_global_log = 1; \ + global_test_result = "RUN"; \ + while ((rc = (getline line < ($$0 ".trs"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".trs"); \ + if (line ~ /$(am__global_test_result_rx)/) \ + { \ + sub("$(am__global_test_result_rx)", "", line); \ + sub("[ ]*$$", "", line); \ + global_test_result = line; \ + } \ + else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ + copy_in_global_log = 0; \ + }; \ + if (copy_in_global_log) \ + { \ + rst_section(global_test_result ": " $$0); \ + while ((rc = (getline line < ($$0 ".log"))) != 0) \ + { \ + if (rc < 0) \ + fatal("failed to read from " $$0 ".log"); \ + print line; \ + }; \ + printf "\n"; \ + }; \ + close ($$0 ".trs"); \ + close ($$0 ".log"); \ +}' +# Restructured Text title. +am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } +# Solaris 10 'make', and several other traditional 'make' implementations, +# pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it +# by disabling -e (using the XSI extension "set +e") if it's set. +am__sh_e_setup = case $$- in *e*) set +e;; esac +# Default flags passed to test drivers. +am__common_driver_flags = \ + --color-tests "$$am__color_tests" \ + --enable-hard-errors "$$am__enable_hard_errors" \ + --expect-failure "$$am__expect_failure" +# To be inserted before the command running the test. Creates the +# directory for the log if needed. Stores in $dir the directory +# containing $f, in $tst the test, in $log the log. Executes the +# developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and +# passes TESTS_ENVIRONMENT. Set up options for the wrapper that +# will run the test scripts (or their associated LOG_COMPILER, if +# thy have one). +am__check_pre = \ +$(am__sh_e_setup); \ +$(am__vpath_adj_setup) $(am__vpath_adj) \ +$(am__tty_colors); \ +srcdir=$(srcdir); export srcdir; \ +case "$@" in \ + */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ + *) am__odir=.;; \ +esac; \ +test "x$$am__odir" = x"." || test -d "$$am__odir" \ + || $(MKDIR_P) "$$am__odir" || exit $$?; \ +if test -f "./$$f"; then dir=./; \ +elif test -f "$$f"; then dir=; \ +else dir="$(srcdir)/"; fi; \ +tst=$$dir$$f; log='$@'; \ +if test -n '$(DISABLE_HARD_ERRORS)'; then \ + am__enable_hard_errors=no; \ +else \ + am__enable_hard_errors=yes; \ +fi; \ +case " $(XFAIL_TESTS) " in \ + *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ + am__expect_failure=yes;; \ + *) \ + am__expect_failure=no;; \ +esac; \ +$(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) +# A shell command to get the names of the tests scripts with any registered +# extension removed (i.e., equivalently, the names of the test logs, with +# the '.log' extension removed). The result is saved in the shell variable +# '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, +# we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", +# since that might cause problem with VPATH rewrites for suffix-less tests. +# See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. +am__set_TESTS_bases = \ + bases='$(TEST_LOGS)'; \ + bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ + bases=`echo $$bases` +RECHECK_LOGS = $(TEST_LOGS) +AM_RECURSIVE_TARGETS = check recheck +TEST_SUITE_LOG = test-suite.log +TEST_EXTENSIONS = @EXEEXT@ .test +LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) +am__set_b = \ + case '$@' in \ + */*) \ + case '$*' in \ + */*) b='$*';; \ + *) b=`echo '$@' | sed 's/\.log$$//'`; \ + esac;; \ + *) \ + b='$*';; \ + esac +am__test_logs1 = $(TESTS:=.log) +am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) +TEST_LOGS = $(am__test_logs2:.test.log=.log) +TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/build-aux/test-driver +TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ + $(TEST_LOG_FLAGS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -145,17 +402,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -208,6 +465,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -281,11 +539,11 @@ AM_CFLAGS = \ -I $(top_srcdir) \ -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST = data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml +EXTRA_DIST = data/random4k.bin data/TestService.xml data/TestDevice.xml all: all-am .SUFFIXES: -.SUFFIXES: .c .lo .o .obj +.SUFFIXES: .c .lo .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ @@ -325,9 +583,11 @@ clean-checkPROGRAMS: list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + test-bugs$(EXEEXT): $(test_bugs_OBJECTS) $(test_bugs_DEPENDENCIES) $(EXTRA_test_bugs_DEPENDENCIES) @rm -f test-bugs$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_bugs_OBJECTS) $(test_bugs_LDADD) $(LIBS) + test-context$(EXEEXT): $(test_context_OBJECTS) $(test_context_DEPENDENCIES) $(EXTRA_test_context_DEPENDENCIES) @rm -f test-context$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_context_OBJECTS) $(test_context_LDADD) $(LIBS) @@ -346,14 +606,14 @@ distclean-compile: @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c $< +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c `$(CYGPATH_W) '$<'` +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @@ -368,26 +628,15 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -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) +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-am +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) 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; }; }'`; \ + $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ @@ -399,15 +648,11 @@ TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $$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; }; }'`; \ +ctags: ctags-am + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique @@ -416,102 +661,194 @@ GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-am + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -check-TESTS: $(TESTS) - @failed=0; all=0; xfail=0; xpass=0; skip=0; \ - srcdir=$(srcdir); export srcdir; \ - list=' $(TESTS) '; \ - $(am__tty_colors); \ - if test -n "$$list"; then \ - for tst in $$list; do \ - if test -f ./$$tst; then dir=./; \ - elif test -f $$tst; then dir=; \ - else dir="$(srcdir)/"; fi; \ - if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xpass=`expr $$xpass + 1`; \ - failed=`expr $$failed + 1`; \ - col=$$red; res=XPASS; \ - ;; \ - *) \ - col=$$grn; res=PASS; \ - ;; \ - esac; \ - elif test $$? -ne 77; then \ - all=`expr $$all + 1`; \ - case " $(XFAIL_TESTS) " in \ - *[\ \ ]$$tst[\ \ ]*) \ - xfail=`expr $$xfail + 1`; \ - col=$$lgn; res=XFAIL; \ - ;; \ - *) \ - failed=`expr $$failed + 1`; \ - col=$$red; res=FAIL; \ - ;; \ - esac; \ - else \ - skip=`expr $$skip + 1`; \ - col=$$blu; res=SKIP; \ - fi; \ - echo "$${col}$$res$${std}: $$tst"; \ - done; \ - if test "$$all" -eq 1; then \ - tests="test"; \ - All=""; \ - else \ - tests="tests"; \ - All="All "; \ +# Recover from deleted '.trs' file; this should ensure that +# "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create +# both 'foo.log' and 'foo.trs'. Break the recipe in two subshells +# to avoid problems with "make -n". +.log.trs: + rm -f $< $@ + $(MAKE) $(AM_MAKEFLAGS) $< + +# Leading 'am--fnord' is there to ensure the list of targets does not +# expand to empty, as could happen e.g. with make check TESTS=''. +am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) +am--force-recheck: + @: + +$(TEST_SUITE_LOG): $(TEST_LOGS) + @$(am__set_TESTS_bases); \ + am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ + redo_bases=`for i in $$bases; do \ + am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ + done`; \ + if test -n "$$redo_bases"; then \ + redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ + redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ + if $(am__make_dryrun); then :; else \ + rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ - if test "$$failed" -eq 0; then \ - if test "$$xfail" -eq 0; then \ - banner="$$All$$all $$tests passed"; \ - else \ - if test "$$xfail" -eq 1; then failures=failure; else failures=failures; fi; \ - banner="$$All$$all $$tests behaved as expected ($$xfail expected $$failures)"; \ - fi; \ - else \ - if test "$$xpass" -eq 0; then \ - banner="$$failed of $$all $$tests failed"; \ + fi; \ + if test -n "$$am__remaking_logs"; then \ + echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ + "recursion detected" >&2; \ + else \ + am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ + fi; \ + if $(am__make_dryrun); then :; else \ + st=0; \ + errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ + for i in $$redo_bases; do \ + test -f $$i.trs && test -r $$i.trs \ + || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ + test -f $$i.log && test -r $$i.log \ + || { echo "$$errmsg $$i.log" >&2; st=1; }; \ + done; \ + test $$st -eq 0 || exit 1; \ + fi + @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ + ws='[ ]'; \ + results=`for b in $$bases; do echo $$b.trs; done`; \ + test -n "$$results" || results=/dev/null; \ + all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ + pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ + fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ + skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ + xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ + xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ + error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ + if test `expr $$fail + $$xpass + $$error` -eq 0; then \ + success=true; \ + else \ + success=false; \ + fi; \ + br='==================='; br=$$br$$br$$br$$br; \ + result_count () \ + { \ + if test x"$$1" = x"--maybe-color"; then \ + maybe_colorize=yes; \ + elif test x"$$1" = x"--no-color"; then \ + maybe_colorize=no; \ else \ - if test "$$xpass" -eq 1; then passes=pass; else passes=passes; fi; \ - banner="$$failed of $$all $$tests did not behave as expected ($$xpass unexpected $$passes)"; \ + echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ - fi; \ - dashes="$$banner"; \ - skipped=""; \ - if test "$$skip" -ne 0; then \ - if test "$$skip" -eq 1; then \ - skipped="($$skip test was not run)"; \ + shift; \ + desc=$$1 count=$$2; \ + if test $$maybe_colorize = yes && test $$count -gt 0; then \ + color_start=$$3 color_end=$$std; \ else \ - skipped="($$skip tests were not run)"; \ + color_start= color_end=; \ fi; \ - test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$skipped"; \ - fi; \ - report=""; \ - if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \ - report="Please report to $(PACKAGE_BUGREPORT)"; \ - test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \ - dashes="$$report"; \ - fi; \ - dashes=`echo "$$dashes" | sed s/./=/g`; \ - if test "$$failed" -eq 0; then \ - col="$$grn"; \ - else \ - col="$$red"; \ - fi; \ - echo "$${col}$$dashes$${std}"; \ - echo "$${col}$$banner$${std}"; \ - test -z "$$skipped" || echo "$${col}$$skipped$${std}"; \ - test -z "$$report" || echo "$${col}$$report$${std}"; \ - echo "$${col}$$dashes$${std}"; \ - test "$$failed" -eq 0; \ - else :; fi + echo "$${color_start}# $$desc $$count$${color_end}"; \ + }; \ + create_testsuite_report () \ + { \ + result_count $$1 "TOTAL:" $$all "$$brg"; \ + result_count $$1 "PASS: " $$pass "$$grn"; \ + result_count $$1 "SKIP: " $$skip "$$blu"; \ + result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ + result_count $$1 "FAIL: " $$fail "$$red"; \ + result_count $$1 "XPASS:" $$xpass "$$red"; \ + result_count $$1 "ERROR:" $$error "$$mgn"; \ + }; \ + { \ + echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ + $(am__rst_title); \ + create_testsuite_report --no-color; \ + echo; \ + echo ".. contents:: :depth: 2"; \ + echo; \ + for b in $$bases; do echo $$b; done \ + | $(am__create_global_log); \ + } >$(TEST_SUITE_LOG).tmp || exit 1; \ + mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ + if $$success; then \ + col="$$grn"; \ + else \ + col="$$red"; \ + test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ + fi; \ + echo "$${col}$$br$${std}"; \ + echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ + echo "$${col}$$br$${std}"; \ + create_testsuite_report --maybe-color; \ + echo "$$col$$br$$std"; \ + if $$success; then :; else \ + echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ + if test -n "$(PACKAGE_BUGREPORT)"; then \ + echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ + fi; \ + echo "$$col$$br$$std"; \ + fi; \ + $$success || exit 1 + +check-TESTS: + @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list + @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + trs_list=`for i in $$bases; do echo $$i.trs; done`; \ + log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ + exit $$?; +recheck: all $(check_PROGRAMS) + @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) + @set +e; $(am__set_TESTS_bases); \ + bases=`for i in $$bases; do echo $$i; done \ + | $(am__list_recheck_tests)` || exit 1; \ + log_list=`for i in $$bases; do echo $$i.log; done`; \ + log_list=`echo $$log_list`; \ + $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ + am__force_recheck=am--force-recheck \ + TEST_LOGS="$$log_list"; \ + exit $$? +test-context.log: test-context$(EXEEXT) + @p='test-context$(EXEEXT)'; \ + b='test-context'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +test-bugs.log: test-bugs$(EXEEXT) + @p='test-bugs$(EXEEXT)'; \ + b='test-bugs'; \ + $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +.test.log: + @p='$<'; \ + $(am__set_b); \ + $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ + --log-file $$b.log --trs-file $$b.trs \ + $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ + "$$tst" $(AM_TESTS_FD_REDIRECT) +@am__EXEEXT_TRUE@.test$(EXEEXT).log: +@am__EXEEXT_TRUE@ @p='$<'; \ +@am__EXEEXT_TRUE@ $(am__set_b); \ +@am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ +@am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ +@am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ +@am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ @@ -569,6 +906,9 @@ install-strip: "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: + -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) + -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) + -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: @@ -652,9 +992,9 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \ - clean-checkPROGRAMS clean-generic clean-libtool ctags \ - distclean distclean-compile distclean-generic \ +.PHONY: CTAGS GTAGS TAGS all all-am check check-TESTS check-am clean \ + clean-checkPROGRAMS clean-generic clean-libtool cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ @@ -664,7 +1004,7 @@ uninstall-am: 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 + recheck tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/tests/gtest/data/TestBgo696762.xml b/tests/gtest/data/TestBgo696762.xml deleted file mode 100644 index a0c0711..0000000 --- a/tests/gtest/data/TestBgo696762.xml +++ /dev/null @@ -1,21 +0,0 @@ - - -1 -0 - - -urn:test-gupnp-org:device:TestBgo696762:1 -Regression Test for bgo#696762 -https://bugzilla.gnome.org/show_bug.cgi?id=696762 -uuid:1234 - - -urn:test-gupnp-org:service:bgo696762:1 -urn:test-gupnp-org:serviceId:bgo696762:1 -/ServiceBgo69762.xml -/ServiceBgo69762/Control -/ServiceBgo69762/Event - - - - diff --git a/tests/gtest/data/TestDevice.xml b/tests/gtest/data/TestDevice.xml new file mode 100644 index 0000000..d210ee2 --- /dev/null +++ b/tests/gtest/data/TestDevice.xml @@ -0,0 +1,28 @@ + + +1 +0 + + +urn:test-gupnp-org:device:TestDevice:1 +GUPnP Regression Test Device +http://gupnp.org/ +uuid:1234 + + +urn:test-gupnp-org:service:TestService:1 +urn:test-gupnp-org:serviceId:TestService:1 +/TestService.xml +/TestService/Control +/TestService/Event + + + + +urn:test-gupnp-org:device:TestSubDevice:1 +Regression Test subdevice +uuid:5678 + + + + diff --git a/tests/gtest/data/ServiceBgo69762.xml b/tests/gtest/data/TestService.xml similarity index 96% rename from tests/gtest/data/ServiceBgo69762.xml rename to tests/gtest/data/TestService.xml index f2a0e38..8f02269 100644 --- a/tests/gtest/data/ServiceBgo69762.xml +++ b/tests/gtest/data/TestService.xml @@ -36,6 +36,10 @@ A_ARG_TYPE_Count ui4 + + evented_variable + string + diff --git a/tests/gtest/test-bugs.c b/tests/gtest/test-bugs.c index 7161e63..38dc08d 100644 --- a/tests/gtest/test-bugs.c +++ b/tests/gtest/test-bugs.c @@ -44,10 +44,43 @@ struct _GUPnPServiceAction { guint argument_count; }; -typedef struct _TestBgo696762Data { + +typedef struct _TestBgo678701Service { + GUPnPServiceProxy parent_instance; +}TestBgo678701Service; + +typedef struct _TestBgo678701ServiceClass +{ + GUPnPServiceProxyClass parent_class; +}TestBgo678701ServiceClass; + +G_DEFINE_TYPE(TestBgo678701Service, test_bgo_678701_service, GUPNP_TYPE_SERVICE_PROXY); +static void test_bgo_678701_service_class_init (TestBgo678701ServiceClass *klass) {} +static void test_bgo_678701_service_init (TestBgo678701Service *self) {} + +typedef struct _TestBgo678701Device { + GUPnPDeviceProxy parent_instance; +}TestBgo678701Device; + +typedef struct _TestBgo678701DeviceClass +{ + GUPnPDeviceProxyClass parent_class; +}TestBgo678701DeviceClass; + +G_DEFINE_TYPE(TestBgo678701Device, test_bgo_678701_device, GUPNP_TYPE_DEVICE_PROXY); +static void test_bgo_678701_device_class_init (TestBgo678701DeviceClass *klass) {} +static void test_bgo_678701_device_init (TestBgo678701Device *self) {} + + +typedef struct _TestServiceProxyData { GMainLoop *loop; GUPnPServiceProxy *proxy; -} TestBgo696762Data; +} TestServiceProxyData; + +typedef struct _TestBgo678701Data { + GMainLoop *loop; + GUPnPDeviceProxy *proxy; +} TestBgo678701Data; static void test_bgo_696762_on_browse_call (G_GNUC_UNUSED GUPnPService *service, @@ -86,31 +119,88 @@ test_bgo_696762_on_browse (G_GNUC_UNUSED GUPnPServiceProxy *proxy, G_GNUC_UNUSED GUPnPServiceProxyAction *action, gpointer user_data) { - TestBgo696762Data *data = (TestBgo696762Data *) user_data; + TestServiceProxyData *data = (TestServiceProxyData *) user_data; g_main_loop_quit (data->loop); } static void -test_bgo_696762_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy, +test_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + data->proxy = g_object_ref (proxy); + + g_main_loop_quit (data->loop); +} + +static void +test_bgo_678701_on_dp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy, gpointer user_data) { - TestBgo696762Data *data = (TestBgo696762Data *) user_data; + TestBgo678701Data *data = (TestBgo678701Data *) user_data; data->proxy = g_object_ref (proxy); g_main_loop_quit (data->loop); } +void +test_bgo_690400_notify (GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + gupnp_service_proxy_remove_notify (data->proxy, + "evented_variable", + test_bgo_690400_notify, + user_data); +} + +void +test_bgo_690400_notify_too (GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + g_main_loop_quit (data->loop); +} + +static void +test_bgo_690400_query_variable (GUPnPService *service, + gchar *variable, + GValue *value, + gpointer user_data) +{ + g_value_init (value, G_TYPE_STRING); + g_value_set_string (value, "New Value"); +} + static gboolean -test_bgo_696762_on_timeout (G_GNUC_UNUSED gpointer user_data) +test_on_timeout (G_GNUC_UNUSED gpointer user_data) { g_assert_not_reached (); return FALSE; } +static void +test_run_loop (GMainLoop *loop) +{ + guint timeout_id = 0; + + timeout_id = g_timeout_add_seconds (2, test_on_timeout, NULL); + g_main_loop_run (loop); + g_source_remove (timeout_id); +} + /* Test if a call on a service proxy keeps argument order */ static void test_bgo_696762 (void) @@ -118,9 +208,8 @@ test_bgo_696762 (void) GUPnPContext *context = NULL; GError *error = NULL; GUPnPControlPoint *cp = NULL; - guint timeout_id = 0; GUPnPRootDevice *rd; - TestBgo696762Data data = { NULL, NULL }; + TestServiceProxyData data = { NULL, NULL }; GUPnPServiceInfo *info = NULL; data.loop = g_main_loop_new (NULL, FALSE); @@ -130,28 +219,26 @@ test_bgo_696762 (void) g_assert (error == NULL); cp = gupnp_control_point_new (context, - "urn:test-gupnp-org:service:bgo696762:1"); + "urn:test-gupnp-org:service:TestService:1"); gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); g_signal_connect (G_OBJECT (cp), "service-proxy-available", - G_CALLBACK (test_bgo_696762_on_sp_available), + G_CALLBACK (test_on_sp_available), &data); - rd = gupnp_root_device_new (context, "TestBgo696762.xml", DATA_PATH); + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); gupnp_root_device_set_available (rd, TRUE); info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd), - "urn:test-gupnp-org:service:bgo696762:1"); + "urn:test-gupnp-org:service:TestService:1"); g_signal_connect (G_OBJECT (info), "action-invoked::Browse", G_CALLBACK (test_bgo_696762_on_browse_call), &data); - timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); - g_main_loop_run (data.loop); - g_source_remove (timeout_id); + test_run_loop (data.loop); g_assert (data.proxy != NULL); gupnp_service_proxy_begin_action (data.proxy, @@ -166,9 +253,131 @@ test_bgo_696762 (void) "SortCriteria", G_TYPE_STRING, "", NULL); - timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); - g_main_loop_run (data.loop); - g_source_remove (timeout_id); + test_run_loop (data.loop); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (context); +} + +/* Test that proxies created by ResourceFactory are of the GType + * set with gupnp_resource_factory_register_resource_proxy_type(). + * https://bugzilla.gnome.org/show_bug.cgi?id=678701 */ +static void +test_bgo_678701 (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + TestBgo678701Data data = { NULL, NULL }; + GUPnPRootDevice *rd; + GUPnPServiceInfo *info = NULL; + GUPnPDeviceInfo *dev_info = NULL; + GUPnPResourceFactory *factory; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = gupnp_context_new (NULL, "lo", 0, &error); + g_assert (context != NULL); + g_assert (error == NULL); + + factory = gupnp_resource_factory_get_default (); + gupnp_resource_factory_register_resource_proxy_type (factory, + "urn:test-gupnp-org:service:TestService:1", + test_bgo_678701_service_get_type ()); + gupnp_resource_factory_register_resource_proxy_type (factory, + "urn:test-gupnp-org:device:TestSubDevice:1", + test_bgo_678701_device_get_type ()); + + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); + gupnp_root_device_set_available (rd, TRUE); + + cp = gupnp_control_point_new (context, + "urn:test-gupnp-org:device:TestDevice:1"); + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + g_signal_connect (G_OBJECT (cp), + "device-proxy-available", + G_CALLBACK (test_bgo_678701_on_dp_available), + &data); + + test_run_loop (data.loop); + g_assert (data.proxy != NULL); + + info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (data.proxy), + "urn:test-gupnp-org:service:TestService:1"); + g_assert_cmpstr(G_OBJECT_TYPE_NAME (info), ==, "TestBgo678701Service"); + + dev_info = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (data.proxy), + "urn:test-gupnp-org:device:TestSubDevice:1"); + g_assert_cmpstr(G_OBJECT_TYPE_NAME (dev_info), ==, "TestBgo678701Device"); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (context); +} + +/* Test that removing a notify-callback from the callback itself works + * https://bugzilla.gnome.org/show_bug.cgi?id=678701 */ +static void +test_bgo_690400 (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + TestServiceProxyData data = { NULL, NULL }; + GUPnPRootDevice *rd; + GUPnPServiceInfo *service; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = gupnp_context_new (NULL, "lo", 0, &error); + g_assert (context != NULL); + g_assert (error == NULL); + + cp = gupnp_control_point_new (context, + "urn:test-gupnp-org:service:TestService:1"); + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + g_signal_connect (G_OBJECT (cp), + "service-proxy-available", + G_CALLBACK (test_on_sp_available), + &data); + + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); + service = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd), + "urn:test-gupnp-org:service:TestService:1"); + g_signal_connect (service, "query-variable", + G_CALLBACK (test_bgo_690400_query_variable), NULL); + gupnp_root_device_set_available (rd, TRUE); + + test_run_loop (data.loop); + g_assert (data.proxy != NULL); + + gupnp_service_proxy_add_notify (data.proxy, + "evented_variable", + G_TYPE_STRING, + (GUPnPServiceProxyNotifyCallback)test_bgo_690400_notify, + &data); + gupnp_service_proxy_add_notify (data.proxy, + "evented_variable", + G_TYPE_STRING, + (GUPnPServiceProxyNotifyCallback)test_bgo_690400_notify_too, + &data); + + gupnp_service_proxy_set_subscribed (data.proxy, TRUE); + + test_run_loop (data.loop); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (service); + g_object_unref (context); } int @@ -178,6 +387,8 @@ main (int argc, char *argv[]) { #endif g_test_init (&argc, &argv, NULL); g_test_add_func ("/bugs/696762", test_bgo_696762); + g_test_add_func ("/bugs/678701", test_bgo_678701); + g_test_add_func ("/bugs/690400", test_bgo_690400); return g_test_run (); } diff --git a/tests/test-introspection.c b/tests/test-introspection.c index 0a6ca16..6d56ed5 100644 --- a/tests/test-introspection.c +++ b/tests/test-introspection.c @@ -30,6 +30,8 @@ GMainLoop *main_loop; +static GCancellable *cancellable; + static gboolean async = FALSE; static GOptionEntry entries[] = { @@ -41,7 +43,13 @@ static GOptionEntry entries[] = static void interrupt_signal_handler (G_GNUC_UNUSED int signum) { - g_main_loop_quit (main_loop); + if (!async || g_cancellable_is_cancelled (cancellable)) { + g_main_loop_quit (main_loop); + } else { + g_print ("Canceling all introspection calls. " + "Press ^C again to quit.\n"); + g_cancellable_cancel (cancellable); + } } static void @@ -202,9 +210,10 @@ service_proxy_available_cb (G_GNUC_UNUSED GUPnPControlPoint *cp, info = GUPNP_SERVICE_INFO (proxy); if (async) { - gupnp_service_info_get_introspection_async (info, - got_introspection, - NULL); + gupnp_service_info_get_introspection_async_full (info, + got_introspection, + cancellable, + NULL); } else { introspection = gupnp_service_info_get_introspection (info, &error); @@ -270,6 +279,8 @@ main (int argc, char **argv) return EXIT_FAILURE; } + cancellable = g_cancellable_new (); + /* We're interested in everything */ cp = gupnp_control_point_new (context, "ssdp:all"); diff --git a/tools/Makefile.in b/tools/Makefile.in index 8c1544e..ade8dec 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +80,8 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = tools -DIST_COMMON = $(dist_bin_SCRIPTS) $(srcdir)/Makefile.am \ - $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ + $(dist_bin_SCRIPTS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -96,12 +123,18 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(bindir)" SCRIPTS = $(dist_bin_SCRIPTS) +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -109,6 +142,7 @@ am__can_run_installinfo = \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -137,17 +171,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -200,6 +234,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -333,11 +368,11 @@ mostlyclean-libtool: clean-libtool: -rm -rf .libs _libs -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -476,16 +511,17 @@ uninstall-am: uninstall-dist_binSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - install-data install-data-am install-dist_binSCRIPTS \ - install-dvi install-dvi-am install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - 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-generic mostlyclean-libtool pdf pdf-am \ - ps ps-am uninstall uninstall-am uninstall-dist_binSCRIPTS + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am \ + install-dist_binSCRIPTS install-dvi install-dvi-am \ + install-exec install-exec-am install-html install-html-am \ + install-info install-info-am 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-generic \ + mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ + uninstall-am uninstall-dist_binSCRIPTS # Tell versions [3.59,3.63) of GNU make to not export all variables. diff --git a/vala/GUPnP-1.0.metadata b/vala/GUPnP-1.0.metadata index a8ab94c..ee4dc8c 100644 --- a/vala/GUPnP-1.0.metadata +++ b/vala/GUPnP-1.0.metadata @@ -23,6 +23,7 @@ ServiceIntrospection .get_state_variable nullable=true unowned=true .scpd skip ServiceProxy + .add_notify skip=false .begin_action skip=false .end_action_hash skip .end_action_list skip diff --git a/vala/Makefile.in b/vala/Makefile.in index e3e24d1..7a94da1 100644 --- a/vala/Makefile.in +++ b/vala/Makefile.in @@ -1,9 +1,8 @@ -# Makefile.in generated by automake 1.11.6 from Makefile.am. +# Makefile.in generated by automake 1.14.1 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. +# Copyright (C) 1994-2013 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. @@ -16,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ 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;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,7 +80,7 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = vala -DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/gtk-doc.m4 \ $(top_srcdir)/m4/introspection.m4 $(top_srcdir)/m4/libtool.m4 \ @@ -66,12 +93,18 @@ mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) -am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ +am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ @@ -108,6 +141,7 @@ am__uninstall_files_from_dir = { \ } am__installdirs = "$(DESTDIR)$(vapidir)" DATA = $(vapi_DATA) +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ @@ -136,17 +170,17 @@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ -GIO_CFLAGS = @GIO_CFLAGS@ -GIO_LIBS = @GIO_LIBS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GREP = @GREP@ GTHREAD_CFLAGS = @GTHREAD_CFLAGS@ GTHREAD_LIBS = @GTHREAD_LIBS@ GTKDOC_CHECK = @GTKDOC_CHECK@ +GTKDOC_CHECK_PATH = @GTKDOC_CHECK_PATH@ GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ GTKDOC_MKPDF = @GTKDOC_MKPDF@ GTKDOC_REBASE = @GTKDOC_REBASE@ +HAVE_IFADDRS_H = @HAVE_IFADDRS_H@ HAVE_NETLINK = @HAVE_NETLINK@ HTML_DIR = @HTML_DIR@ INSTALL = @INSTALL@ @@ -199,6 +233,7 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ USE_NETLINK = @USE_NETLINK@ +UUID_LIBS = @UUID_LIBS@ VAPIGEN = @VAPIGEN@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ @@ -321,11 +356,11 @@ uninstall-vapiDATA: @list='$(vapi_DATA)'; test -n "$(vapidir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(vapidir)'; $(am__uninstall_files_from_dir) -tags: TAGS -TAGS: +tags TAGS: + +ctags CTAGS: -ctags: CTAGS -CTAGS: +cscope cscopelist: distdir: $(DISTFILES) @@ -465,16 +500,16 @@ uninstall-am: uninstall-vapiDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ - distclean distclean-generic distclean-libtool distdir dvi \ - dvi-am html html-am info info-am install install-am \ - 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-man install-pdf \ - install-pdf-am install-ps install-ps-am install-strip \ - install-vapiDATA installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am uninstall-vapiDATA + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + install install-am 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-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip install-vapiDATA installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags-am uninstall uninstall-am uninstall-vapiDATA @HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@gupnp-1.0.vapi: gupnp-1.0.stamp @HAVE_INTROSPECTION_TRUE@@HAVE_VAPIGEN_TRUE@ @true -- 2.7.4