From: Regis Merlino Date: Thu, 7 Mar 2013 09:26:36 +0000 (+0100) Subject: Submit version 0.20.1 of GUPnP (4186015) X-Git-Tag: accepted/2.0/20130320.164844~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;ds=sidebyside;h=30427ea337e5daeaafd08324c1fc1c5135874503;p=profile%2Fivi%2FGUPnP.git Submit version 0.20.1 of GUPnP (4186015) --- diff --git a/NEWS b/NEWS index 08a16f7..f303210 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,80 @@ +0.20.1 +====== + +Changes since 0.20.0: +- Fix suspicious use of va_list in the code. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=689813 + +All contributors to this release: + Krzesimir Nowak + +0.20.0 +====== + +Changes since 0.19.4: +- Fix Accept-Language header generation. +- Fix some issues with Windows support on mingw64. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=683199 + +All contributors to this release: + Jens Georg + +0.19.4 +====== + +Changes since 0.19.3: +- Shuffle around some test data. +- Fix a GError leak in the linux cm. +- Fix a leak in variable notification. +- Clarify usage of gupnp_service_proxy_remove_notify. + +All contributors to this release: + Jens Georg + Sven Neumann + Marcin Nowakowski + +0.19.3 +====== + +Changes since 0.19.2: +- Work-around missing notification messages. + +All contributors to this release: + Jens Georg + +0.19.2 +====== + +Changes since 0.19.1: + +- Support Windows. +- Fix searching for services in ControlPoint. +- Drop deprecated calls to g_type_init on glib >= 2.35. +- Fix LD_LIBRARY_PATH in make check. +- Explicitly use IPv4 in tests. +- Allow autogen.sh to be run out-of-tree. +- Expose GSSDPResourceGroup of a root device. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=687320 + - https://bugzilla.gnome.org/show_bug.cgi?id=687621 + - https://bugzilla.gnome.org/show_bug.cgi?id=689028 + - https://bugzilla.gnome.org/show_bug.cgi?id=688411 + - https://bugzilla.gnome.org/show_bug.cgi?id=685643 + - https://bugzilla.gnome.org/show_bug.cgi?id=682580 + - https://bugzilla.gnome.org/show_bug.cgi?id=672830 + +All contributors to this release: + Jens Georg + Theppitak Karoonboonyanan + Stef Walter + Juan A. Suarez Romero + Alban Browaeys + 0.19.1 ====== Changes since 0.19.0: diff --git a/configure b/configure index e08d256..f6b3761 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.19.1. +# Generated by GNU Autoconf 2.69 for gupnp 0.20.1. # # Report bugs to . # @@ -651,8 +651,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='gupnp' PACKAGE_TARNAME='gupnp' -PACKAGE_VERSION='0.19.1' -PACKAGE_STRING='gupnp 0.19.1' +PACKAGE_VERSION='0.20.1' +PACKAGE_STRING='gupnp 0.20.1' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp' PACKAGE_URL='http://www.gupnp.org/' @@ -742,6 +742,8 @@ USE_NETWORK_MANAGER_TRUE HAVE_NETLINK HAVE_NETLINK_FALSE HAVE_NETLINK_TRUE +OS_WIN32_FALSE +OS_WIN32_TRUE GTHREAD_LIBS GTHREAD_CFLAGS LIBGUPNP_LIBS @@ -1458,7 +1460,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.19.1 to adapt to many kinds of systems. +\`configure' configures gupnp 0.20.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1529,7 +1531,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gupnp 0.19.1:";; + short | recursive ) echo "Configuration of gupnp 0.20.1:";; esac cat <<\_ACEOF @@ -1671,7 +1673,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gupnp configure 0.19.1 +gupnp configure 0.20.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1949,7 +1951,7 @@ 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.19.1, which was +It was created by gupnp $as_me 0.20.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2884,7 +2886,7 @@ fi # Define the identity of the package. PACKAGE='gupnp' - VERSION='0.19.1' + VERSION='0.20.1' cat >>confdefs.h <<_ACEOF @@ -12185,11 +12187,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking operating system" >&5 $as_echo_n "checking operating system... " >&6; } +os_win32=no case "$target_os" in mingw*|cygwin*) + os_win32=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: Win32" >&5 $as_echo "Win32" >&6; } - UUID=uuid + UUID= ;; darwin*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: Darwin" >&5 @@ -12349,7 +12353,6 @@ $as_echo "yes" >&6; } fi - pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GTHREAD" >&5 $as_echo_n "checking for GTHREAD... " >&6; } @@ -12441,6 +12444,15 @@ $as_echo "yes" >&6; } fi + if test "x$os_win32" = "xyes"; then + OS_WIN32_TRUE= + OS_WIN32_FALSE='#' +else + OS_WIN32_TRUE='#' + OS_WIN32_FALSE= +fi + +if test "x$os_win32" = "xno"; then # Check whether --with-context_manager was given. if test "${with_context_manager+set}" = set; then : @@ -12449,6 +12461,10 @@ else with_context_manager="none" fi +else + LIBGUPNP_LIBS="$LIBGUPNP_LIBS -lrpcrt4" + with_context_manager="windows" +fi if test "x$with_context_manager" = "xnone"; then case "$target_os" in @@ -13390,6 +13406,10 @@ if test -z "${HAVE_GTEST_TRUE}" && test -z "${HAVE_GTEST_FALSE}"; then as_fn_error $? "conditional \"HAVE_GTEST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then + as_fn_error $? "conditional \"OS_WIN32\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi 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 @@ -13831,7 +13851,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.19.1, which was +This file was extended by gupnp $as_me 0.20.1, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13898,7 +13918,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.19.1 +gupnp config.status 0.20.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index b0c157a..64b8a1c 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([gupnp], - [0.19.1], + [0.20.1], [http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp], [gupnp], [http://www.gupnp.org/]) @@ -32,10 +32,12 @@ PKG_CHECK_MODULES(GTest, glib-2.0 >= 2.16, [gtest=yes], [gtest=no]) AM_CONDITIONAL(HAVE_GTEST, [test x$gtest = xyes]) AC_MSG_CHECKING([operating system]) +os_win32=no case "$target_os" in mingw*|cygwin*) + os_win32=yes AC_MSG_RESULT(Win32) - UUID=uuid + UUID= ;; darwin*) AC_MSG_RESULT(Darwin) @@ -54,14 +56,19 @@ PKG_CHECK_MODULES(LIBGUPNP, glib-2.0 >= 2.24.0 \ libsoup-2.4 >= 2.28.2 \ libxml-2.0 \ $UUID) - PKG_CHECK_MODULES(GTHREAD, gthread-2.0) -AC_ARG_WITH([context_manager], +AM_CONDITIONAL(OS_WIN32, test "x$os_win32" = "xyes") +if test "x$os_win32" = "xno"; then + AC_ARG_WITH([context_manager], AS_HELP_STRING( [--with-context-manager=@<:@network-manager/connman/unix/linux@:>@], [Context Manager backend to use]),, [with_context_manager="none"]) +else + LIBGUPNP_LIBS="$LIBGUPNP_LIBS -lrpcrt4" + with_context_manager="windows" +fi if test "x$with_context_manager" = "xnone"; then case "$target_os" in diff --git a/doc/client-tutorial.xml b/doc/client-tutorial.xml index 4a60e3b..c480e07 100644 --- a/doc/client-tutorial.xml +++ b/doc/client-tutorial.xml @@ -47,7 +47,9 @@ main (int argc, char **argv) GUPnPControlPoint *cp; /* Required initialisation */ - g_type_init (); + #if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); + #endif /* Create a new GUPnP Context. By here we are using the default GLib main context, and connecting to the current machine's default IP on an diff --git a/doc/gupnp-sections.txt b/doc/gupnp-sections.txt index cf02610..92fa1f3 100644 --- a/doc/gupnp-sections.txt +++ b/doc/gupnp-sections.txt @@ -152,6 +152,7 @@ gupnp_root_device_get_available gupnp_root_device_get_relative_location gupnp_root_device_get_description_dir gupnp_root_device_get_description_path +gupnp_root_device_get_ssdp_resource_group GUPnPRootDeviceClass GUPNP_ROOT_DEVICE @@ -202,6 +203,7 @@ gupnp_context_manager_new gupnp_context_manager_create gupnp_context_manager_manage_control_point gupnp_context_manager_manage_root_device +gupnp_context_manager_get_port GUPnPContextManagerClass GUPNP_CONTEXT_MANAGER diff --git a/doc/html/GUPnPContext.html b/doc/html/GUPnPContext.html index 72ee0e9..31b7a69 100644 --- a/doc/html/GUPnPContext.html +++ b/doc/html/GUPnPContext.html @@ -44,18 +44,18 @@

Synopsis

struct              GUPnPContext;
-GUPnPContext *      gupnp_context_new                   (GMainContext *main_context,
-                                                         const char *interface,
-                                                         guint port,
-                                                         GError **error);
+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);
+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
+                                                         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,
@@ -63,10 +63,10 @@ const char *        void                gupnp_context_host_path             (GUPnPContext *context,
                                                          const char *local_path,
                                                          const char *server_path);
-gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
+gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
                                                          const char *local_path,
                                                          const char *server_path,
-                                                         GRegex *user_agent);
+                                                         GRegex *user_agent);
 void                gupnp_context_unhost_path           (GUPnPContext *context,
                                                          const char *server_path);
 
@@ -74,8 +74,8 @@ const char *

Object Hierarchy

-  GObject
-   +----GSSDPClient
+  GObject
+   +----GSSDPClient
          +----GUPnPContext
 
@@ -83,16 +83,16 @@ const char *

Implemented Interfaces

GUPnPContext implements - GInitable.

+ 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
+  "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
 
@@ -103,7 +103,7 @@ 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. +exporting GUPNP_DEBUG.

@@ -119,12 +119,12 @@ functions below.

gupnp_context_new ()

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

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

@@ -132,13 +132,13 @@ Create a new - - - + @@ -148,12 +148,12 @@ auto-detect. [error :

-
- +

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] +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]

interface :

The network interface to use, or NULL to +

iface :

The network interface to use, or NULL to auto-detect. [allow-none]
A location to store a GError, or NULL +A location to store a GError, or NULL

Returns :

