Hello community, here is the log from the commit of package gupnp for openSUSE:Factory checked in at 2014-02-06 06:48:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/gupnp (Old) and /work/SRC/openSUSE:Factory/.gupnp.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gupnp" Changes: -------- --- /work/SRC/openSUSE:Factory/gupnp/gupnp.changes 2013-12-16 16:27:57.000000000 +0100 +++ /work/SRC/openSUSE:Factory/.gupnp.new/gupnp.changes 2014-02-06 06:48:05.000000000 +0100 @@ -1,0 +2,12 @@ +Mon Feb 3 17:53:25 UTC 2014 - [email protected] + +- Update to version 0.20.10: + + Make sure ResourceFactory creates proxies with the correct + GType. + + Make it possible to unsubscribe from a service proxy during a + call-back. + + Disable managed RootDevices on WL change in addition to + ControlPoints. + + Bugs fixed: bgo#678701, bgo#690400, bgo#711332. + +------------------------------------------------------------------- Old: ---- gupnp-0.20.9.tar.xz New: ---- gupnp-0.20.10.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ gupnp.spec ++++++ --- /var/tmp/diff_new_pack.1xUvEY/_old 2014-02-06 06:48:06.000000000 +0100 +++ /var/tmp/diff_new_pack.1xUvEY/_new 2014-02-06 06:48:06.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package gupnp # -# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -17,7 +17,7 @@ Name: gupnp -Version: 0.20.9 +Version: 0.20.10 Release: 0 Summary: Implementation of the UPnP specification License: LGPL-2.0+ ++++++ gupnp-0.20.9.tar.xz -> gupnp-0.20.10.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/NEWS new/gupnp-0.20.10/NEWS --- old/gupnp-0.20.9/NEWS 2013-12-14 16:13:51.000000000 +0100 +++ new/gupnp-0.20.10/NEWS 2014-02-03 17:02:16.000000000 +0100 @@ -1,3 +1,21 @@ +0.20.10 +======= + +Changes since 0.20.9: + +- Make sure ResourceFactory creates proxies with the correct GType. +- Make it possible to unsubscribe from a service proxy during a call-back. +- Disable managed RootDevices on WL change in addition to ControlPoints. + +Bugs fixed in this release: + - https://bugzilla.gnome.org/show_bug.cgi?id=678701 + - https://bugzilla.gnome.org/show_bug.cgi?id=690400 + - https://bugzilla.gnome.org/show_bug.cgi?id=711332 + +All contributors to this release: + - Jussi Kukkonen <[email protected]> + - Jens Georg <[email protected]> + 0.20.9 ====== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/configure new/gupnp-0.20.10/configure --- old/gupnp-0.20.9/configure 2013-12-14 16:10:12.000000000 +0100 +++ new/gupnp-0.20.10/configure 2014-02-03 17:01:14.000000000 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for gupnp 0.20.9. +# Generated by GNU Autoconf 2.69 for gupnp 0.20.10. # # Report bugs to <http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp>. # @@ -651,8 +651,8 @@ # Identity of this package. PACKAGE_NAME='gupnp' PACKAGE_TARNAME='gupnp' -PACKAGE_VERSION='0.20.9' -PACKAGE_STRING='gupnp 0.20.9' +PACKAGE_VERSION='0.20.10' +PACKAGE_STRING='gupnp 0.20.10' PACKAGE_BUGREPORT='http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp' PACKAGE_URL='http://www.gupnp.org/' @@ -1454,7 +1454,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures gupnp 0.20.9 to adapt to many kinds of systems. +\`configure' configures gupnp 0.20.10 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1525,7 +1525,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of gupnp 0.20.9:";; + short | recursive ) echo "Configuration of gupnp 0.20.10:";; esac cat <<\_ACEOF @@ -1667,7 +1667,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -gupnp configure 0.20.9 +gupnp configure 0.20.10 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1945,7 +1945,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by gupnp $as_me 0.20.9, which was +It was created by gupnp $as_me 0.20.10, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2928,7 +2928,7 @@ # Define the identity of the package. PACKAGE='gupnp' - VERSION='0.20.9' + VERSION='0.20.10' cat >>confdefs.h <<_ACEOF @@ -13860,7 +13860,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by gupnp $as_me 0.20.9, which was +This file was extended by gupnp $as_me 0.20.10, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13927,7 +13927,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -gupnp config.status 0.20.9 +gupnp config.status 0.20.10 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/configure.ac new/gupnp-0.20.10/configure.ac --- old/gupnp-0.20.9/configure.ac 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/configure.ac 2013-12-24 07:47:55.000000000 +0100 @@ -1,6 +1,6 @@ AC_PREREQ([2.64]) AC_INIT([gupnp], - [0.20.9], + [0.20.10], [http://bugzilla.gnome.org/enter_bug.cgi?product=gupnp&component=gupnp], [gupnp], [http://www.gupnp.org/]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/doc/html/GUPnPServiceProxy.html new/gupnp-0.20.10/doc/html/GUPnPServiceProxy.html --- old/gupnp-0.20.9/doc/html/GUPnPServiceProxy.html 2013-12-14 16:17:14.000000000 +0100 +++ new/gupnp-0.20.10/doc/html/GUPnPServiceProxy.html 2014-02-03 17:05:04.000000000 +0100 @@ -1003,9 +1003,10 @@ Cancels the variable change notification for <em class="parameter"><code>callback</code></em> and <em class="parameter"><code>user_data</code></em>. </p> <p> -This function must not be called directly or indirectly from a -<a class="link" href="GUPnPServiceProxy.html#GUPnPServiceProxyNotifyCallback" title="GUPnPServiceProxyNotifyCallback ()"><span class="type">GUPnPServiceProxyNotifyCallback</span></a> associated with this service proxy, even -if it is for another variable. +In version 20.9 and earlier this function must not be called directly +or indirectly from a <a class="link" href="GUPnPServiceProxy.html#GUPnPServiceProxyNotifyCallback" title="GUPnPServiceProxyNotifyCallback ()"><span class="type">GUPnPServiceProxyNotifyCallback</span></a> associated with +this service proxy, even if it is for another variable. In later +versions such calls are allowed. </p> <div class="variablelist"><table border="0" class="variablelist"> <colgroup> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/doc/html/index.html new/gupnp-0.20.10/doc/html/index.html --- old/gupnp-0.20.9/doc/html/index.html 2013-12-14 16:17:14.000000000 +0100 +++ new/gupnp-0.20.10/doc/html/index.html 2014-02-03 17:05:04.000000000 +0100 @@ -14,7 +14,7 @@ <div class="titlepage"> <div> <div><table class="navigation" id="top" width="100%" cellpadding="2" cellspacing="0"><tr><th valign="middle"><p class="title">GUPnP Reference Manual</p></th></tr></table></div> -<div><p class="releaseinfo">Version 0.20.9 +<div><p class="releaseinfo">Version 0.20.10 </p></div> <div><p class="copyright">Copyright © 2007, 2008, 2009 OpenedHand Ltd, Nokia Corporation</p></div> <div><div class="legalnotice"> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/libgupnp/gupnp-context-manager.c new/gupnp-0.20.10/libgupnp/gupnp-context-manager.c --- old/gupnp-0.20.9/libgupnp/gupnp-context-manager.c 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/libgupnp/gupnp-context-manager.c 2014-02-03 16:55:37.000000000 +0100 @@ -177,20 +177,19 @@ GList *obj; GList *blk; gboolean match; - GUPnPContext *context; - GSSDPResourceBrowser *browser; obj = manager->priv->objects; blk = manager->priv->blacklisted; while (obj != NULL) { - if (!GUPNP_IS_CONTROL_POINT (obj->data)) - continue; - /* If the white list is empty, treat it as disabled */ if (check) { - /* Filter out context */ - context = gupnp_control_point_get_context (obj->data); + GUPnPContext *context; + + g_object_get (G_OBJECT (obj->data), + "context", &context, + NULL); + match = gupnp_white_list_check_context (white_list, context); } else { @@ -198,8 +197,18 @@ match = TRUE; } - browser = GSSDP_RESOURCE_BROWSER (obj->data); - gssdp_resource_browser_set_active (browser, match); + if (GUPNP_IS_CONTROL_POINT (obj->data)) { + GSSDPResourceBrowser *browser; + + browser = GSSDP_RESOURCE_BROWSER (obj->data); + gssdp_resource_browser_set_active (browser, match); + } else if (GUPNP_IS_ROOT_DEVICE (obj->data)) { + GSSDPResourceGroup *group; + + group = GSSDP_RESOURCE_GROUP (obj->data); + gssdp_resource_group_set_available (group, match); + } else + g_assert_not_reached (); obj = obj->next; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/libgupnp/gupnp-resource-factory.c new/gupnp-0.20.10/libgupnp/gupnp-resource-factory.c --- old/gupnp-0.20.9/libgupnp/gupnp-resource-factory.c 2013-12-01 12:32:50.000000000 +0100 +++ new/gupnp-0.20.10/libgupnp/gupnp-resource-factory.c 2014-01-26 15:03:56.000000000 +0100 @@ -206,7 +206,8 @@ * @element: The #xmlNode ponting to the right service element * @location: The location of the service description file * @udn: The UDN of the device the service is contained in - * @service_type: The service type + * @service_type: (allow-none): The service type, or %NULL to use service + * type from @element * @url_base: The URL base for this service, or %NULL if none * * Create a #GUPnPServiceProxy for the service with element @element, as @@ -225,6 +226,7 @@ const char *location, const SoupURI *url_base) { + char *type_from_xml = NULL; GUPnPServiceProxy *proxy; GType proxy_type = GUPNP_TYPE_SERVICE_PROXY; @@ -235,6 +237,13 @@ g_return_val_if_fail (location != NULL, NULL); g_return_val_if_fail (url_base != NULL, NULL); + if (!service_type) { + type_from_xml = + xml_util_get_child_element_content_glib (element, + "serviceType"); + service_type = type_from_xml; + } + if (service_type) { gpointer value; @@ -254,6 +263,8 @@ "element", element, NULL); + g_free (type_from_xml); + return proxy; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/libgupnp/gupnp-service-proxy.c new/gupnp-0.20.10/libgupnp/gupnp-service-proxy.c --- old/gupnp-0.20.9/libgupnp/gupnp-service-proxy.c 2013-12-14 15:58:35.000000000 +0100 +++ new/gupnp-0.20.10/libgupnp/gupnp-service-proxy.c 2014-01-26 15:03:56.000000000 +0100 @@ -97,6 +97,7 @@ GType type; GList *callbacks; + GList *next_emit; } NotifyData; typedef struct { @@ -1602,6 +1603,7 @@ data->type = type; data->callbacks = NULL; + data->next_emit = NULL; g_hash_table_insert (proxy->priv->notify_hash, g_strdup (variable), @@ -1627,6 +1629,9 @@ data->callbacks = g_list_append (data->callbacks, callback_data); + if (data->next_emit == NULL) + data->next_emit = g_list_last (data->callbacks); + return TRUE; } @@ -1639,9 +1644,10 @@ * * 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. + * In version 20.9 and earlier this function must not be called directly + * or indirectly from a #GUPnPServiceProxyNotifyCallback associated with + * this service proxy, even if it is for another variable. In later + * versions such calls are allowed. * * Return value: %TRUE on success. **/ @@ -1681,6 +1687,9 @@ /* Gotcha! */ g_slice_free (CallbackData, callback_data); + if (data->next_emit == l) + data->next_emit = data->next_emit->next; + data->callbacks = g_list_delete_link (data->callbacks, l); if (data->callbacks == NULL) { @@ -1722,11 +1731,13 @@ return; } - /* Call callbacks */ - for (l = data->callbacks; l; l = l->next) { + /* Call callbacks. Note that data->next_emit may change if + * callback calls remove_notify() or add_notify() */ + for (l = data->callbacks; l; l = data->next_emit) { CallbackData *callback_data; callback_data = l->data; + data->next_emit = l->next; callback_data->callback (proxy, (const char *) var_node->name, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/Makefile.am new/gupnp-0.20.10/tests/gtest/Makefile.am --- old/gupnp-0.20.9/tests/gtest/Makefile.am 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/Makefile.am 2014-02-03 17:02:16.000000000 +0100 @@ -16,4 +16,4 @@ -I $(top_srcdir) \ -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST=data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml +EXTRA_DIST=data/random4k.bin data/TestService.xml data/TestDevice.xml diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/Makefile.in new/gupnp-0.20.10/tests/gtest/Makefile.in --- old/gupnp-0.20.9/tests/gtest/Makefile.in 2013-12-14 16:10:13.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/Makefile.in 2014-02-03 17:02:22.000000000 +0100 @@ -538,7 +538,7 @@ -I $(top_srcdir) \ -DDATA_PATH="\"$(srcdir)/data\"" -EXTRA_DIST = data/random4k.bin data/ServiceBgo69762.xml data/TestBgo696762.xml +EXTRA_DIST = data/random4k.bin data/TestService.xml data/TestDevice.xml all: all-am .SUFFIXES: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/data/ServiceBgo69762.xml new/gupnp-0.20.10/tests/gtest/data/ServiceBgo69762.xml --- old/gupnp-0.20.9/tests/gtest/data/ServiceBgo69762.xml 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/data/ServiceBgo69762.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,107 +0,0 @@ -<scpd xmlns="urn:schemas-upnp-org:service-1-0"> - <specVersion> - <major>1</major> - <minor>0</minor> - </specVersion> - <serviceStateTable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_ObjectID</name> - <dataType>string</dataType> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_Result</name> - <dataType>string</dataType> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_BrowseFlag</name> - <dataType>string</dataType> - <allowedValueList> - <allowedValue>BrowseMetadata</allowedValue> - <allowedValue>BrowseDirectChildren</allowedValue> - </allowedValueList> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_Filter</name> - <dataType>string</dataType> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_SortCriteria</name> - <dataType>string</dataType> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_Index</name> - <dataType>ui4</dataType> - </stateVariable> - <stateVariable sendEvents="no"> - <name>A_ARG_TYPE_Count</name> - <dataType>ui4</dataType> - </stateVariable> - </serviceStateTable> - <actionList> - <action> - <name>Browse</name> - <argumentList> - <argument> - <name>ObjectID</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_ObjectID</relatedStateVariable> - </argument> - <argument> - <name>BrowseFlag</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_BrowseFlag</relatedStateVariable> - </argument> - <argument> - <name>Filter</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_Filter</relatedStateVariable> - </argument> - <argument> - <name>StartingIndex</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_Index</relatedStateVariable> - </argument> - <argument> - <name>RequestedCount</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_Count</relatedStateVariable> - </argument> - <argument> - <name>SortCriteria</name> - <direction>in</direction> - <relatedStateVariable> - A_ARG_TYPE_SortCriteria</relatedStateVariable> - </argument> - <argument> - <name>Result</name> - <direction>out</direction> - <relatedStateVariable> - A_ARG_TYPE_Result</relatedStateVariable> - </argument> - <argument> - <name>NumberReturned</name> - <direction>out</direction> - <relatedStateVariable> - A_ARG_TYPE_Count</relatedStateVariable> - </argument> - <argument> - <name>TotalMatches</name> - <direction>out</direction> - <relatedStateVariable> - A_ARG_TYPE_Count</relatedStateVariable> - </argument> - <argument> - <name>UpdateID</name> - <direction>out</direction> - <relatedStateVariable> - A_ARG_TYPE_UpdateID</relatedStateVariable> - </argument> - </argumentList> - </action> - </actionList> -</scpd> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/data/TestBgo696762.xml new/gupnp-0.20.10/tests/gtest/data/TestBgo696762.xml --- old/gupnp-0.20.9/tests/gtest/data/TestBgo696762.xml 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/data/TestBgo696762.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,21 +0,0 @@ -<root xmlns="urn:schemas-upnp-org:device-1-0"> -<specVersion> -<major>1</major> -<minor>0</minor> -</specVersion> -<device> -<deviceType>urn:test-gupnp-org:device:TestBgo696762:1</deviceType> -<friendlyName>Regression Test for bgo#696762</friendlyName> -<modelURL>https://bugzilla.gnome.org/show_bug.cgi?id=696762</modelURL> -<UDN>uuid:1234</UDN> -<serviceList> -<service> -<serviceType>urn:test-gupnp-org:service:bgo696762:1</serviceType> -<serviceId>urn:test-gupnp-org:serviceId:bgo696762:1</serviceId> -<SCPDURL>/ServiceBgo69762.xml</SCPDURL> -<controlURL>/ServiceBgo69762/Control</controlURL> -<eventSubURL>/ServiceBgo69762/Event</eventSubURL> -</service> -</serviceList> -</device> -</root> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/data/TestDevice.xml new/gupnp-0.20.10/tests/gtest/data/TestDevice.xml --- old/gupnp-0.20.9/tests/gtest/data/TestDevice.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/data/TestDevice.xml 2014-01-26 15:03:56.000000000 +0100 @@ -0,0 +1,28 @@ +<root xmlns="urn:schemas-upnp-org:device-1-0"> +<specVersion> +<major>1</major> +<minor>0</minor> +</specVersion> +<device> +<deviceType>urn:test-gupnp-org:device:TestDevice:1</deviceType> +<friendlyName>GUPnP Regression Test Device</friendlyName> +<modelURL>http://gupnp.org/</modelURL> +<UDN>uuid:1234</UDN> +<serviceList> +<service> +<serviceType>urn:test-gupnp-org:service:TestService:1</serviceType> +<serviceId>urn:test-gupnp-org:serviceId:TestService:1</serviceId> +<SCPDURL>/TestService.xml</SCPDURL> +<controlURL>/TestService/Control</controlURL> +<eventSubURL>/TestService/Event</eventSubURL> +</service> +</serviceList> +<deviceList> +<device> +<deviceType>urn:test-gupnp-org:device:TestSubDevice:1</deviceType> +<friendlyName>Regression Test subdevice</friendlyName> +<UDN>uuid:5678</UDN> +</device> +</deviceList> +</device> +</root> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/data/TestService.xml new/gupnp-0.20.10/tests/gtest/data/TestService.xml --- old/gupnp-0.20.9/tests/gtest/data/TestService.xml 1970-01-01 01:00:00.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/data/TestService.xml 2014-01-26 15:03:56.000000000 +0100 @@ -0,0 +1,111 @@ +<scpd xmlns="urn:schemas-upnp-org:service-1-0"> + <specVersion> + <major>1</major> + <minor>0</minor> + </specVersion> + <serviceStateTable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_ObjectID</name> + <dataType>string</dataType> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_Result</name> + <dataType>string</dataType> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_BrowseFlag</name> + <dataType>string</dataType> + <allowedValueList> + <allowedValue>BrowseMetadata</allowedValue> + <allowedValue>BrowseDirectChildren</allowedValue> + </allowedValueList> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_Filter</name> + <dataType>string</dataType> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_SortCriteria</name> + <dataType>string</dataType> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_Index</name> + <dataType>ui4</dataType> + </stateVariable> + <stateVariable sendEvents="no"> + <name>A_ARG_TYPE_Count</name> + <dataType>ui4</dataType> + </stateVariable> + <stateVariable sendEvents="yes"> + <name>evented_variable</name> + <dataType>string</dataType> + </stateVariable> + </serviceStateTable> + <actionList> + <action> + <name>Browse</name> + <argumentList> + <argument> + <name>ObjectID</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_ObjectID</relatedStateVariable> + </argument> + <argument> + <name>BrowseFlag</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_BrowseFlag</relatedStateVariable> + </argument> + <argument> + <name>Filter</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_Filter</relatedStateVariable> + </argument> + <argument> + <name>StartingIndex</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_Index</relatedStateVariable> + </argument> + <argument> + <name>RequestedCount</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_Count</relatedStateVariable> + </argument> + <argument> + <name>SortCriteria</name> + <direction>in</direction> + <relatedStateVariable> + A_ARG_TYPE_SortCriteria</relatedStateVariable> + </argument> + <argument> + <name>Result</name> + <direction>out</direction> + <relatedStateVariable> + A_ARG_TYPE_Result</relatedStateVariable> + </argument> + <argument> + <name>NumberReturned</name> + <direction>out</direction> + <relatedStateVariable> + A_ARG_TYPE_Count</relatedStateVariable> + </argument> + <argument> + <name>TotalMatches</name> + <direction>out</direction> + <relatedStateVariable> + A_ARG_TYPE_Count</relatedStateVariable> + </argument> + <argument> + <name>UpdateID</name> + <direction>out</direction> + <relatedStateVariable> + A_ARG_TYPE_UpdateID</relatedStateVariable> + </argument> + </argumentList> + </action> + </actionList> +</scpd> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gupnp-0.20.9/tests/gtest/test-bugs.c new/gupnp-0.20.10/tests/gtest/test-bugs.c --- old/gupnp-0.20.9/tests/gtest/test-bugs.c 2013-12-01 12:34:23.000000000 +0100 +++ new/gupnp-0.20.10/tests/gtest/test-bugs.c 2014-01-26 15:03:56.000000000 +0100 @@ -44,10 +44,43 @@ guint argument_count; }; -typedef struct _TestBgo696762Data { + +typedef struct _TestBgo678701Service { + GUPnPServiceProxy parent_instance; +}TestBgo678701Service; + +typedef struct _TestBgo678701ServiceClass +{ + GUPnPServiceProxyClass parent_class; +}TestBgo678701ServiceClass; + +G_DEFINE_TYPE(TestBgo678701Service, test_bgo_678701_service, GUPNP_TYPE_SERVICE_PROXY); +static void test_bgo_678701_service_class_init (TestBgo678701ServiceClass *klass) {} +static void test_bgo_678701_service_init (TestBgo678701Service *self) {} + +typedef struct _TestBgo678701Device { + GUPnPDeviceProxy parent_instance; +}TestBgo678701Device; + +typedef struct _TestBgo678701DeviceClass +{ + GUPnPDeviceProxyClass parent_class; +}TestBgo678701DeviceClass; + +G_DEFINE_TYPE(TestBgo678701Device, test_bgo_678701_device, GUPNP_TYPE_DEVICE_PROXY); +static void test_bgo_678701_device_class_init (TestBgo678701DeviceClass *klass) {} +static void test_bgo_678701_device_init (TestBgo678701Device *self) {} + + +typedef struct _TestServiceProxyData { GMainLoop *loop; GUPnPServiceProxy *proxy; -} TestBgo696762Data; +} TestServiceProxyData; + +typedef struct _TestBgo678701Data { + GMainLoop *loop; + GUPnPDeviceProxy *proxy; +} TestBgo678701Data; static void test_bgo_696762_on_browse_call (G_GNUC_UNUSED GUPnPService *service, @@ -86,31 +119,88 @@ G_GNUC_UNUSED GUPnPServiceProxyAction *action, gpointer user_data) { - TestBgo696762Data *data = (TestBgo696762Data *) user_data; + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + g_main_loop_quit (data->loop); +} + +static void +test_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPServiceProxy *proxy, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + data->proxy = g_object_ref (proxy); g_main_loop_quit (data->loop); } static void -test_bgo_696762_on_sp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, - GUPnPServiceProxy *proxy, +test_bgo_678701_on_dp_available (G_GNUC_UNUSED GUPnPControlPoint *cp, + GUPnPDeviceProxy *proxy, gpointer user_data) { - TestBgo696762Data *data = (TestBgo696762Data *) user_data; + TestBgo678701Data *data = (TestBgo678701Data *) user_data; data->proxy = g_object_ref (proxy); g_main_loop_quit (data->loop); } +void +test_bgo_690400_notify (GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + gupnp_service_proxy_remove_notify (data->proxy, + "evented_variable", + test_bgo_690400_notify, + user_data); +} + +void +test_bgo_690400_notify_too (GUPnPServiceProxy *proxy, + const char *variable, + GValue *value, + gpointer user_data) +{ + TestServiceProxyData *data = (TestServiceProxyData *) user_data; + + g_main_loop_quit (data->loop); +} + +static void +test_bgo_690400_query_variable (GUPnPService *service, + gchar *variable, + GValue *value, + gpointer user_data) +{ + g_value_init (value, G_TYPE_STRING); + g_value_set_string (value, "New Value"); +} + static gboolean -test_bgo_696762_on_timeout (G_GNUC_UNUSED gpointer user_data) +test_on_timeout (G_GNUC_UNUSED gpointer user_data) { g_assert_not_reached (); return FALSE; } +static void +test_run_loop (GMainLoop *loop) +{ + guint timeout_id = 0; + + timeout_id = g_timeout_add_seconds (2, test_on_timeout, NULL); + g_main_loop_run (loop); + g_source_remove (timeout_id); +} + /* Test if a call on a service proxy keeps argument order */ static void test_bgo_696762 (void) @@ -118,9 +208,8 @@ GUPnPContext *context = NULL; GError *error = NULL; GUPnPControlPoint *cp = NULL; - guint timeout_id = 0; GUPnPRootDevice *rd; - TestBgo696762Data data = { NULL, NULL }; + TestServiceProxyData data = { NULL, NULL }; GUPnPServiceInfo *info = NULL; data.loop = g_main_loop_new (NULL, FALSE); @@ -130,28 +219,26 @@ g_assert (error == NULL); cp = gupnp_control_point_new (context, - "urn:test-gupnp-org:service:bgo696762:1"); + "urn:test-gupnp-org:service:TestService:1"); gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); g_signal_connect (G_OBJECT (cp), "service-proxy-available", - G_CALLBACK (test_bgo_696762_on_sp_available), + G_CALLBACK (test_on_sp_available), &data); - rd = gupnp_root_device_new (context, "TestBgo696762.xml", DATA_PATH); + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); gupnp_root_device_set_available (rd, TRUE); info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd), - "urn:test-gupnp-org:service:bgo696762:1"); + "urn:test-gupnp-org:service:TestService:1"); g_signal_connect (G_OBJECT (info), "action-invoked::Browse", G_CALLBACK (test_bgo_696762_on_browse_call), &data); - timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); - g_main_loop_run (data.loop); - g_source_remove (timeout_id); + test_run_loop (data.loop); g_assert (data.proxy != NULL); gupnp_service_proxy_begin_action (data.proxy, @@ -166,9 +253,131 @@ "SortCriteria", G_TYPE_STRING, "", NULL); - timeout_id = g_timeout_add_seconds (2, test_bgo_696762_on_timeout, &(data.loop)); - g_main_loop_run (data.loop); - g_source_remove (timeout_id); + test_run_loop (data.loop); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (context); +} + +/* Test that proxies created by ResourceFactory are of the GType + * set with gupnp_resource_factory_register_resource_proxy_type(). + * https://bugzilla.gnome.org/show_bug.cgi?id=678701 */ +static void +test_bgo_678701 (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + TestBgo678701Data data = { NULL, NULL }; + GUPnPRootDevice *rd; + GUPnPServiceInfo *info = NULL; + GUPnPDeviceInfo *dev_info = NULL; + GUPnPResourceFactory *factory; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = gupnp_context_new (NULL, "lo", 0, &error); + g_assert (context != NULL); + g_assert (error == NULL); + + factory = gupnp_resource_factory_get_default (); + gupnp_resource_factory_register_resource_proxy_type (factory, + "urn:test-gupnp-org:service:TestService:1", + test_bgo_678701_service_get_type ()); + gupnp_resource_factory_register_resource_proxy_type (factory, + "urn:test-gupnp-org:device:TestSubDevice:1", + test_bgo_678701_device_get_type ()); + + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); + gupnp_root_device_set_available (rd, TRUE); + + cp = gupnp_control_point_new (context, + "urn:test-gupnp-org:device:TestDevice:1"); + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + g_signal_connect (G_OBJECT (cp), + "device-proxy-available", + G_CALLBACK (test_bgo_678701_on_dp_available), + &data); + + test_run_loop (data.loop); + g_assert (data.proxy != NULL); + + info = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (data.proxy), + "urn:test-gupnp-org:service:TestService:1"); + g_assert_cmpstr(G_OBJECT_TYPE_NAME (info), ==, "TestBgo678701Service"); + + dev_info = gupnp_device_info_get_device (GUPNP_DEVICE_INFO (data.proxy), + "urn:test-gupnp-org:device:TestSubDevice:1"); + g_assert_cmpstr(G_OBJECT_TYPE_NAME (dev_info), ==, "TestBgo678701Device"); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (context); +} + +/* Test that removing a notify-callback from the callback itself works + * https://bugzilla.gnome.org/show_bug.cgi?id=678701 */ +static void +test_bgo_690400 (void) +{ + GUPnPContext *context = NULL; + GError *error = NULL; + GUPnPControlPoint *cp = NULL; + TestServiceProxyData data = { NULL, NULL }; + GUPnPRootDevice *rd; + GUPnPServiceInfo *service; + + data.loop = g_main_loop_new (NULL, FALSE); + + context = gupnp_context_new (NULL, "lo", 0, &error); + g_assert (context != NULL); + g_assert (error == NULL); + + cp = gupnp_control_point_new (context, + "urn:test-gupnp-org:service:TestService:1"); + gssdp_resource_browser_set_active (GSSDP_RESOURCE_BROWSER (cp), TRUE); + + g_signal_connect (G_OBJECT (cp), + "service-proxy-available", + G_CALLBACK (test_on_sp_available), + &data); + + rd = gupnp_root_device_new (context, "TestDevice.xml", DATA_PATH); + service = gupnp_device_info_get_service (GUPNP_DEVICE_INFO (rd), + "urn:test-gupnp-org:service:TestService:1"); + g_signal_connect (service, "query-variable", + G_CALLBACK (test_bgo_690400_query_variable), NULL); + gupnp_root_device_set_available (rd, TRUE); + + test_run_loop (data.loop); + g_assert (data.proxy != NULL); + + gupnp_service_proxy_add_notify (data.proxy, + "evented_variable", + G_TYPE_STRING, + (GUPnPServiceProxyNotifyCallback)test_bgo_690400_notify, + &data); + gupnp_service_proxy_add_notify (data.proxy, + "evented_variable", + G_TYPE_STRING, + (GUPnPServiceProxyNotifyCallback)test_bgo_690400_notify_too, + &data); + + gupnp_service_proxy_set_subscribed (data.proxy, TRUE); + + test_run_loop (data.loop); + + g_main_loop_unref (data.loop); + g_object_unref (data.proxy); + g_object_unref (cp); + g_object_unref (rd); + g_object_unref (service); + g_object_unref (context); } int @@ -178,6 +387,8 @@ #endif g_test_init (&argc, &argv, NULL); g_test_add_func ("/bugs/696762", test_bgo_696762); + g_test_add_func ("/bugs/678701", test_bgo_678701); + g_test_add_func ("/bugs/690400", test_bgo_690400); return g_test_run (); } -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
