[svn r705] Solved bug with GObject incompatibility.
1.1 --- a/gmyth-upnp/src/Makefile.am Wed May 23 16:11:29 2007 +0100
1.2 +++ b/gmyth-upnp/src/Makefile.am Wed May 23 16:29:42 2007 +0100
1.3 @@ -2,12 +2,15 @@
1.4
1.5 lib_LTLIBRARIES = libgmythupnp.la
1.6
1.7 +INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src @GLIB_CFLAGS@ @GOBJECT_CFLAGS@
1.8 +
1.9 BUILT_SOURCES = \
1.10 gmyth_upnp_marshal.c \
1.11 gmyth_upnp_marshal.h
1.12
1.13 libgmythupnp_la_SOURCES = \
1.14 - gmyth_upnp.c
1.15 + gmyth_upnp.c \
1.16 + $(BUILT_SOURCES)
1.17
1.18 EXTRA_libgmythupnp_la_SOURCES = gmyth_upnp_marshal.list
1.19
2.1 --- a/gmyth-upnp/src/gmyth_upnp.c Wed May 23 16:11:29 2007 +0100
2.2 +++ b/gmyth-upnp/src/gmyth_upnp.c Wed May 23 16:29:42 2007 +0100
2.3 @@ -66,7 +66,7 @@
2.4 static void gmyth_upnp_dispose (GObject *object);
2.5 static void gmyth_upnp_finalize (GObject *object);
2.6
2.7 -static void _mythtv_device_found ( GMythUPnPDeviceStatus status, gchar *dev );
2.8 +static void _mythtv_device_found ( GMythUPnPDeviceStatus status, gchar *dev, gpointer obj );
2.9 static void _clinkc_mythtv_device_found ( gchar *udn, GMythUPnPDeviceStatus status );
2.10
2.11 static gboolean gmyth_upnp_initialize ( GMythUPnP *gmyth_upnp, GMythBackendInfo *gmyth_backend_info,
2.12 @@ -182,7 +182,7 @@
2.13 * GObject's signal handler
2.14 */
2.15 static void
2.16 -_mythtv_device_found( GMythUPnPDeviceStatus status, gchar* udn )
2.17 +_mythtv_device_found( GMythUPnPDeviceStatus status, gchar* udn, gpointer obj )
2.18 {
2.19 g_debug( "status = %d, UDN = %s\n", status, udn );
2.20 }
2.21 @@ -193,7 +193,7 @@
2.22 static void
2.23 _clinkc_mythtv_device_found ( gchar *udn, GMythUPnPDeviceStatus status )
2.24 {
2.25 - if ( gmyth_upnp_static != NULL )
2.26 + if ( gmyth_upnp_static != NULL && udn != NULL )
2.27 g_signal_emit ( gmyth_upnp_static,
2.28 GMYTH_UPNP_GET_CLASS (gmyth_upnp_static)->device_found_handler_signal_id, 0, /* details */
2.29 status, udn );
2.30 @@ -308,7 +308,7 @@
2.31
2.32 *mythtv_servers_lst = g_hash_table_new( g_str_hash, g_str_equal );
2.33
2.34 - gchar* mythtvFriendlyName = "Myth";
2.35 + const gchar* mythtvFriendlyName = "Myth";
2.36 /* begin assertion about the size of discovered devices */
2.37 gint numDevices = cg_upnp_controlpoint_getndevices(controlPt);
2.38 gint cntDevs = 0;
3.1 --- a/gmyth-upnp/src/gmyth_upnp.h Wed May 23 16:11:29 2007 +0100
3.2 +++ b/gmyth-upnp/src/gmyth_upnp.h Wed May 23 16:29:42 2007 +0100
3.3 @@ -59,11 +59,11 @@
3.4
3.5 typedef enum upnp_device_list_status {
3.6 GMYTH_UPNP_DEVICE_ADDED = 0,
3.7 - GMYTH_UPNP_DEVICE_REMOVED,
3.8 - GMYTH_UPNP_DEVICE_UPDATED
3.9 + GMYTH_UPNP_DEVICE_UPDATED,
3.10 + GMYTH_UPNP_DEVICE_REMOVED
3.11 } GMythUPnPDeviceStatus;
3.12
3.13 -typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev );
3.14 +typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev, gpointer obj );
3.15
3.16 struct _GMythUPnPClass
3.17 {
3.18 @@ -104,8 +104,9 @@
3.19 GType gmyth_upnp_get_type (void);
3.20 GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info,
3.21 GMythUPnPDeviceListener handler );
3.22 -gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
3.23 -gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
3.24 +
3.25 +GList * gmyth_upnp_do_search_sync( GMythUPnP* gmyth_upnp );
3.26 +
3.27 GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
3.28
3.29 G_END_DECLS