A new GUPnPContext object, or NULL on an errorA new GUPnPContext object, or NULL on an error
@@ -165,8 +165,8 @@ auto-detect. [

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.

+GSSDPClient so newer applications should use +gssdp_client_get_host_ip instead.

Get the IP address we advertise ourselves as using. @@ -189,7 +189,7 @@ Get the IP address we advertise ourselves as using.


gupnp_context_get_port ()

-
guint               gupnp_context_get_port              (GUPnPContext *context);
+
guint               gupnp_context_get_port              (GUPnPContext *context);

Get the port that the SOAP server is running on.

@@ -211,9 +211,9 @@ Get the port that the SOAP server is running on.

gupnp_context_get_server ()

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

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

@@ -225,7 +225,7 @@ Get the SoupServer HTTP server that GUPnP is using. - @@ -234,9 +234,9 @@ Get the SoupServer HTTP server that GUPnP is using.

gupnp_context_get_session ()

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

-Get the SoupSession object that GUPnP is using. +Get the SoupSession object that GUPnP is using.

Returns :

The SoupServer used by GUPnP. Do not unref this when finished. [transfer none] +The SoupServer used by GUPnP. Do not unref this when finished. [transfer none]
@@ -248,7 +248,7 @@ Get the SoupSession object that GUPnP is using. - @@ -260,7 +260,7 @@ this when finished. [

gupnp_context_set_subscription_timeout ()

void                gupnp_context_set_subscription_timeout
                                                         (GUPnPContext *context,
-                                                         guint timeout);
+ 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 @@ -284,7 +284,7 @@ will automatically be renewed.


gupnp_context_get_subscription_timeout ()

-
guint               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 @@ -385,10 +385,10 @@ specified in the request's Accept-Language header.


gupnp_context_host_path_for_agent ()

-
gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
+
gboolean            gupnp_context_host_path_for_agent   (GUPnPContext *context,
                                                          const char *local_path,
                                                          const char *server_path,
-                                                         GRegex *user_agent);
+ 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. @@ -411,12 +411,12 @@ path server_path must already be hosted

- + +TRUE on success, FALSE otherwise.

Returns :

The SoupSession used by GUPnP. Do not unref +The SoupSession used by GUPnP. Do not unref this when finished. [transfer none]

user_agent :

The user-agent as a GRegex.The user-agent as a GRegex.

Returns :

-TRUE on success, FALSE otherwise.
@@ -449,7 +449,7 @@ Stop hosting the file or folder at server_path

Property Details

The "default-language" property

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

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


The "port" property

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

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

@@ -469,23 +469,23 @@ The port to run on. Set to 0 if you don't care what port to run on.

The "server" property

-
  "server"                   SoupServer*           : Read
+
  "server"                   SoupServer*           : Read

-The SoupServer HTTP server used by GUPnP. +The SoupServer HTTP server used by GUPnP.


The "session" property

-
  "session"                  SoupSession*          : Read
+
  "session"                  SoupSession*          : Read

-The SoupSession object used by GUPnP. +The SoupSession object used by GUPnP.


The "subscription-timeout" property

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

The preferred subscription timeout: the number of seconds after which subscriptions are renewed. Set to '0' if subscriptions diff --git a/doc/html/GUPnPContextManager.html b/doc/html/GUPnPContextManager.html index 40cb7a8..632a8ee 100644 --- a/doc/html/GUPnPContextManager.html +++ b/doc/html/GUPnPContextManager.html @@ -44,36 +44,37 @@

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPContextManager
 

Properties

-  "main-context"             gpointer              : Read / Write / Construct Only
-  "port"                     guint                 : Read / Write / Construct Only
+  "main-context"             gpointer              : Read / Write / Construct Only
+  "port"                     guint                 : Read / Write / Construct Only
 
@@ -97,8 +98,8 @@ functions below.

gupnp_context_manager_new ()

-
GUPnPContextManager * gupnp_context_manager_new         (GMainContext *main_context,
-                                                         guint port);
+
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().

@@ -111,9 +112,9 @@ Same as main_context :

-Deprecated: 0.17.2: NULL. If you want to use +Deprecated: 0.17.2:
NULL. If you want to use a different main context use -g_main_context_push_thread_default() instead. [allow-none] +g_main_context_push_thread_default() instead. [allow-none] @@ -131,7 +132,7 @@ a different main context use

gupnp_context_manager_create ()

-
GUPnPContextManager * gupnp_context_manager_create      (guint port);
+
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 @@ -209,18 +210,40 @@ usually want to call this function from

+
+
+

gupnp_context_manager_get_port ()

+
guint               gupnp_context_manager_get_port      (GUPnPContextManager *manager);
+

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

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

manager :

A GUPnPContextManager +

Returns :

The network port asssociated with this context manager.
+

Property Details

The "main-context" property

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

GMainContext to pass to created GUPnPContext objects.


The "port" property

-
  "port"                     guint                 : Read / Write / Construct Only
+
  "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. @@ -234,7 +257,7 @@ port is used by

The "context-available" signal

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

Signals the availability of new GUPnPContext.

@@ -262,7 +285,7 @@ Signals the availability of new

The "context-unavailable" signal

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

Signals the unavailability of a GUPnPContext.

diff --git a/doc/html/GUPnPControlPoint.html b/doc/html/GUPnPControlPoint.html index a2d9fe2..f3aa9f1 100644 --- a/doc/html/GUPnPControlPoint.html +++ b/doc/html/GUPnPControlPoint.html @@ -52,17 +52,17 @@ GUPnPResourceFactory * gupnp_control_point_get_resource_factory (GUPnPControlPoint *control_point); GUPnPContext * gupnp_control_point_get_context (GUPnPControlPoint *control_point); -const GList * gupnp_control_point_list_device_proxies +const GList * gupnp_control_point_list_device_proxies (GUPnPControlPoint *control_point); -const GList * gupnp_control_point_list_service_proxies +const GList * gupnp_control_point_list_service_proxies (GUPnPControlPoint *control_point);

Object Hierarchy

-  GObject
-   +----GSSDPResourceBrowser
+  GObject
+   +----GSSDPResourceBrowser
          +----GUPnPControlPoint
 
@@ -75,17 +75,17 @@ const GList *

Signals

-  "device-proxy-available"                         : Run Last
-  "device-proxy-unavailable"                       : Run Last
-  "service-proxy-available"                        : Run Last
-  "service-proxy-unavailable"                      : Run Last
+  "device-proxy-available"                         : Run Last
+  "device-proxy-unavailable"                       : Run Last
+  "service-proxy-available"                        : Run Last
+  "service-proxy-unavailable"                      : Run Last
 

Description

GUPnPControlPoint handles device and service discovery. After creating -a control point and activating it using gssdp_resource_browser_set_active(), +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 @@ -223,10 +223,10 @@ Get the


gupnp_control_point_list_device_proxies ()

-
const GList *       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 +Get the GList of discovered GUPnPDeviceProxy objects. Do not free the list nor its elements.

@@ -239,7 +239,7 @@ nor its elements. - @@ -249,10 +249,10 @@ nor its elements.

gupnp_control_point_list_service_proxies ()

-
const GList *       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 +Get the GList of discovered GUPnPServiceProxy objects. Do not free the list nor its elements.

Returns :

a GList of +a GList of GUPnPDeviceProxy objects. [element-type GUPnP.DeviceProxy][transfer none]
@@ -265,7 +265,7 @@ list nor its elements. - @@ -289,7 +289,7 @@ The resource factory to use. Set to NULL for default factory.

The "device-proxy-available" signal

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

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

The "device-proxy-unavailable" signal

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

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

The "service-proxy-available" signal

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

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

The "service-proxy-unavailable" signal

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

The ::service-proxy-unavailable signal is emitted whenever a service is not available any more. diff --git a/doc/html/GUPnPDevice.html b/doc/html/GUPnPDevice.html index ec1c3e7..8c7b8fc 100644 --- a/doc/html/GUPnPDevice.html +++ b/doc/html/GUPnPDevice.html @@ -47,7 +47,7 @@

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPDeviceInfo
          +----GUPnPDevice
                +----GUPnPRootDevice
diff --git a/doc/html/GUPnPDeviceInfo.html b/doc/html/GUPnPDeviceInfo.html
index a8caa66..45c450a 100644
--- a/doc/html/GUPnPDeviceInfo.html
+++ b/doc/html/GUPnPDeviceInfo.html
@@ -46,7 +46,7 @@
                                                         (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 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);
@@ -67,22 +67,22 @@ const char *        int requested_depth,
                                                          int requested_width,
                                                          int requested_height,
-                                                         gboolean prefer_bigger,
+                                                         gboolean prefer_bigger,
                                                          char **mime_type,
                                                          int *depth,
                                                          int *width,
                                                          int *height);
-GList *             gupnp_device_info_list_dlna_capabilities
+GList *             gupnp_device_info_list_dlna_capabilities
                                                         (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);
+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
+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);
@@ -91,7 +91,7 @@ const char *        
 

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPDeviceInfo
          +----GUPnPDevice
          +----GUPnPDeviceProxy
@@ -101,13 +101,13 @@ const char *        

Properties

   "context"                  GUPnPContext*         : Read / Write / Construct Only
-  "device-type"              gchar*                : 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
+  "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
+  "udn"                      gchar*                : Read / Write / Construct Only
+  "url-base"                 SoupURI*              : Read / Write / Construct Only
 
@@ -199,7 +199,7 @@ Get the location of the device description file.

gupnp_device_info_get_url_base ()

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

Get the URL base of this device.

@@ -213,7 +213,7 @@ Get the URL base of this device.
- +

Returns :

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

Returns :

A SoupURI.A SoupURI.
@@ -257,7 +257,7 @@ Get the UPnP device type.

Returns :

-A constant string, or NULL. +A constant string, or NULL.
@@ -279,7 +279,7 @@ Get the friendly name of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -301,7 +301,7 @@ Get the manufacturer of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -324,7 +324,7 @@ Get a URL pointing to the manufacturer's website.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -347,7 +347,7 @@ Get the description of the device model.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -369,7 +369,7 @@ Get the model name of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -391,7 +391,7 @@ Get the model number of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -413,7 +413,7 @@ Get a URL pointing to the device model's website.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -435,7 +435,7 @@ Get the serial number of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use.
@@ -459,7 +459,7 @@ administration.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use. @@ -481,7 +481,7 @@ Get the Universal Product Code of the device.

Returns :

-A string, or NULL. g_free() after use. +A string, or NULL. g_free() after use. @@ -494,14 +494,14 @@ Get the Universal Product Code of the device. int requested_depth, int requested_width, int requested_height, - gboolean prefer_bigger, + 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 +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 @@ -519,7 +519,7 @@ will be returned. The returned strings should be freed.

requested_mime_type :

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

prefer_bigger :

-TRUE if a bigger, rather than a smaller icon should be +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 -of the returned icon, or NULL. The returned string should be freed after +of the returned icon, or NULL. The returned string should be freed after use. [out][allow-none]

depth :

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

width :

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

height :

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

Returns :

-a string, or NULL. g_free() after use. [transfer full] +a string, or NULL. g_free() after use. [transfer full] @@ -576,10 +576,10 @@ returned icon, or NULL

gupnp_device_info_list_dlna_capabilities ()

-
GList *             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 +Get a GList of strings that represent the device capabilities as announced in the device description file using the <dlna:X_DLNACAP> element.

@@ -592,8 +592,8 @@ in the device description file using the <dlna:X_DLNACAP> element. - @@ -624,7 +624,7 @@ in the device description file. - @@ -634,11 +634,11 @@ description doesn't contain the given element

gupnp_device_info_list_devices ()

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

-Get a GList of new objects implementing GUPnPDeviceInfo +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. +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 @@ -656,7 +656,7 @@ them.

- @@ -666,9 +666,9 @@ new

gupnp_device_info_list_device_types ()

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

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

Returns :

a GList of newly allocated strings or -NULL if the device description doesn't contain the <dlna:X_DLNACAP> +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]

Returns :

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

Returns :

a GList of +a GList of new GUPnPDeviceInfo objects. [element-type GUPnP.DeviceInfo][transfer full]
@@ -681,8 +681,8 @@ directly contained in info. - @@ -695,7 +695,7 @@ elements should be g_free()'d and the list should 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 +a new object implementing GUPnPDeviceInfo, or NULL if no such device was found. The returned object should be unreffed when done.

@@ -726,11 +726,11 @@ devices if it wishes to keep them around and re-use them.


gupnp_device_info_list_services ()

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

-Get a GList of new objects implementing GUPnPServiceInfo representing the +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. +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 @@ -747,7 +747,7 @@ services if it wishes to keep them around and re-use them.

- @@ -756,10 +756,10 @@ new

gupnp_device_info_list_service_types ()

-
GList *             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 +Get a GList of strings representing the types of the services directly contained in info.

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] +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]

Returns :

(element-type GUPnP.ServiceInfo) (transfer full) : A GList of +(element-type GUPnP.ServiceInfo) (transfer full) : A GList of new GUPnPServiceInfo objects.
@@ -772,8 +772,8 @@ directly contained in info. - @@ -786,7 +786,7 @@ elements should be g_free()'d and the list should 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 +implementing GUPnPServiceInfo, or NULL if no such device was found. The returned object should be unreffed when done.

@@ -827,7 +827,7 @@ The

The "device-type" property

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

The device type.

@@ -845,7 +845,7 @@ Private property.

The "element" property

-
  "element"                  gpointer              : Write / Construct Only
+
  "element"                  gpointer              : Write / Construct Only

Private property.

@@ -854,7 +854,7 @@ Private property.

The "location" property

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

The location of the device description file.

@@ -871,7 +871,7 @@ The resource factory to use. Set to NULL for default factory.

The "udn" property

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

The UDN of this device.

@@ -880,9 +880,9 @@ The UDN of this device.

The "url-base" property

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

-The URL base (SoupURI). +The URL base (SoupURI).

diff --git a/doc/html/GUPnPDeviceProxy.html b/doc/html/GUPnPDeviceProxy.html index db7f5b0..f862d98 100644 --- a/doc/html/GUPnPDeviceProxy.html +++ b/doc/html/GUPnPDeviceProxy.html @@ -45,7 +45,7 @@

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPDeviceInfo
          +----GUPnPDeviceProxy
 
diff --git a/doc/html/GUPnPResourceFactory.html b/doc/html/GUPnPResourceFactory.html index c75d278..30bee08 100644 --- a/doc/html/GUPnPResourceFactory.html +++ b/doc/html/GUPnPResourceFactory.html @@ -46,15 +46,15 @@ void gupnp_resource_factory_register_resource_type (GUPnPResourceFactory *factory, const char *upnp_type, - GType type); -gboolean gupnp_resource_factory_unregister_resource_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 + GType type); +gboolean gupnp_resource_factory_unregister_resource_proxy_type (GUPnPResourceFactory *factory, const char *upnp_type); @@ -62,7 +62,7 @@

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPResourceFactory
 
@@ -71,9 +71,9 @@

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 +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).

@@ -126,7 +126,7 @@ Get the default singleton void gupnp_resource_factory_register_resource_type (GUPnPResourceFactory *factory, const char *upnp_type, - GType 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 @@ -157,7 +157,7 @@ a device or GUPNP_TYPE_SERVICE if its a service.


gupnp_resource_factory_unregister_resource_type ()

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

@@ -177,7 +177,7 @@ Unregisters the GType assignment for the resource of UPnP type Returns :

@@ -189,7 +189,7 @@ otherwise.
void                gupnp_resource_factory_register_resource_proxy_type
                                                         (GUPnPResourceFactory *factory,
                                                          const char *upnp_type,
-                                                         GType 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 @@ -220,7 +220,7 @@ resource is a device or GUPNP_TYPE_SERVICE_PROXY if it


gupnp_resource_factory_unregister_resource_proxy_type ()

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

@@ -241,7 +241,7 @@ Unregisters the GType assignment for the proxy of resource of UPnP type

diff --git a/doc/html/GUPnPRootDevice.html b/doc/html/GUPnPRootDevice.html index 9d5c3eb..2dc72fe 100644 --- a/doc/html/GUPnPRootDevice.html +++ b/doc/html/GUPnPRootDevice.html @@ -51,20 +51,22 @@ 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); + 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
+  GObject
    +----GUPnPDeviceInfo
          +----GUPnPDevice
                +----GUPnPRootDevice
@@ -73,10 +75,10 @@ const char *        
 

Properties

-  "available"                gboolean              : Read / Write
-  "description-dir"          gchar*                : Read / Write / Construct Only
+  "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-path"         gchar*                : Read / Write / Construct Only
 
@@ -140,7 +142,7 @@ be an absolute path or path relative to description_

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

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] +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]
-TRUE if GType assignment was removed successfully, FALSE +TRUE if GType assignment was removed successfully, FALSE otherwise.

Returns :

-TRUE if GType assignment was removed successfully, FALSE +TRUE if GType assignment was removed successfully, FALSE otherwise.
@@ -157,7 +159,7 @@ device description document from description_path - @@ -180,7 +182,7 @@ be an absolute path or path relative to description_

gupnp_root_device_set_available ()

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

Controls whether or not root_device is available (announcing its presence). @@ -196,7 +198,7 @@ its presence).

+TRUE if root_device should be available

description_doc :

Device description document, or NULL +Device description document, or NULL

available :

-TRUE if root_device should be available
@@ -204,7 +206,7 @@ its presence).

gupnp_root_device_get_available ()

-
gboolean            gupnp_root_device_get_available     (GUPnPRootDevice *root_device);
+
gboolean            gupnp_root_device_get_available     (GUPnPRootDevice *root_device);

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

@@ -219,7 +221,7 @@ Get whether or not root_device is availa

Returns :

-TRUE if root_device is available, FALSE otherwise. +TRUE if root_device is available, FALSE otherwise.
@@ -294,12 +296,36 @@ Get the path to the device description document of r
+
+
+

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. +

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

root_device :

A GUPnPRootDevice +

Returns :

The GSSDPResourceGroup of root_device. [transfer none] +
+

Property Details

The "available" property

-
  "available"                gboolean              : Read / Write
+
  "available"                gboolean              : Read / Write

TRUE if this device is available.

@@ -308,7 +334,7 @@ TRUE if this device is available.

The "description-dir" property

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

The path to directory where description documents are provided.

@@ -325,7 +351,7 @@ Device description document. Constructor property.

The "description-path" property

-
  "description-path"         gchar*                : Read / Write / Construct Only
+
  "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. diff --git a/doc/html/GUPnPService.html b/doc/html/GUPnPService.html index 349d967..6463f59 100644 --- a/doc/html/GUPnPService.html +++ b/doc/html/GUPnPService.html @@ -46,36 +46,36 @@

struct              GUPnPService;
                     GUPnPServiceAction;
 const char *        gupnp_service_action_get_name       (GUPnPServiceAction *action);
-GList *             gupnp_service_action_get_locales    (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,
+                                                         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);
+                                                         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);
+                                                         const GValue *value);
 void                gupnp_service_action_set_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_values);
+                                                         GList *arg_names,
+                                                         GList *arg_values);
 void                gupnp_service_action_return         (GUPnPServiceAction *action);
 void                gupnp_service_action_return_error   (GUPnPServiceAction *action,
-                                                         guint error_code,
+                                                         guint error_code,
                                                          const char *error_description);
-SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
-guint               gupnp_service_action_get_argument_count
+SoupMessage *       gupnp_service_action_get_message    (GUPnPServiceAction *action);
+guint               gupnp_service_action_get_argument_count
                                                         (GUPnPServiceAction *action);
 void                gupnp_service_notify                (GUPnPService *service,
                                                          ...);
@@ -83,18 +83,18 @@ const char *        va_list var_args);
 void                gupnp_service_notify_value          (GUPnPService *service,
                                                          const char *variable,
-                                                         const GValue *value);
+                                                         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);
+                                                         gpointer user_data,
+                                                         GError **error);
 

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPServiceInfo
          +----GUPnPService
 
@@ -112,9 +112,9 @@ const char *

Signals

-  "action-invoked"                                 : Has Details
-  "notify-failed"                                  : Run Last
-  "query-variable"                                 : Has Details
+  "action-invoked"                                 : Has Details
+  "notify-failed"                                  : Run Last
+  "query-variable"                                 : Has Details
 
@@ -168,9 +168,9 @@ Get the name of action.

gupnp_service_action_get_locales ()

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

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

@@ -183,7 +183,7 @@ the client. Free list and elements after use. - @@ -237,7 +237,7 @@ value location.

gupnp_service_action_get_value ()

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

Retrieves the value of argument into value.

@@ -255,7 +255,7 @@ Retrieves the value of argument into - @@ -265,9 +265,9 @@ to the correct type. [

gupnp_service_action_get_gvalue ()

-
GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
+
GValue *            gupnp_service_action_get_gvalue     (GUPnPServiceAction *action,
                                                          const char *argument,
-                                                         GType type);
+ 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 @@ -291,8 +291,8 @@ The method exists only and only to satify PyGI, please use

- @@ -302,11 +302,11 @@ Rename To: gupnp_service_action_get_value. [

gupnp_service_action_get_values ()

-
GList *             gupnp_service_action_get_values     (GUPnPServiceAction *action,
-                                                         GList *arg_names,
-                                                         GList *arg_types);
+
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. +A variant of gupnp_service_action_get that uses GList instead of varargs.

Returns :

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

value :

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

Returns :

Value as GValue associated with action. -g_value_unset and g_slice_free it after usage. +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]
@@ -318,17 +318,17 @@ A variant of - + - - @@ -382,7 +382,7 @@ actual return value.

gupnp_service_action_set_value ()

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

Sets the value of argument to value.

@@ -400,7 +400,7 @@ Sets the value of argument to
- +

arg_names :

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

arg_types :

A GList of argument types as GType. [element-type GType] +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 +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]

value :

The GValue to store the return valueThe GValue to store the return value
@@ -409,8 +409,8 @@ Sets the value of argument to

gupnp_service_action_set_values ()

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

Sets the specified action return values.

@@ -424,13 +424,13 @@ Sets the specified action return values.

arg_names :

-A GList of argument names. [element-type utf8][transfer none] +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] +The GList of values (as +GValues) that line up with arg_names. [element-type GValue][transfer none] @@ -456,7 +456,7 @@ Return succesfully.

gupnp_service_action_return_error ()

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

Return error_code. @@ -475,7 +475,7 @@ Return error_code.

error_description :

-The error description, or NULL if error_code is +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 @@ -487,9 +487,9 @@ provided automatically.

gupnp_service_action_get_message ()

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

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

@@ -503,7 +503,7 @@ applications to be able to read HTTP headers received from clients. @@ -513,7 +513,7 @@ after using it. [

gupnp_service_action_get_argument_count ()

-
guint               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. @@ -571,7 +571,7 @@ use by language bindings.

+value, terminated with NULL.

Returns :

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

var_args :

A va_list of tuples of variable name, variable type, and variable -value, terminated with NULL.
@@ -581,7 +581,7 @@ value, terminated with NULL.

gupnp_service_notify_value ()

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

Notifies listening clients that variable has changed to value.

@@ -641,14 +641,14 @@ Sends out any pending notifications, and stops queuing of new ones.

gupnp_service_signals_autoconnect ()

void                gupnp_service_signals_autoconnect   (GUPnPService *service,
-                                                         gpointer user_data,
-                                                         GError **error);
+ 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 -glade_xml_signal_autoconnect() except that it attempts to guess the names of +gtk_builder_connect_signals() except that it attempts to guess the names of the signal handlers on its own.

@@ -685,7 +685,7 @@ particular naming schemes described above.

error :

-return location for a GError, or NULL +return location for a GError, or NULL @@ -708,7 +708,7 @@ The containing

The "action-invoked" signal

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

Emitted whenever an action is invoked. Handler should process action and must call either gupnp_service_action_return() or @@ -723,7 +723,7 @@ Emitted whenever an action is invoked. Handler should process

action :

-The invoked GUPnPAction +The invoked GUPnPServiceAction @@ -737,9 +737,9 @@ Emitted whenever an action is invoked. Handler should process

The "notify-failed" signal

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

Emitted whenever notification of a client fails.

@@ -752,12 +752,12 @@ Emitted whenever notification of a client fails.

callback_url :

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

reason :

-A pointer to a GError describing why the notify failed. [type GError] +A pointer to a GError describing why the notify failed. [type GError] @@ -771,9 +771,9 @@ Emitted whenever notification of a client fails.

The "query-variable" signal

void                user_function                      (GUPnPService *service,
-                                                        gchar        *variable,
-                                                        gpointer      value,
-                                                        gpointer      user_data)      : Has Details
+ 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. @@ -791,7 +791,7 @@ Handler should fill value with the value

value :

-The location of the GValue of the variable. [type GValue][inout] +The location of the GValue of the variable. [type GValue][inout] diff --git a/doc/html/GUPnPServiceInfo.html b/doc/html/GUPnPServiceInfo.html index 85c8074..c58f52a 100644 --- a/doc/html/GUPnPServiceInfo.html +++ b/doc/html/GUPnPServiceInfo.html @@ -45,11 +45,11 @@ void (*GUPnPServiceIntrospectionCallback) (GUPnPServiceInfo *info, GUPnPServiceIntrospection *introspection, - const GError *error, - gpointer user_data); + const GError *error, + gpointer user_data); GUPnPContext * gupnp_service_info_get_context (GUPnPServiceInfo *info); const char * gupnp_service_info_get_location (GUPnPServiceInfo *info); -const SoupURI * gupnp_service_info_get_url_base (GUPnPServiceInfo *info); +const SoupURI * gupnp_service_info_get_url_base (GUPnPServiceInfo *info); const char * gupnp_service_info_get_udn (GUPnPServiceInfo *info); const char * gupnp_service_info_get_service_type (GUPnPServiceInfo *info); char * gupnp_service_info_get_id (GUPnPServiceInfo *info); @@ -59,17 +59,17 @@ const char * GUPnPServiceInfo *info
); GUPnPServiceIntrospection * gupnp_service_info_get_introspection (GUPnPServiceInfo *info, - GError **error); + GError **error); void gupnp_service_info_get_introspection_async (GUPnPServiceInfo *info, GUPnPServiceIntrospectionCallback callback, - gpointer user_data); + gpointer user_data);

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPServiceInfo
          +----GUPnPService
          +----GUPnPServiceProxy
@@ -80,11 +80,11 @@ const char *        
   "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
+  "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
 
@@ -110,8 +110,8 @@ functions below.
void                (*GUPnPServiceIntrospectionCallback)
                                                         (GUPnPServiceInfo *info,
                                                          GUPnPServiceIntrospection *introspection,
-                                                         const GError *error,
-                                                         gpointer user_data);
+ const GError *error, + gpointer user_data);

Callback notifying that introspection for info has been obtained.

@@ -128,7 +128,7 @@ Callback notifying that introspection fo

error :

-The GError that occurred, or NULL +The GError that occurred, or NULL

user_data :

@@ -185,7 +185,7 @@ Get the location of the device description file.

gupnp_service_info_get_url_base ()

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

Get the URL base of this service.

@@ -199,7 +199,7 @@ Get the URL base of this service.

Returns :

-A constant SoupURI. +A constant SoupURI.
@@ -231,7 +231,7 @@ Get the Unique Device Name of the containing device.

gupnp_service_info_get_service_type ()

const char *        gupnp_service_info_get_service_type (GUPnPServiceInfo *info);

-Get the UPnP service type, or NULL. +Get the UPnP service type, or NULL.

@@ -253,7 +253,7 @@ Get the UPnP service type, or NULL.

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. +Get the ID of this service, or NULL if there is no ID.

@@ -265,7 +265,7 @@ Get the ID of this service, or NULL if there is no - +

Returns :

A string. This string should be freed with g_free() after use.A string. This string should be freed with g_free() after use.
@@ -275,7 +275,7 @@ Get the ID of this service, or NULL if there is no

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. +Get the SCPD URL for this service, or NULL if there is no SCPD.

@@ -287,7 +287,7 @@ Get the SCPD URL for this service, or NULL if there - +

Returns :

A string. This string should be freed with g_free() after use.A string. This string should be freed with g_free() after use.
@@ -297,7 +297,7 @@ Get the SCPD URL for this service, or NULL if there

gupnp_service_info_get_control_url ()

char *              gupnp_service_info_get_control_url  (GUPnPServiceInfo *info);

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

@@ -309,7 +309,7 @@ Get the control URL for this service, or NULL.. - +

Returns :

A string. This string should be freed with g_free() after use.A string. This string should be freed with g_free() after use.
@@ -320,7 +320,7 @@ Get the control URL for this service, or NULL..
char *              gupnp_service_info_get_event_subscription_url
                                                         (GUPnPServiceInfo *info);

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

@@ -332,7 +332,7 @@ Get the event subscription URL for this service, or NULL - +

Returns :

A string. This string should be freed with g_free() after use.A string. This string should be freed with g_free() after use.
@@ -342,7 +342,7 @@ Get the event subscription URL for this service, or NULL

gupnp_service_info_get_introspection ()

GUPnPServiceIntrospection * gupnp_service_info_get_introspection
                                                         (GUPnPServiceInfo *info,
-                                                         GError **error);
+ 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 @@ -362,13 +362,13 @@ instead, this function re-enter the GMainloop before returning.

error :

-return location for a GError, or NULL +return location for a GError, or NULL

Returns :

A new GUPnPServiceIntrospection for this -service or NULL. Unref after use. [transfer full] +service or NULL. Unref after use. [transfer full] @@ -380,7 +380,7 @@ service or NULL. Unref after use. void gupnp_service_info_get_introspection_async (GUPnPServiceInfo *info, GUPnPServiceIntrospectionCallback callback, - gpointer user_data); + 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 @@ -427,7 +427,7 @@ Private property.


The "element" property

-
  "element"                  gpointer              : Write / Construct Only
+
  "element"                  gpointer              : Write / Construct Only

Private property.

@@ -436,7 +436,7 @@ Private property.

The "location" property

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

The location of the device description file.

@@ -445,7 +445,7 @@ The location of the device description file.

The "service-type" property

-
  "service-type"             gchar*                : Read / Write / Construct Only
+
  "service-type"             gchar*                : Read / Write / Construct Only

The service type.

@@ -454,7 +454,7 @@ The service type.

The "udn" property

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

The UDN of the containing device.

@@ -463,9 +463,9 @@ The UDN of the containing device.

The "url-base" property

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

-The URL base (SoupURI). +The URL base (SoupURI).

diff --git a/doc/html/GUPnPServiceProxy.html b/doc/html/GUPnPServiceProxy.html index c2e9860..2342b64 100644 --- a/doc/html/GUPnPServiceProxy.html +++ b/doc/html/GUPnPServiceProxy.html @@ -47,99 +47,99 @@ GUPnPServiceProxyAction; void (*GUPnPServiceProxyActionCallback) (GUPnPServiceProxy *proxy, GUPnPServiceProxyAction *action, - gpointer user_data); + gpointer user_data); void (*GUPnPServiceProxyNotifyCallback) (GUPnPServiceProxy *proxy, const char *variable, - GValue *value, - gpointer user_data); -gboolean gupnp_service_proxy_send_action (GUPnPServiceProxy *proxy, + GValue *value, + gpointer user_data); +gboolean gupnp_service_proxy_send_action (GUPnPServiceProxy *proxy, const char *action, - GError **error, + GError **error, ...); -gboolean gupnp_service_proxy_send_action_valist +gboolean gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, const char *action, - GError **error, + GError **error, va_list var_args); -gboolean 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); -gboolean gupnp_service_proxy_send_action_list + 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); + 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, + gpointer user_data, ...); GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_valist (GUPnPServiceProxy *proxy, const char *action, GUPnPServiceProxyActionCallback callback, - gpointer user_data, + 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); + gpointer user_data, + GHashTable *hash); GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_list (GUPnPServiceProxy *proxy, const char *action, - GList *in_names, - GList *in_values, + GList *in_names, + GList *in_values, GUPnPServiceProxyActionCallback callback, - gpointer user_data); -gboolean gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy, + gpointer user_data); +gboolean gupnp_service_proxy_end_action (GUPnPServiceProxy *proxy, GUPnPServiceProxyAction *action, - GError **error, + GError **error, ...); -gboolean gupnp_service_proxy_end_action_valist +gboolean gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy, GUPnPServiceProxyAction *action, - GError **error, + GError **error, va_list var_args); -gboolean gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy, +gboolean gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy, GUPnPServiceProxyAction *action, - GError **error, - GHashTable *hash); -gboolean gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy, + 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); + 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, +gboolean gupnp_service_proxy_add_notify (GUPnPServiceProxy *proxy, const char *variable, - GType type, + GType type, GUPnPServiceProxyNotifyCallback callback, - gpointer user_data); -gboolean gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, + gpointer user_data); +gboolean gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, const char *variable, GUPnPServiceProxyNotifyCallback callback, - gpointer user_data); + gpointer user_data); void gupnp_service_proxy_set_subscribed (GUPnPServiceProxy *proxy, - gboolean subscribed); -gboolean gupnp_service_proxy_get_subscribed (GUPnPServiceProxy *proxy); + gboolean subscribed); +gboolean gupnp_service_proxy_get_subscribed (GUPnPServiceProxy *proxy);

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPServiceInfo
          +----GUPnPServiceProxy
 
@@ -147,13 +147,13 @@

Properties

-  "subscribed"               gboolean              : Read / Write
+  "subscribed"               gboolean              : Read / Write
 

Signals

-  "subscription-lost"                              : Run Last
+  "subscription-lost"                              : Run Last
 
@@ -187,7 +187,7 @@ Opaque structure for holding in-progress action data.

GUPnPServiceProxyActionCallback ()

void                (*GUPnPServiceProxyActionCallback)  (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
-                                                         gpointer user_data);
+ gpointer user_data);

Callback notifying that action on proxy has returned and gupnp_service_proxy_end_action() etc can be called. @@ -215,8 +215,8 @@ Callback notifying that action on

GUPnPServiceProxyNotifyCallback ()

void                (*GUPnPServiceProxyNotifyCallback)  (GUPnPServiceProxy *proxy,
                                                          const char *variable,
-                                                         GValue *value,
-                                                         gpointer user_data);
+ GValue *value, + gpointer user_data);

Callback notifying that the state variable variable on proxy has changed to value. @@ -234,7 +234,7 @@ Callback notifying that the state variable variable<

value :

-The GValue of the variable being notified +The GValue of the variable being notified

user_data :

@@ -246,9 +246,9 @@ Callback notifying that the state variable variable<

gupnp_service_proxy_send_action ()

-
gboolean            gupnp_service_proxy_send_action     (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_send_action     (GUPnPServiceProxy *proxy,
                                                          const char *action,
-                                                         GError **error,
+                                                         GError **error,
                                                          ...);

Sends action action with parameters Varargs to the service exposed by @@ -269,13 +269,13 @@ a UPnPError the error code will be the same in error

error :

-The location where to store any error, or NULL +The location where to store any error, or NULL

Returns :

-TRUE if sending the action was succesful. +TRUE if sending the action was succesful.
@@ -283,14 +283,13 @@ a UPnPError the error code will be the same in error

gupnp_service_proxy_send_action_valist ()

-
gboolean            gupnp_service_proxy_send_action_valist
+
gboolean            gupnp_service_proxy_send_action_valist
                                                         (GUPnPServiceProxy *proxy,
                                                          const char *action,
-                                                         GError **error,
+                                                         GError **error,
                                                          va_list var_args);

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

@@ -306,19 +305,19 @@ use by language bindings. - +TRUE if sending the action was succesful.

error :

The location where to store any error, or NULL +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, +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.
@@ -326,15 +325,15 @@ out parameter type, and out parameter value location

gupnp_service_proxy_send_action_hash ()

-
gboolean            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);
+ 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. +GHashTables for runtime determined parameter lists.

@@ -350,25 +349,25 @@ See error :

-
- - +TRUE if sending the action was succesful.
The location where to store any error, or NULL +The location where to store any error, or NULL

in_hash :

A GHashTable of in -parameter name and GValue pairs. [element-type utf8 GValue][transfer none] +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] +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.
@@ -376,15 +375,15 @@ of out parameter name and initialized GValue pairs.

gupnp_service_proxy_send_action_list ()

-
gboolean            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);
+ 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. @@ -403,48 +402,48 @@ The synchronous variant of error :

-The location where to store any error, or NULL +The location where to store any error, or NULL

in_names :

-GList of 'in' parameter +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] +GList of values (as +GValue) that line up with in_names. [element-type GValue][transfer none]

out_names :

-GList of 'out' parameter +GList of 'out' parameter names (as strings). [element-type utf8][transfer none]

out_types :

-GList of types (as GType) +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] +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. +TRUE if sending the action was succesful.
@@ -456,7 +455,7 @@ that line up with out_names. GUPnPServiceProxy *proxy
, const char *action, GUPnPServiceProxyActionCallback callback, - gpointer user_data, + gpointer user_data, ...);

Sends action action with parameters Varargs to the service exposed by @@ -504,11 +503,10 @@ or failed. [GUPnPServiceProxy *proxy, const char *action, GUPnPServiceProxyActionCallback callback, - gpointer user_data, + gpointer user_data, va_list var_args);

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

@@ -554,10 +552,10 @@ be freed when calling GUPnPServiceProxy *proxy, const char *action, GUPnPServiceProxyActionCallback callback, - gpointer user_data, - GHashTable *hash); + gpointer user_data, + GHashTable *hash);

-See gupnp_service_proxy_begin_action(); this version takes a GHashTable +See gupnp_service_proxy_begin_action(); this version takes a GHashTable for runtime generated parameter lists.

@@ -585,7 +583,7 @@ or failed. [hash :

- @@ -604,10 +602,10 @@ be freed when calling GUPnPServiceProxyAction * gupnp_service_proxy_begin_action_list (GUPnPServiceProxy *proxy, const char *action, - GList *in_names, - GList *in_values, + GList *in_names, + GList *in_values, GUPnPServiceProxyActionCallback callback, - gpointer user_data); + gpointer user_data);

A variant of gupnp_service_proxy_begin_action that takes lists of in-parameter names, types and values. @@ -627,15 +625,15 @@ in-parameter names, types and values.

@@ -661,9 +659,9 @@ be freed when calling

gupnp_service_proxy_end_action ()

-
gboolean            gupnp_service_proxy_end_action      (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_end_action      (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
-                                                         GError **error,
+                                                         GError **error,
                                                          ...);

Retrieves the result of action. The out parameters in Varargs will be @@ -684,13 +682,13 @@ a UPnPError the error code will be the same in error

- +TRUE on success.
A GHashTable of in parameter name and GValue pairs. [element-type utf8 GValue] +A GHashTable of in parameter name and GValue pairs. [element-type utf8 GValue]

in_names :

-GList of 'in' parameter +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] +GList of values (as +GValue) that line up with in_names. [element-type GValue][transfer none]

error :

The location where to store any error, or NULL +The location where to store any error, or NULL

Returns :

-TRUE on success.
@@ -698,14 +696,13 @@ a UPnPError the error code will be the same in error

gupnp_service_proxy_end_action_valist ()

-
gboolean            gupnp_service_proxy_end_action_valist
+
gboolean            gupnp_service_proxy_end_action_valist
                                                         (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
-                                                         GError **error,
+                                                         GError **error,
                                                          va_list var_args);

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

@@ -721,7 +718,7 @@ use by language bindings. - @@ -733,7 +730,7 @@ freed after use +TRUE on success.

error :

The location where to store any error, or NULL +The location where to store any error, or NULL

Returns :

-TRUE on success.
@@ -741,12 +738,12 @@ freed after use

gupnp_service_proxy_end_action_hash ()

-
gboolean            gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GHashTable *hash);
+ GError **error, + GHashTable *hash);

-See gupnp_service_proxy_end_action(); this version takes a GHashTable for +See gupnp_service_proxy_end_action(); this version takes a GHashTable for runtime generated parameter lists.

@@ -763,19 +760,19 @@ runtime generated parameter lists. - - +TRUE on success.

error :

The location where to store any error, or NULL +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] +A GHashTable of +out parameter name and initialised GValue pairs. [element-type utf8 GValue][inout][transfer none]

Returns :

-TRUE on success.
@@ -783,20 +780,20 @@ out parameter name and initialised GValue pairs.

gupnp_service_proxy_end_action_list ()

-
gboolean            gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
                                                          GUPnPServiceProxyAction *action,
-                                                         GError **error,
-                                                         GList *out_names,
-                                                         GList *out_types,
-                                                         GList **out_values);
+ 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.

-Return value : TRUE on success. +Return value : TRUE on success.

@@ -812,28 +809,28 @@ Return value : TRUE on success. - @@ -865,11 +862,11 @@ Cancels action, freeing the

gupnp_service_proxy_add_notify ()

-
gboolean            gupnp_service_proxy_add_notify      (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_add_notify      (GUPnPServiceProxy *proxy,
                                                          const char *variable,
-                                                         GType type,
+                                                         GType type,
                                                          GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
+ gpointer user_data);

Sets up callback to be called whenever a change notification for variable is recieved. @@ -903,7 +900,7 @@ Sets up callback to be called whenever a

+TRUE on success.

error :

The location where to store any error, or NULL +The location where to store any error, or NULL

out_names :

-GList of 'out' parameter +GList of 'out' parameter names (as strings). [element-type utf8][transfer none]

out_types :

-GList of types (as GType) +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] +GList of values +(as GValue) that line up with out_names and out_types. [element-type GValue][transfer full][out]

Returns :

-TRUE on success.
@@ -911,13 +908,18 @@ Sets up callback to be called whenever a

gupnp_service_proxy_remove_notify ()

-
gboolean            gupnp_service_proxy_remove_notify   (GUPnPServiceProxy *proxy,
+
gboolean            gupnp_service_proxy_remove_notify   (GUPnPServiceProxy *proxy,
                                                          const char *variable,
                                                          GUPnPServiceProxyNotifyCallback callback,
-                                                         gpointer user_data);
+ 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. +

@@ -943,7 +945,7 @@ Cancels the variable change notification for callbac +TRUE on success.

Returns :

-TRUE on success.
@@ -952,7 +954,7 @@ Cancels the variable change notification for callbac

gupnp_service_proxy_set_subscribed ()

void                gupnp_service_proxy_set_subscribed  (GUPnPServiceProxy *proxy,
-                                                         gboolean subscribed);
+ gboolean subscribed);

(Un)subscribes to this service.

@@ -973,7 +975,7 @@ destruction instead.

subscribed :

-TRUE to subscribe to this service +TRUE to subscribe to this service
@@ -981,7 +983,7 @@ destruction instead.

gupnp_service_proxy_get_subscribed ()

-
gboolean            gupnp_service_proxy_get_subscribed  (GUPnPServiceProxy *proxy);
+
gboolean            gupnp_service_proxy_get_subscribed  (GUPnPServiceProxy *proxy);

Returns if we are subscribed to this service.

@@ -996,7 +998,7 @@ Returns if we are subscribed to this service.

Returns :

-TRUE if we are subscribed to this service, otherwise FALSE. +TRUE if we are subscribed to this service, otherwise FALSE.
@@ -1006,7 +1008,7 @@ Returns if we are subscribed to this service.

Property Details

The "subscribed" property

-
  "subscribed"               gboolean              : Read / Write
+
  "subscribed"               gboolean              : Read / Write

Whether we are subscribed to this service.

@@ -1018,8 +1020,8 @@ Whether we are subscribed to this service.

The "subscription-lost" signal

void                user_function                      (GUPnPServiceProxy *proxy,
-                                                        gpointer           error,
-                                                        gpointer           user_data)      : Run Last
+ gpointer error, + gpointer user_data) : Run Last

Emitted whenever the subscription to this service has been lost due to an error condition. @@ -1033,7 +1035,7 @@ to an error condition.

error :

-A pointer to a GError describing why the subscription has +A pointer to a GError describing why the subscription has been lost. [type GError] diff --git a/doc/html/GUPnPXMLDoc.html b/doc/html/GUPnPXMLDoc.html index 38b9a11..2e4ae2a 100644 --- a/doc/html/GUPnPXMLDoc.html +++ b/doc/html/GUPnPXMLDoc.html @@ -42,13 +42,13 @@
struct              GUPnPXMLDoc;
 GUPnPXMLDoc *       gupnp_xml_doc_new                   (xmlDoc *xml_doc);
 GUPnPXMLDoc *       gupnp_xml_doc_new_from_path         (const char *path,
-                                                         GError **error);
+                                                         GError **error);
 

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPXMLDoc
 
@@ -86,7 +86,7 @@ Create a new

Returns :

-A new
GUPnPXMLDoc, or NULL on an error +A new GUPnPXMLDoc, or NULL on an error
@@ -95,7 +95,7 @@ Create a new

gupnp_xml_doc_new_from_path ()

GUPnPXMLDoc *       gupnp_xml_doc_new_from_path         (const char *path,
-                                                         GError **error);
+ GError **error);

Create a new GUPnPXMLDoc for the XML document at path.

@@ -112,7 +112,7 @@ Create a new

Returns :

-A new
GUPnPXMLDoc, or NULL on an error +A new GUPnPXMLDoc, or NULL on an error
diff --git a/doc/html/client-tutorial.html b/doc/html/client-tutorial.html index 7f635e0..ae4850e 100644 --- a/doc/html/client-tutorial.html +++ b/doc/html/client-tutorial.html @@ -24,7 +24,7 @@ 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 @@ -66,7 +66,9 @@ main (int argc, char **argv) GUPnPControlPoint *cp; /* Required initialisation */ - g_type_init (); + #if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); + #endif /* Create a new GUPnP Context. By here we are using the default GLib main context, and connecting to the current machine's default IP on an @@ -102,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 @@ -152,7 +154,7 @@ service_proxy_available_cb (GUPnPControlPoint *cp,

-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 @@ -187,7 +189,7 @@ service_proxy_available_cb (GUPnPControlPoint *cp,

-Generating Wrappers

+Generating Wrappers

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 diff --git a/doc/html/gupnp-Error-codes.html b/doc/html/gupnp-Error-codes.html index a565d32..305f420 100644 --- a/doc/html/gupnp-Error-codes.html +++ b/doc/html/gupnp-Error-codes.html @@ -57,13 +57,13 @@ enum #define GUPNP_SERVER_ERROR (gupnp_server_error_quark ())

-The 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.a GQuark uniquely used by GUPnP's server errors.
@@ -80,7 +80,7 @@ The GQuark uniquely used by GUPnP's server errors. } GUPnPServerError;

-GError codes used for errors in the GUPNP_SERVER_ERROR domain, when there +GError codes used for errors in the GUPNP_SERVER_ERROR domain, when there is communication with another server.

@@ -125,13 +125,13 @@ is communication with another server.
#define GUPNP_EVENTING_ERROR (gupnp_eventing_error_quark ())
 

-The GQuark uniquely used by GUPnP's eventing errors. +The GQuark uniquely used by GUPnP's eventing errors.

- +

Returns :

a GQuark uniquely used by GUPnP's eventing errors.a GQuark uniquely used by GUPnP's eventing errors.
@@ -145,7 +145,7 @@ The GQuark uniquely used by GUPnP's eventing errors. } GUPnPEventingError;

-GError codes used for errors in the GUPNP_EVENTING_ERROR domain, during +GError codes used for errors in the GUPNP_EVENTING_ERROR domain, during eventing of state variables.

@@ -175,13 +175,13 @@ eventing of state variables.
#define GUPNP_CONTROL_ERROR (gupnp_control_error_quark ())
 

-The GQuark uniquely used by GUPnP's control errors. +The GQuark uniquely used by GUPnP's control errors.

- +

Returns :

a GQuark uniquely used by GUPnP's control errors.a GQuark uniquely used by GUPnP's control errors.
@@ -196,7 +196,7 @@ The GQuark uniquely used by GUPnP's control errors. } GUPnPControlError;

-GError codes used for errors in the GUPNP_CONTROL_ERROR domain, during +GError codes used for errors in the GUPNP_CONTROL_ERROR domain, during invocation of service actions.

@@ -231,13 +231,13 @@ invocation of service actions.
#define GUPNP_XML_ERROR (gupnp_xml_error_quark ())
 

-The GQuark uniquely used by GUPnP XML processing errors. +The GQuark uniquely used by GUPnP XML processing errors.

- +

Returns :

a GQuark uniquely used by GUPnP XML processing errors.a GQuark uniquely used by GUPnP XML processing errors.
@@ -253,7 +253,7 @@ The GQuark uniquely used by GUPnP XML processing error } GUPnPXMLError;

-GError codes used for errors in the GUPNP_XML_ERROR domain, during +GError codes used for errors in the GUPNP_XML_ERROR domain, during processing of XML data.

diff --git a/doc/html/gupnp-binding-tool.html b/doc/html/gupnp-binding-tool.html index 8ec03f5..4db7fc0 100644 --- a/doc/html/gupnp-binding-tool.html +++ b/doc/html/gupnp-binding-tool.html @@ -33,7 +33,7 @@

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: diff --git a/doc/html/gupnp-gupnp-service-introspection.html b/doc/html/gupnp-gupnp-service-introspection.html index f791ba3..25e3d5e 100644 --- a/doc/html/gupnp-gupnp-service-introspection.html +++ b/doc/html/gupnp-gupnp-service-introspection.html @@ -46,33 +46,33 @@ GUPnPServiceActionInfo; GUPnPServiceStateVariableInfo; struct GUPnPServiceIntrospection; -const GList * gupnp_service_introspection_list_action_names +const GList * gupnp_service_introspection_list_action_names (GUPnPServiceIntrospection *introspection); -const GList * gupnp_service_introspection_list_actions +const GList * gupnp_service_introspection_list_actions (GUPnPServiceIntrospection *introspection); const GUPnPServiceActionInfo * gupnp_service_introspection_get_action (GUPnPServiceIntrospection *introspection, - const gchar *action_name); -const GList * gupnp_service_introspection_list_state_variable_names + const gchar *action_name); +const GList * gupnp_service_introspection_list_state_variable_names (GUPnPServiceIntrospection *introspection); -const GList * gupnp_service_introspection_list_state_variables +const GList * gupnp_service_introspection_list_state_variables (GUPnPServiceIntrospection *introspection); const GUPnPServiceStateVariableInfo * gupnp_service_introspection_get_state_variable (GUPnPServiceIntrospection *introspection, - const gchar *variable_name); + const gchar *variable_name);

Object Hierarchy

-  GObject
+  GObject
    +----GUPnPServiceIntrospection
 

Properties

-  "scpd"                     gpointer              : Write / Construct Only
+  "scpd"                     gpointer              : Write / Construct Only
 
@@ -155,7 +155,7 @@ This structure contains information about the argument of service action. argument.
- + @@ -180,7 +180,7 @@ This structure contains information about a service action. - + @@ -214,39 +214,39 @@ This structure contains information about service state variable. - + - + - + - + - + - + - + - + +the actions or NULL. Do not modify or free it or its contents.

gboolean retval;

gboolean retval;

Whether this argument is the return value of the action.
The name of the action argument.

GList *arguments;

GList *arguments;

A GList of all the arguments (of type GUPnPServiceActionArgInfo) of this action. [type GList][element-type GUPnP.ServiceActionArgInfo] The name of the state variable.

gboolean send_events;

gboolean send_events;

Whether this state variable can source events.

gboolean is_numeric;

gboolean is_numeric;

Wether this state variable is a numeric type (integer and float).

GType type;

GType type;

The GType of this state variable.

GValue default_value;

GValue default_value;

The default value of this state variable.

GValue minimum;

GValue minimum;

The minimum value of this state variable. Only applies to numeric data types.

GValue maximum;

GValue maximum;

The maximum value of this state variable. Only applies to numeric data types.

GValue step;

GValue step;

The step value of this state variable. Only applies to numeric data types.

GList *allowed_values;

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] @@ -267,7 +267,7 @@ functions below.

gupnp_service_introspection_list_action_names ()

-
const GList *       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. @@ -283,7 +283,7 @@ Returns a GList of names of all the actions in this service.

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.
@@ -291,10 +291,10 @@ the actions or NULL. Do not modify or free it or it

gupnp_service_introspection_list_actions ()

-
const GList *       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 +Returns a GList of all the actions (of type GUPnPServiceActionInfo) in this service.

@@ -308,7 +308,7 @@ this service. @@ -320,7 +320,7 @@ contents. [

gupnp_service_introspection_get_action ()

const GUPnPServiceActionInfo * gupnp_service_introspection_get_action
                                                         (GUPnPServiceIntrospection *introspection,
-                                                         const gchar *action_name);
+ const gchar *action_name);

Returns the action by the name action_name in this service.

@@ -338,7 +338,7 @@ Returns the action by the name action_name
- @@ -348,10 +348,10 @@ it. [

gupnp_service_introspection_list_state_variable_names ()

-
const GList *       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. +Returns a GList of names of all the state variables in this service.

Returns :

A -GList of all the actions or NULL. Do not modify or free it or its +GList of all the actions or NULL. Do not modify or free it or its contents. [element-type GUPnP.ServiceActionInfo][transfer none]

Returns :

the action or NULL. Do not modify or free +the action or NULL. Do not modify or free it. [transfer none]
@@ -363,8 +363,8 @@ Returns a GList of names of all the state variables in - @@ -373,7 +373,7 @@ the state variables or NULL. Do not modify or free

gupnp_service_introspection_list_state_variables ()

-
const GList *       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 @@ -389,7 +389,7 @@ Returns a GList of all the state variables (of type

- @@ -401,7 +401,7 @@ its contents. [

gupnp_service_introspection_get_state_variable ()

const GUPnPServiceStateVariableInfo * gupnp_service_introspection_get_state_variable
                                                         (GUPnPServiceIntrospection *introspection,
-                                                         const gchar *variable_name);
+ const gchar *variable_name);

Returns the state variable by the name variable_name in this service.

@@ -419,7 +419,7 @@ Returns the state variable by the name variable_name
- @@ -431,7 +431,7 @@ free it. [

Property Details

The "scpd" property

-
  "scpd"                     gpointer              : Write / Construct Only
+
  "scpd"                     gpointer              : Write / Construct Only

The scpd of the device description file.

diff --git a/doc/html/gupnp.devhelp2 b/doc/html/gupnp.devhelp2 index 865458f..7f1fb59 100644 --- a/doc/html/gupnp.devhelp2 +++ b/doc/html/gupnp.devhelp2 @@ -156,6 +156,7 @@ + @@ -210,6 +211,7 @@ + diff --git a/doc/html/index.html b/doc/html/index.html index 0083457..0d0e089 100644 --- a/doc/html/index.html +++ b/doc/html/index.html @@ -14,11 +14,11 @@

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] +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]

Returns :

A GList of all the state variables or NULL. Do not modify or free it or +A GList of all the state variables or NULL. Do not modify or free it or its contents. [element-type GUPnP.ServiceStateVariableInfo][transfer none]

Returns :

the state variable or NULL. Do not modify or +the state variable or NULL. Do not modify or free it. [transfer none]
-

Version 0.19.1 +

Version 0.20.1

-

+

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 diff --git a/doc/html/index.sgml b/doc/html/index.sgml index 3dc7333..87a8347 100644 --- a/doc/html/index.sgml +++ b/doc/html/index.sgml @@ -170,6 +170,7 @@ + @@ -250,6 +251,7 @@ + diff --git a/doc/html/ix01.html b/doc/html/ix01.html index bed4184..3c24fdb 100644 --- a/doc/html/ix01.html +++ b/doc/html/ix01.html @@ -20,7 +20,7 @@

-Index

+Index

G

@@ -176,6 +176,8 @@
gupnp_context_manager_create, gupnp_context_manager_create ()
+
gupnp_context_manager_get_port, gupnp_context_manager_get_port () +
gupnp_context_manager_manage_control_point, gupnp_context_manager_manage_control_point ()
gupnp_context_manager_manage_root_device, gupnp_context_manager_manage_root_device () @@ -276,6 +278,8 @@
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_new, gupnp_root_device_new ()
gupnp_root_device_new_full, gupnp_root_device_new_full () diff --git a/doc/html/server-tutorial.html b/doc/html/server-tutorial.html index 4c9c271..41c6518 100644 --- a/doc/html/server-tutorial.html +++ b/doc/html/server-tutorial.html @@ -24,7 +24,7 @@ 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,7 +211,7 @@

-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, @@ -219,7 +219,9 @@

GUPnPContext *context;
 /* Initialize required subsystems */
-g_type_init ();
+#if !GLIB_CHECK_VERSION(2,35,0)
+  g_type_init ();
+#endif
 /* Create the GUPnP context with default host and port */
 context = gupnp_context_new (NULL, NULL, 0, NULL);

@@ -247,7 +249,7 @@ 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 @@ -356,7 +358,7 @@ g_signal_connect (service, "query-variable::Status", G_CALLBACK (query_status_cb

-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) diff --git a/doc/server-tutorial.xml b/doc/server-tutorial.xml index 4066bcc..06f1501 100644 --- a/doc/server-tutorial.xml +++ b/doc/server-tutorial.xml @@ -129,7 +129,9 @@ GUPnPContext *context; /* Initialize required subsystems */ -g_type_init (); +#if !GLIB_CHECK_VERSION(2,35,0) + g_type_init (); +#endif /* Create the GUPnP context with default host and port */ context = gupnp_context_new (NULL, NULL, 0, NULL); diff --git a/doc/tmpl/gupnp-context-manager.sgml b/doc/tmpl/gupnp-context-manager.sgml index 96ecaf4..68026a3 100644 --- a/doc/tmpl/gupnp-context-manager.sgml +++ b/doc/tmpl/gupnp-context-manager.sgml @@ -91,3 +91,12 @@ GUPnPContextManager @root_device: + + + + + +@manager: +@Returns: + + diff --git a/doc/tmpl/gupnp-context.sgml b/doc/tmpl/gupnp-context.sgml index ad3c675..8c04c5b 100644 --- a/doc/tmpl/gupnp-context.sgml +++ b/doc/tmpl/gupnp-context.sgml @@ -59,7 +59,7 @@ GUPnPContext @main_context: -@interface: +@iface: @port: @error: @Returns: diff --git a/doc/tmpl/gupnp-root-device.sgml b/doc/tmpl/gupnp-root-device.sgml index 18989e1..4e7894a 100644 --- a/doc/tmpl/gupnp-root-device.sgml +++ b/doc/tmpl/gupnp-root-device.sgml @@ -117,3 +117,12 @@ GUPnPRootDevice @Returns: + + + + + +@root_device: +@Returns: + + diff --git a/examples/light-client.c b/examples/light-client.c index 2944c2a..69f2b74 100644 --- a/examples/light-client.c +++ b/examples/light-client.c @@ -77,7 +77,10 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPControlPoint *cp; +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif + /* Check and parse command line arguments */ if (argc != 2) { diff --git a/examples/light-server.c b/examples/light-server.c index 7b7caba..eecd51d 100644 --- a/examples/light-server.c +++ b/examples/light-server.c @@ -109,7 +109,9 @@ main (int argc, char **argv) GUPnPRootDevice *dev; GUPnPServiceInfo *service; +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif /* By default the light is off */ status = FALSE; diff --git a/libgupnp/Makefile.am b/libgupnp/Makefile.am index 864e450..2843d68 100644 --- a/libgupnp/Makefile.am +++ b/libgupnp/Makefile.am @@ -1,7 +1,14 @@ LTVERSION = 4:0:0 +if OS_WIN32 +CONTEXT_MANAGER_IMPL = gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h +CONTEXT_MANAGER_CFLAGS = +CONTEXT_MANAGER_LIBS = -lws2_32 -liphlpapi +WIN32_LDFLAGS = -no-undefined +else CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h + gupnp-unix-context-manager.h if USE_NETWORK_MANAGER CONTEXT_MANAGER_IMPL += gupnp-network-manager.c \ gupnp-network-manager.h @@ -13,6 +20,7 @@ CONTEXT_MANAGER_IMPL += gupnp-connman-manager.c \ CONTEXT_MANAGER_CFLAGS = -DUSE_CONNMAN endif endif +endif if HAVE_NETLINK CONTEXT_MANAGER_IMPL += \ @@ -79,7 +87,7 @@ gupnp-marshal.h: gupnp-marshal.list BUILT_SOURCES = gupnp-marshal.c gupnp-marshal.h -libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) +libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) $(WIN32_LDFLAGS) libgupnp_1_0_la_SOURCES = $(introspection_sources) \ http-headers.c \ @@ -100,7 +108,7 @@ libgupnp_1_0_la_SOURCES = $(introspection_sources) \ gena-protocol.h \ $(BUILT_SOURCES) -libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(LIBCONIC_LIBS) +libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(CONTEXT_MANAGER_LIBS) EXTRA_DIST = gupnp-marshal.list \ gupnp-network-manager.c \ @@ -110,7 +118,9 @@ EXTRA_DIST = gupnp-marshal.list \ gupnp-linux-context-manager.c \ gupnp-linux-context-manager.h \ gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h + gupnp-unix-context-manager.h \ + gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h -include $(INTROSPECTION_MAKEFILE) INTROSPECTION_GIRS = diff --git a/libgupnp/Makefile.in b/libgupnp/Makefile.in index 04c2da9..77c26ef 100644 --- a/libgupnp/Makefile.in +++ b/libgupnp/Makefile.in @@ -54,11 +54,11 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -@USE_NETWORK_MANAGER_TRUE@am__append_1 = gupnp-network-manager.c \ -@USE_NETWORK_MANAGER_TRUE@ gupnp-network-manager.h +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@am__append_1 = gupnp-network-manager.c \ +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@ gupnp-network-manager.h -@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__append_2 = gupnp-connman-manager.c \ -@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@ gupnp-connman-manager.h +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__append_2 = gupnp-connman-manager.c \ +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@ gupnp-connman-manager.h @HAVE_NETLINK_TRUE@am__append_3 = \ @HAVE_NETLINK_TRUE@ gupnp-linux-context-manager.c \ @@ -111,7 +111,8 @@ am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(girdir)" \ "$(DESTDIR)$(typelibdir)" "$(DESTDIR)$(libgupnpincdir)" LTLIBRARIES = $(lib_LTLIBRARIES) am__DEPENDENCIES_1 = -libgupnp_1_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) +libgupnp_1_0_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ + $(am__DEPENDENCIES_1) am__libgupnp_1_0_la_SOURCES_DIST = 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 \ @@ -128,7 +129,8 @@ am__libgupnp_1_0_la_SOURCES_DIST = gupnp-context.h \ gupnp-unix-context-manager.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-simple-context-manager.h \ + gupnp-linux-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 \ @@ -141,11 +143,15 @@ am__objects_2 = $(am__objects_1) gupnp-context.lo \ gupnp-error.lo gupnp-resource-factory.lo gupnp-root-device.lo \ gupnp-service.lo gupnp-service-info.lo gupnp-service-proxy.lo \ gupnp-service-introspection.lo gupnp-xml-doc.lo gupnp-types.lo -@USE_NETWORK_MANAGER_TRUE@am__objects_3 = gupnp-network-manager.lo -@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@am__objects_4 = gupnp-connman-manager.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 -am__objects_6 = gupnp-unix-context-manager.lo $(am__objects_3) \ - $(am__objects_4) $(am__objects_5) +@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) +@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) am__objects_7 = gupnp-marshal.lo am_libgupnp_1_0_la_OBJECTS = $(am__objects_2) http-headers.lo \ $(am__objects_6) gupnp-simple-context-manager.lo \ @@ -347,11 +353,17 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ LTVERSION = 4:0:0 -CONTEXT_MANAGER_IMPL = gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h $(am__append_1) $(am__append_2) \ - $(am__append_3) -@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@CONTEXT_MANAGER_CFLAGS = -DUSE_CONNMAN -@USE_NETWORK_MANAGER_TRUE@CONTEXT_MANAGER_CFLAGS = -DUSE_NETWORK_MANAGER +@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) +@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) +@OS_WIN32_FALSE@@USE_CONNMAN_TRUE@@USE_NETWORK_MANAGER_FALSE@CONTEXT_MANAGER_CFLAGS = -DUSE_CONNMAN +@OS_WIN32_FALSE@@USE_NETWORK_MANAGER_TRUE@CONTEXT_MANAGER_CFLAGS = -DUSE_NETWORK_MANAGER +@OS_WIN32_TRUE@CONTEXT_MANAGER_CFLAGS = +@OS_WIN32_TRUE@CONTEXT_MANAGER_LIBS = -lws2_32 -liphlpapi +@OS_WIN32_TRUE@WIN32_LDFLAGS = -no-undefined @USE_NETLINK_FALSE@NETLINK_CFLAGS = @USE_NETLINK_TRUE@NETLINK_CFLAGS = -DUSE_NETLINK AM_CFLAGS = $(LIBGUPNP_CFLAGS) \ @@ -397,7 +409,7 @@ introspection_sources = $(libgupnpinc_HEADERS) \ gupnp-types.c BUILT_SOURCES = gupnp-marshal.c gupnp-marshal.h -libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) +libgupnp_1_0_la_LDFLAGS = -version-info $(LTVERSION) $(WIN32_LDFLAGS) libgupnp_1_0_la_SOURCES = $(introspection_sources) \ http-headers.c \ http-headers.h \ @@ -417,7 +429,7 @@ libgupnp_1_0_la_SOURCES = $(introspection_sources) \ gena-protocol.h \ $(BUILT_SOURCES) -libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(LIBCONIC_LIBS) +libgupnp_1_0_la_LIBADD = $(LIBGUPNP_LIBS) $(DBUS_GLIB_LIBS) $(CONTEXT_MANAGER_LIBS) EXTRA_DIST = gupnp-marshal.list \ gupnp-network-manager.c \ gupnp-network-manager.h \ @@ -426,7 +438,9 @@ EXTRA_DIST = gupnp-marshal.list \ gupnp-linux-context-manager.c \ gupnp-linux-context-manager.h \ gupnp-unix-context-manager.c \ - gupnp-unix-context-manager.h + gupnp-unix-context-manager.h \ + gupnp-windows-context-manager.c \ + gupnp-windows-context-manager.h INTROSPECTION_GIRS = $(am__append_4) INTROSPECTION_SCANNER_ARGS = --warn-all \ @@ -545,6 +559,7 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-simple-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-unix-context-manager.Plo@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-windows-context-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gupnp-xml-doc.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gvalue-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/http-headers.Plo@am__quote@ diff --git a/libgupnp/gupnp-context-manager.c b/libgupnp/gupnp-context-manager.c index 2888a1b..709f6d5 100644 --- a/libgupnp/gupnp-context-manager.c +++ b/libgupnp/gupnp-context-manager.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "gupnp.h" @@ -336,7 +337,11 @@ 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" + impl_type = GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER; +#else #ifdef USE_NETWORK_MANAGER #include "gupnp-network-manager.h" system_bus = g_bus_get_sync (G_BUS_TYPE_SYSTEM, NULL, NULL); @@ -360,7 +365,7 @@ gupnp_context_manager_create (guint port) #else impl_type = GUPNP_TYPE_UNIX_CONTEXT_MANAGER; #endif - +#endif /* G_OS_WIN32 */ impl = g_object_new (impl_type, "port", port, NULL); @@ -425,7 +430,7 @@ gupnp_context_manager_manage_root_device (GUPnPContextManager *manager, guint gupnp_context_manager_get_port (GUPnPContextManager *manager) { - g_return_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager)); + g_return_val_if_fail (GUPNP_IS_CONTEXT_MANAGER (manager), 0); return manager->priv->port; } diff --git a/libgupnp/gupnp-context.c b/libgupnp/gupnp-context.c index 114b1b3..cbb7025 100644 --- a/libgupnp/gupnp-context.c +++ b/libgupnp/gupnp-context.c @@ -30,7 +30,7 @@ * 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. + * exporting %GUPNP_DEBUG. */ #include @@ -40,9 +40,10 @@ #include #include #include +#include +#ifndef G_OS_WIN32 #include -#include -#include +#endif #include #include #include @@ -115,6 +116,20 @@ static GInitableIface* initable_parent_iface = NULL; static char * make_server_id (void) { +#ifdef G_OS_WIN32 + OSVERSIONINFO versioninfo; + versioninfo.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (GetVersionEx (&versioninfo)) { + return g_strdup_printf ("Microsoft Windows/%ld.%ld" + " UPnP/1.0 GUPnP/%s", + versioninfo.dwMajorVersion, + versioninfo.dwMinorVersion, + VERSION); + } else { + return g_strdup_printf ("Microsoft Windows UPnP/1.0 GUPnP/%s", + VERSION); + } +#else struct utsname sysinfo; uname (&sysinfo); @@ -123,6 +138,7 @@ make_server_id (void) sysinfo.sysname, sysinfo.release, VERSION); +#endif } static void @@ -547,19 +563,19 @@ _gupnp_context_get_server_url (GUPnPContext *context) * gupnp_context_new: * @main_context: (allow-none): Deprecated: 0.17.2: Always set to %NULL. If you * want to use a different context, use g_main_context_push_thread_default(). - * @interface: (allow-none): The network interface to use, or %NULL to + * @iface: (allow-none): The network interface to use, or %NULL to * auto-detect. * @port: Port to run on, or 0 if you don't care what port is used. * @error: A location to store a #GError, or %NULL * - * Create a new #GUPnPContext with the specified @main_context, @interface and + * Create a new #GUPnPContext with the specified @main_context, @iface and * @port. * * Return value: A new #GUPnPContext object, or %NULL on an error **/ GUPnPContext * gupnp_context_new (GMainContext *main_context, - const char *interface, + const char *iface, guint port, GError **error) { @@ -571,7 +587,7 @@ gupnp_context_new (GMainContext *main_context, return g_initable_new (GUPNP_TYPE_CONTEXT, NULL, error, - "interface", interface, + "interface", iface, "port", port, NULL); } diff --git a/libgupnp/gupnp-context.h b/libgupnp/gupnp-context.h index d26e790..a2e2f9e 100644 --- a/libgupnp/gupnp-context.h +++ b/libgupnp/gupnp-context.h @@ -80,7 +80,7 @@ struct _GUPnPContextClass { GUPnPContext * gupnp_context_new (GMainContext *main_context, - const char *interface, + const char *iface, guint port, GError **error); diff --git a/libgupnp/gupnp-control-point.c b/libgupnp/gupnp-control-point.c index 8e78042..deb19da 100644 --- a/libgupnp/gupnp-control-point.c +++ b/libgupnp/gupnp-control-point.c @@ -323,6 +323,44 @@ create_and_report_device_proxy (GUPnPControlPoint *control_point, proxy); } +static gboolean +compare_service_types_versioned (const char *searched_service, + const char *current_service) +{ + const char *searched_version_ptr, *current_version_ptr; + guint searched_version, current_version, searched_length; + guint current_length; + + searched_version_ptr = strrchr (searched_service, ':'); + if (searched_version_ptr == NULL) + return FALSE; + + current_version_ptr = strrchr (current_service, ':'); + if (current_version_ptr == NULL) + return FALSE; + + searched_length = (searched_version_ptr - searched_service); + current_length = (current_version_ptr - current_service); + + if (searched_length != current_length) + return FALSE; + + searched_version = (guint) atol (searched_version_ptr + 1); + if (searched_version == 0) + return FALSE; + + current_version = (guint) atol (current_version_ptr + 1); + if (current_version == 0) + return FALSE; + + if (current_version < searched_version) + return FALSE; + + return strncmp (searched_service, + current_service, + searched_length) == 0; +} + /* Search @element for matching services */ static void process_service_list (xmlNode *element, @@ -348,8 +386,8 @@ process_service_list (xmlNode *element, if (!prop) continue; - match = (strcmp ((char *) prop, service_type) == 0); - + match = compare_service_types_versioned (service_type, + (char *) prop); xmlFree (prop); if (!match) diff --git a/libgupnp/gupnp-linux-context-manager.c b/libgupnp/gupnp-linux-context-manager.c index 7d36cda..a5d1c46 100644 --- a/libgupnp/gupnp-linux-context-manager.c +++ b/libgupnp/gupnp-linux-context-manager.c @@ -473,6 +473,8 @@ query_all_network_interfaces (GUPnPLinuxContextManager *self) do { receive_netlink_message (self, &error); } while (error == NULL); + + g_error_free (error); } static void diff --git a/libgupnp/gupnp-root-device.c b/libgupnp/gupnp-root-device.c index d6aca04..1e46798 100644 --- a/libgupnp/gupnp-root-device.c +++ b/libgupnp/gupnp-root-device.c @@ -698,3 +698,19 @@ gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device) return root_device->priv->description_dir; } + +/** + * gupnp_root_device_get_ssdp_resource_group: + * @root_device: A #GUPnPRootDevice + * + * Get the #GSSDPResourceGroup used by @root_device. + * + * Returns: (transfer none): The #GSSDPResourceGroup of @root_device. + **/ +GSSDPResourceGroup * +gupnp_root_device_get_ssdp_resource_group (GUPnPRootDevice *root_device) +{ + g_return_val_if_fail (GUPNP_IS_ROOT_DEVICE (root_device), NULL); + + return root_device->priv->group; +} diff --git a/libgupnp/gupnp-root-device.h b/libgupnp/gupnp-root-device.h index afaaa32..0c08791 100644 --- a/libgupnp/gupnp-root-device.h +++ b/libgupnp/gupnp-root-device.h @@ -24,6 +24,8 @@ #include +#include + #include "gupnp-context.h" #include "gupnp-device.h" #include "gupnp-resource-factory.h" @@ -112,6 +114,10 @@ const char * gupnp_root_device_get_description_dir (GUPnPRootDevice *root_device); +GSSDPResourceGroup * +gupnp_root_device_get_ssdp_resource_group + (GUPnPRootDevice *root_device); + G_END_DECLS #endif /* __GUPNP_ROOT_DEVICE_H__ */ diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c index 04811ca..74ea84b 100644 --- a/libgupnp/gupnp-service-proxy.c +++ b/libgupnp/gupnp-service-proxy.c @@ -90,9 +90,6 @@ struct _GUPnPServiceProxyAction { GError *error; /* If non-NULL, description of error that occurred when preparing message */ - - va_list var_args; /* The va_list after begin_action_valist has - gone through it. Used by send_action_valist(). */ }; typedef struct { @@ -410,6 +407,132 @@ stop_main_loop (GUPnPServiceProxy *proxy, g_main_loop_quit ((GMainLoop *) user_data); } +/* This is a skip variant of G_VALUE_LCOPY, same as there is + * G_VALUE_COLLECT_SKIP for G_VALUE_COLLECT. + */ +#define VALUE_LCOPY_SKIP(value_type, var_args) \ + G_STMT_START { \ + GTypeValueTable *_vtable = g_type_value_table_peek (value_type); \ + const gchar *_lcopy_format = _vtable->lcopy_format; \ + \ + while (*_lcopy_format) { \ + switch (*_lcopy_format++) { \ + case G_VALUE_COLLECT_INT: \ + va_arg ((var_args), gint); \ + break; \ + case G_VALUE_COLLECT_LONG: \ + va_arg ((var_args), glong); \ + break; \ + case G_VALUE_COLLECT_INT64: \ + va_arg ((var_args), gint64); \ + break; \ + case G_VALUE_COLLECT_DOUBLE: \ + va_arg ((var_args), gdouble); \ + break; \ + case G_VALUE_COLLECT_POINTER: \ + va_arg ((var_args), gpointer); \ + break; \ + default: \ + g_assert_not_reached (); \ + } \ + } \ + } G_STMT_END + +/* Initializes hash table to hold arg names as keys and GValues of + * given type, but without any specific value. Note that if you are + * going to use OUT_HASH_TABLE_TO_VAR_ARGS then you have to store a + * copy of var_args with G_VA_COPY before using this macro. + */ +#define VAR_ARGS_TO_OUT_HASH_TABLE(var_args, hash) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_new0 (GValue, 1); \ + GType type = va_arg (var_args, GType); \ + \ + VALUE_LCOPY_SKIP (type, var_args); \ + g_value_init (value, type); \ + g_hash_table_insert (hash, g_strdup (arg_name), value); \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + } G_STMT_END + +/* 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) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_new0 (GValue, 1); \ + gchar *error = NULL; \ + GType type = va_arg (var_args, GType); \ + \ + G_VALUE_COLLECT_INIT (value, \ + type, \ + var_args, \ + G_VALUE_NOCOPY_CONTENTS, \ + &error); \ + if (error == NULL) { \ + g_hash_table_insert (hash, g_strdup (arg_name), value); \ + } else { \ + g_warning ("Failed to collect value of type %s for %s: %s", \ + g_type_name (type), \ + arg_name, \ + error); \ + g_free (error); \ + } \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + } G_STMT_END + +/* Puts values stored in hash table with GValues into var args. + */ +#define OUT_HASH_TABLE_TO_VAR_ARGS(hash, var_args) \ + G_STMT_START { \ + const gchar *arg_name = va_arg (var_args, const gchar *); \ + \ + while (arg_name != NULL) { \ + GValue *value = g_hash_table_lookup (hash, arg_name); \ + GType type = va_arg (var_args, GType); \ + \ + if (value == NULL) { \ + g_warning ("No value for %s", arg_name); \ + G_VALUE_COLLECT_SKIP (type, var_args); \ + } else if (G_VALUE_TYPE (value) != type) { \ + g_warning ("Different GType in value (%s) and in var args (%s) for %s.", \ + G_VALUE_TYPE_NAME (value), \ + g_type_name (type), \ + arg_name); \ + } else { \ + gchar *error = NULL; \ + \ + G_VALUE_LCOPY (value, var_args, 0, &error); \ + if (error != NULL) { \ + g_warning ("Failed to lcopy the value of type %s for %s: %s", \ + g_type_name (type), \ + arg_name, \ + error); \ + g_free (error); \ + } \ + } \ + arg_name = va_arg (var_args, const gchar *); \ + } \ + } G_STMT_END + +/* GDestroyNotify for GHashTable holding GValues. + */ +static void +value_free (gpointer data) +{ + GValue *value = (GValue *) data; + + g_value_unset (value); + g_free (value); +} + /** * gupnp_service_proxy_send_action_valist: * @proxy: A #GUPnPServiceProxy @@ -419,8 +542,7 @@ stop_main_loop (GUPnPServiceProxy *proxy, * parameter value, followed by %NULL, and then tuples of out parameter name, * out parameter type, and out parameter value location * - * See gupnp_service_proxy_send_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_send_action(). * * Return value: %TRUE if sending the action was succesful. **/ @@ -430,34 +552,44 @@ gupnp_service_proxy_send_action_valist (GUPnPServiceProxy *proxy, GError **error, va_list var_args) { - GMainLoop *main_loop; - GUPnPServiceProxyAction *handle; + GHashTable *in_hash; + GHashTable *out_hash; + va_list var_args_copy; + gboolean result; + GError *local_error; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); - main_loop = g_main_loop_new (g_main_context_get_thread_default (), - TRUE); - - handle = gupnp_service_proxy_begin_action_valist (proxy, - action, - stop_main_loop, - main_loop, - var_args); - - /* Loop till we get a reply (or time out) */ - if (g_main_loop_is_running (main_loop)) - g_main_loop_run (main_loop); - - g_main_loop_unref (main_loop); + 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); + G_VA_COPY (var_args_copy, var_args); + out_hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + value_free); + VAR_ARGS_TO_OUT_HASH_TABLE (var_args, out_hash); + + local_error = NULL; + result = gupnp_service_proxy_send_action_hash (proxy, + action, + &local_error, + in_hash, + out_hash); - if (!gupnp_service_proxy_end_action_valist (proxy, - handle, - error, - handle->var_args)) - return FALSE; + if (local_error == NULL) { + OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy); + } else { + g_propagate_error (error, local_error); + } + va_end (var_args_copy); + g_hash_table_unref (in_hash); + g_hash_table_unref (out_hash); - return TRUE; + return result; } /** @@ -822,8 +954,7 @@ write_in_parameter (const char *arg_name, * @var_args: A va_list of tuples of in parameter name, in parameter type, and * in parameter value * - * See gupnp_service_proxy_begin_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_begin_action(). * * Returns: (transfer none): A #GUPnPServiceProxyAction handle. This will * be freed when calling gupnp_service_proxy_cancel_action() or @@ -837,58 +968,25 @@ gupnp_service_proxy_begin_action_valist gpointer user_data, va_list var_args) { - const char *arg_name; GUPnPServiceProxyAction *ret; + GHashTable *in_hash; 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); - /* Create message */ - ret = begin_action_msg (proxy, action, callback, user_data); - - if (ret->error) { - callback (proxy, ret, user_data); - - return ret; - } - - /* Arguments */ - arg_name = va_arg (var_args, const char *); - while (arg_name) { - GType arg_type; - GValue value = { 0, }; - char *collect_error = NULL; - - arg_type = va_arg (var_args, GType); - g_value_init (&value, arg_type); - - G_VALUE_COLLECT (&value, var_args, G_VALUE_NOCOPY_CONTENTS, - &collect_error); - if (!collect_error) { - write_in_parameter (arg_name, &value, ret->msg_str); - - g_value_unset (&value); - - } else { - g_warning ("Error collecting value: %s\n", - collect_error); - - g_free (collect_error); - - /* we purposely leak the value here, it might not be - * in a sane state if an error condition occoured - */ - } - - arg_name = va_arg (var_args, const char *); - } - - /* Finish and send off */ - finish_action_msg (ret, action); - /* Save the current position in the va_list for send_action_valist() */ - G_VA_COPY (ret->var_args, var_args); + 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, + action, + callback, + user_data, + in_hash); + g_hash_table_unref (in_hash); return ret; } @@ -1203,8 +1301,7 @@ read_out_parameter (const char *arg_name, * and out parameter value location. The out parameter values should be * freed after use * - * See gupnp_service_proxy_end_action(); this version takes a va_list for - * use by language bindings. + * See gupnp_service_proxy_end_action(). * * Return value: %TRUE on success. **/ @@ -1214,66 +1311,36 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy, GError **error, va_list var_args) { - xmlDoc *response; - xmlNode *params; - const char *arg_name; + GHashTable *out_hash; + va_list var_args_copy; + gboolean result; + GError *local_error; g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE); g_return_val_if_fail (action, FALSE); g_return_val_if_fail (proxy == action->proxy, FALSE); - /* Check for saved error from begin_action() */ - if (action->error) { - if (error) - *error = action->error; - else - g_error_free (action->error); - - gupnp_service_proxy_action_free (action); - - return FALSE; - } - - /* Check response for errors and do initial parsing */ - response = check_action_response (proxy, action, ¶ms, error); - if (response == NULL) { - gupnp_service_proxy_action_free (action); - - return FALSE; - } - - /* Arguments */ - arg_name = va_arg (var_args, const char *); - while (arg_name) { - GType arg_type; - GValue value = { 0, }; - char *copy_error = NULL; - - arg_type = va_arg (var_args, GType); - - g_value_init (&value, arg_type); - - read_out_parameter (arg_name, &value, params); - - G_VALUE_LCOPY (&value, var_args, 0, ©_error); - - g_value_unset (&value); - - if (copy_error) { - g_warning ("Error copying value: %s", copy_error); - - g_free (copy_error); - } + out_hash = g_hash_table_new_full (g_str_hash, + g_str_equal, + g_free, + value_free); + G_VA_COPY (var_args_copy, var_args); + VAR_ARGS_TO_OUT_HASH_TABLE (var_args, out_hash); + local_error = NULL; + result = gupnp_service_proxy_end_action_hash (proxy, + action, + &local_error, + out_hash); - arg_name = va_arg (var_args, const char *); + if (local_error == NULL) { + OUT_HASH_TABLE_TO_VAR_ARGS (out_hash, var_args_copy); + } else { + g_propagate_error (error, local_error); } + va_end (var_args_copy); + g_hash_table_unref (out_hash); - /* Cleanup */ - gupnp_service_proxy_action_free (action); - - xmlFreeDoc (response); - - return TRUE; + return result; } /** @@ -1524,6 +1591,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. + * * Return value: %TRUE on success. **/ gboolean @@ -1567,7 +1638,7 @@ gupnp_service_proxy_remove_notify (GUPnPServiceProxy *proxy, if (data->callbacks == NULL) { /* No callbacks left: Remove from hash */ g_hash_table_remove (proxy->priv->notify_hash, - data); + variable); } found = TRUE; diff --git a/libgupnp/gupnp-service.c b/libgupnp/gupnp-service.c index 2eb2a43..e50f1fa 100644 --- a/libgupnp/gupnp-service.c +++ b/libgupnp/gupnp-service.c @@ -30,7 +30,6 @@ #include #include #include -#include #include #include "gupnp-service.h" #include "gupnp-root-device.h" @@ -42,6 +41,12 @@ #include "xml-util.h" #include "gvalue-util.h" +#ifdef G_OS_WIN32 +#include +#else +#include +#endif + #define SUBSCRIPTION_TIMEOUT 300 /* DLNA (7.2.22.1) enforced */ G_DEFINE_TYPE (GUPnPService, @@ -1077,6 +1082,22 @@ subscription_response (GUPnPService *service, static char * generate_sid (void) { +#ifdef G_OS_WIN32 + char *ret = NULL; + UUID uuid; + RPC_STATUS stat; + stat = UuidCreate (&uuid); + if (stat == RPC_S_OK) { + unsigned char* uuidStr = NULL; + stat = UuidToString (&uuid, &uuidStr); + if (stat == RPC_S_OK) { + ret = g_strdup_printf ("uuid:%s", uuidStr); + RpcStringFree (&uuidStr); + } + } + + return ret; +#else uuid_t id; char out[39]; @@ -1084,6 +1105,7 @@ generate_sid (void) uuid_unparse (id, out); return g_strdup_printf ("uuid:%s", out); +#endif } /* Subscription expired */ @@ -1646,7 +1668,7 @@ gupnp_service_class_init (GUPnPServiceClass *klass) /** * GUPnPService::action-invoked: * @service: The #GUPnPService that received the signal - * @action: The invoked #GUPnPAction + * @action: The invoked #GUPnPServiceAction * * Emitted whenever an action is invoked. Handler should process * @action and must call either gupnp_service_action_return() or @@ -1911,6 +1933,8 @@ notify_subscriber (gpointer key, /* Queue */ data->pending_messages = g_list_prepend (data->pending_messages, msg); + soup_message_headers_append (msg->request_headers, + "Connection", "close"); session = gupnp_service_get_session (data->service); @@ -2168,7 +2192,7 @@ connect_names_to_signal_handlers (GUPnPService *service, * #GUPnPService::action-invoked and #GUPnPService::query-variable signals to * appropriate callbacks for the service @service. It uses service introspection * and GModule's introspective features. It is very simillar to - * glade_xml_signal_autoconnect() except that it attempts to guess the names of + * 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 diff --git a/libgupnp/gupnp-windows-context-manager.c b/libgupnp/gupnp-windows-context-manager.c new file mode 100644 index 0000000..662c009 --- /dev/null +++ b/libgupnp/gupnp-windows-context-manager.c @@ -0,0 +1,106 @@ +/* + * Copyright (C) 2009, 2010 Jens Georg + * Copyright (C) 2009 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Zeeshan Ali (Khattak) + * Jorn Baayen + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +/** + * SECTION:gupnp-windows-context-manager + * @short_description: Windows-specific implementation of #GUPnPContextManager. + */ + +#include +#include +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x0502 +#endif +#include +#include +#include + +#include "gupnp-windows-context-manager.h" +#include "gupnp-context.h" + +G_DEFINE_TYPE (GUPnPWindowsContextManager, + gupnp_windows_context_manager, + GUPNP_TYPE_SIMPLE_CONTEXT_MANAGER); + +/* + * Create a context for all network interfaces that are up. + */ +static GList * +gupnp_windows_context_manager_get_interfaces + (GUPnPSimpleContextManager *manager) +{ + GList *interfaces = NULL; + ULONG flags = GAA_FLAG_INCLUDE_PREFIX | + GAA_FLAG_SKIP_DNS_SERVER | + GAA_FLAG_SKIP_MULTICAST; + /* use 15k buffer initially as documented in MSDN */ + DWORD size = 0x3C00; + DWORD ret; + PIP_ADAPTER_ADDRESSES adapters_addresses; + PIP_ADAPTER_ADDRESSES adapter; + + do { + adapters_addresses = (PIP_ADAPTER_ADDRESSES) g_malloc0 (size); + ret = GetAdaptersAddresses (AF_UNSPEC, + flags, + NULL, + adapters_addresses, + &size); + if (ret == ERROR_BUFFER_OVERFLOW) { + g_free (adapters_addresses); + } + } while (ret == ERROR_BUFFER_OVERFLOW); + + if (ret != ERROR_SUCCESS) + return NULL; + + for (adapter = adapters_addresses; + adapter != NULL; + adapter = adapter->Next) { + if (adapter->FirstUnicastAddress == NULL) + continue; + if (adapter->OperStatus != IfOperStatusUp) + continue; + interfaces = g_list_append (interfaces, + g_strdup (adapter->AdapterName)); + } + + return interfaces; +} + +static void +gupnp_windows_context_manager_init (GUPnPWindowsContextManager *manager) +{ +} + +static void +gupnp_windows_context_manager_class_init (GUPnPWindowsContextManagerClass *klass) +{ + GUPnPSimpleContextManagerClass *parent_class; + + parent_class = GUPNP_SIMPLE_CONTEXT_MANAGER_CLASS (klass); + parent_class->get_interfaces = + gupnp_windows_context_manager_get_interfaces; +} diff --git a/libgupnp/gupnp-windows-context-manager.h b/libgupnp/gupnp-windows-context-manager.h new file mode 100644 index 0000000..2387d12 --- /dev/null +++ b/libgupnp/gupnp-windows-context-manager.h @@ -0,0 +1,73 @@ +/* + * Copyright (C) 2009, 2010 Jens Georg + * Copyright (C) 2009 Nokia Corporation. + * Copyright (C) 2006, 2007, 2008 OpenedHand Ltd. + * + * Author: Zeeshan Ali (Khattak) + * Jorn Baayen + * 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., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ + +#ifndef __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ +#define __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ + +#include "gupnp-simple-context-manager.h" + +G_BEGIN_DECLS + +GType +gupnp_windows_context_manager_get_type (void) G_GNUC_CONST; + +#define GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER \ + (gupnp_windows_context_manager_get_type ()) +#define GUPNP_WINDOWS_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_CAST ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManager)) +#define GUPNP_WINDOWS_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_CAST ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManagerClass)) +#define GUPNP_IS_WINDOWS_CONTEXT_MANAGER(obj) \ + (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER)) +#define GUPNP_IS_WINDOWS_CONTEXT_MANAGER_CLASS(obj) \ + (G_TYPE_CHECK_CLASS_TYPE ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER)) +#define GUPNP_WINDOWS_CONTEXT_MANAGER_GET_CLASS(obj) \ + (G_TYPE_INSTANCE_GET_CLASS ((obj), \ + GUPNP_TYPE_WINDOWS_CONTEXT_MANAGER, \ + GUPnPWindowsContextManagerClass)) + +typedef struct { + GUPnPSimpleContextManager parent; +} GUPnPWindowsContextManager; + +typedef struct { + GUPnPSimpleContextManagerClass parent_class; + + /* future padding */ + void (* _gupnp_reserved1) (void); + void (* _gupnp_reserved2) (void); + void (* _gupnp_reserved3) (void); + void (* _gupnp_reserved4) (void); +} GUPnPWindowsContextManagerClass; + +G_END_DECLS + +#endif /* __GUPNP_WINDOWS_CONTEXT_MANAGER_H__ */ diff --git a/libgupnp/http-headers.c b/libgupnp/http-headers.c index 1631809..8ff2c45 100644 --- a/libgupnp/http-headers.c +++ b/libgupnp/http-headers.c @@ -118,7 +118,13 @@ http_request_set_accept_language (SoupMessage *message) int dash_index; GString *tmp; - locale = setlocale (LC_ALL, NULL); +#ifdef G_OS_WIN32 + /* TODO: Use GetSystemDefaultLangID or similar */ + return; +#else + + locale = setlocale (LC_MESSAGES, NULL); + if (locale == NULL) return; @@ -149,6 +155,7 @@ http_request_set_accept_language (SoupMessage *message) tmp->str); g_string_free (tmp, TRUE); +#endif } static double diff --git a/packaging/GUPnP.changes b/packaging/GUPnP.changes index 2270075..2cd415d 100644 --- a/packaging/GUPnP.changes +++ b/packaging/GUPnP.changes @@ -1,3 +1,6 @@ +* Thu Mar 07 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 diff --git a/packaging/GUPnP.spec b/packaging/GUPnP.spec index fcc0fdd..536de53 100644 --- a/packaging/GUPnP.spec +++ b/packaging/GUPnP.spec @@ -7,12 +7,12 @@ Name: gupnp Summary: GUPnP is an framework for creating UPnP devices & control points -Version: 0.19.1 +Version: 0.20.1 Release: 1 Group: System/Libraries License: LGPLv2+ URL: http://www.gupnp.org/ -Source0: http://download.gnome.org/sources/%{name}/0.19/%{name}-%{version}.tar.bz2 +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) diff --git a/tests/gtest/Makefile.am b/tests/gtest/Makefile.am index c4cd246..3d6252b 100644 --- a/tests/gtest/Makefile.am +++ b/tests/gtest/Makefile.am @@ -1,6 +1,6 @@ if HAVE_GTEST TESTS_ENVIRONMENT = G_SLICE=debug-blocks \ - LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs + LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs:$(LD_LIBRARY_PATH) TESTS=$(check_PROGRAMS) @@ -15,6 +15,6 @@ LDADD = \ AM_CFLAGS = \ $(LIBGUPNP_CFLAGS) \ -I $(top_srcdir) \ - -DDATA_PATH="\"$(srcdir)\"" + -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST=random4k.bin +EXTRA_DIST=data/random4k.bin diff --git a/tests/gtest/Makefile.in b/tests/gtest/Makefile.in index 938cf5d..3672a5e 100644 --- a/tests/gtest/Makefile.in +++ b/tests/gtest/Makefile.in @@ -265,7 +265,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @HAVE_GTEST_TRUE@TESTS_ENVIRONMENT = G_SLICE=debug-blocks \ -@HAVE_GTEST_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs +@HAVE_GTEST_TRUE@ LD_LIBRARY_PATH=$(top_builddir)/libgupnp/.libs:$(LD_LIBRARY_PATH) @HAVE_GTEST_TRUE@TESTS = $(check_PROGRAMS) @HAVE_GTEST_TRUE@test_context_SOURCES = test-context.c @@ -276,9 +276,9 @@ LDADD = \ AM_CFLAGS = \ $(LIBGUPNP_CFLAGS) \ -I $(top_srcdir) \ - -DDATA_PATH="\"$(srcdir)\"" + -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST = random4k.bin +EXTRA_DIST = data/random4k.bin all: all-am .SUFFIXES: diff --git a/tests/gtest/random4k.bin b/tests/gtest/data/random4k.bin similarity index 100% rename from tests/gtest/random4k.bin rename to tests/gtest/data/random4k.bin diff --git a/tests/gtest/test-context.c b/tests/gtest/test-context.c index 8e230a2..9fbb257 100644 --- a/tests/gtest/test-context.c +++ b/tests/gtest/test-context.c @@ -146,7 +146,7 @@ test_gupnp_context_http_ranged_requests (void) DATA_PATH "/random4k.bin", "/random4k.bin"); - uri = g_strdup_printf ("http://localhost:%u/random4k.bin", port); + uri = g_strdup_printf ("http://127.0.0.1:%u/random4k.bin", port); g_assert (uri != NULL); session = soup_session_async_new (); @@ -222,7 +222,9 @@ test_gupnp_context_http_ranged_requests (void) } int main (int argc, char *argv[]) { +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif g_test_init (&argc, &argv, NULL); g_test_add_func ("/context/http/ranged-requests", test_gupnp_context_http_ranged_requests); diff --git a/tests/test-browsing.c b/tests/test-browsing.c index 9964f10..bdb78ae 100644 --- a/tests/test-browsing.c +++ b/tests/test-browsing.c @@ -24,6 +24,7 @@ #include #include #include +#include GMainLoop *main_loop; @@ -95,9 +96,13 @@ main (int argc, char **argv) GError *error; GUPnPContext *context; GUPnPControlPoint *cp; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; @@ -134,10 +139,14 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); +#ifndef G_OS_WIN32 /* Hook the handler for SIGTERM */ memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT, interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-introspection.c b/tests/test-introspection.c index 8a3fbbb..1b25e5d 100644 --- a/tests/test-introspection.c +++ b/tests/test-introspection.c @@ -26,6 +26,7 @@ #include #include #include +#include GMainLoop *main_loop; @@ -235,7 +236,9 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPControlPoint *cp; GOptionContext *option_context; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ option_context = g_option_context_new ("- test GUPnP introspection"); g_option_context_add_main_entries (option_context, @@ -253,7 +256,9 @@ main (int argc, char **argv) return EXIT_FAILURE; } +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif error = NULL; context = g_initable_new (GUPNP_TYPE_CONTEXT, NULL, &error, NULL); @@ -282,9 +287,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT,interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-proxy.c b/tests/test-proxy.c index 597b000..e7059d2 100644 --- a/tests/test-proxy.c +++ b/tests/test-proxy.c @@ -24,6 +24,7 @@ #include #include #include +#include GMainLoop *main_loop; @@ -151,9 +152,13 @@ main (int argc, char **argv) GError *error; GUPnPContext *context; GUPnPControlPoint *cp; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; @@ -184,9 +189,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT,interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop); diff --git a/tests/test-server.c b/tests/test-server.c index da294cf..bed1a4b 100644 --- a/tests/test-server.c +++ b/tests/test-server.c @@ -62,7 +62,9 @@ main (int argc, char **argv) GUPnPContext *context; GUPnPRootDevice *dev; GUPnPServiceInfo *content_dir; +#ifndef G_OS_WIN32 struct sigaction sig_action; +#endif /* G_OS_WIN32 */ if (argc < 2) { g_printerr ("Usage: %s DESCRIPTION_FILE\n", argv[0]); @@ -70,7 +72,9 @@ main (int argc, char **argv) return EXIT_FAILURE; } +#if !GLIB_CHECK_VERSION(2,35,0) g_type_init (); +#endif setlocale (LC_ALL, ""); error = NULL; @@ -119,9 +123,13 @@ main (int argc, char **argv) main_loop = g_main_loop_new (NULL, FALSE); /* Hook the handler for SIGTERM */ +#ifndef G_OS_WIN32 memset (&sig_action, 0, sizeof (sig_action)); sig_action.sa_handler = interrupt_signal_handler; sigaction (SIGINT, &sig_action, NULL); +#else + signal(SIGINT, interrupt_signal_handler); +#endif /* G_OS_WIN32 */ g_main_loop_run (main_loop); g_main_loop_unref (main_loop);