# HG changeset patch # User rosfran # Date 1179934182 -3600 # Node ID 3710052a05c99265366aa8130c2cc158d02a83d2 # Parent 9019388af98087155aa2f2d334fc0f862ef1907a [svn r705] Solved bug with GObject incompatibility. diff -r 9019388af980 -r 3710052a05c9 gmyth-upnp/src/Makefile.am --- a/gmyth-upnp/src/Makefile.am Wed May 23 16:11:29 2007 +0100 +++ b/gmyth-upnp/src/Makefile.am Wed May 23 16:29:42 2007 +0100 @@ -2,12 +2,15 @@ lib_LTLIBRARIES = libgmythupnp.la +INCLUDES = -I$(top_srcdir)/src -I$(top_builddir)/src @GLIB_CFLAGS@ @GOBJECT_CFLAGS@ + BUILT_SOURCES = \ gmyth_upnp_marshal.c \ gmyth_upnp_marshal.h libgmythupnp_la_SOURCES = \ - gmyth_upnp.c + gmyth_upnp.c \ + $(BUILT_SOURCES) EXTRA_libgmythupnp_la_SOURCES = gmyth_upnp_marshal.list diff -r 9019388af980 -r 3710052a05c9 gmyth-upnp/src/gmyth_upnp.c --- a/gmyth-upnp/src/gmyth_upnp.c Wed May 23 16:11:29 2007 +0100 +++ b/gmyth-upnp/src/gmyth_upnp.c Wed May 23 16:29:42 2007 +0100 @@ -66,7 +66,7 @@ static void gmyth_upnp_dispose (GObject *object); static void gmyth_upnp_finalize (GObject *object); -static void _mythtv_device_found ( GMythUPnPDeviceStatus status, gchar *dev ); +static void _mythtv_device_found ( GMythUPnPDeviceStatus status, gchar *dev, gpointer obj ); static void _clinkc_mythtv_device_found ( gchar *udn, GMythUPnPDeviceStatus status ); static gboolean gmyth_upnp_initialize ( GMythUPnP *gmyth_upnp, GMythBackendInfo *gmyth_backend_info, @@ -182,7 +182,7 @@ * GObject's signal handler */ static void -_mythtv_device_found( GMythUPnPDeviceStatus status, gchar* udn ) +_mythtv_device_found( GMythUPnPDeviceStatus status, gchar* udn, gpointer obj ) { g_debug( "status = %d, UDN = %s\n", status, udn ); } @@ -193,7 +193,7 @@ static void _clinkc_mythtv_device_found ( gchar *udn, GMythUPnPDeviceStatus status ) { - if ( gmyth_upnp_static != NULL ) + if ( gmyth_upnp_static != NULL && udn != NULL ) g_signal_emit ( gmyth_upnp_static, GMYTH_UPNP_GET_CLASS (gmyth_upnp_static)->device_found_handler_signal_id, 0, /* details */ status, udn ); @@ -308,7 +308,7 @@ *mythtv_servers_lst = g_hash_table_new( g_str_hash, g_str_equal ); - gchar* mythtvFriendlyName = "Myth"; + const gchar* mythtvFriendlyName = "Myth"; /* begin assertion about the size of discovered devices */ gint numDevices = cg_upnp_controlpoint_getndevices(controlPt); gint cntDevs = 0; diff -r 9019388af980 -r 3710052a05c9 gmyth-upnp/src/gmyth_upnp.h --- a/gmyth-upnp/src/gmyth_upnp.h Wed May 23 16:11:29 2007 +0100 +++ b/gmyth-upnp/src/gmyth_upnp.h Wed May 23 16:29:42 2007 +0100 @@ -59,11 +59,11 @@ typedef enum upnp_device_list_status { GMYTH_UPNP_DEVICE_ADDED = 0, - GMYTH_UPNP_DEVICE_REMOVED, - GMYTH_UPNP_DEVICE_UPDATED + GMYTH_UPNP_DEVICE_UPDATED, + GMYTH_UPNP_DEVICE_REMOVED } GMythUPnPDeviceStatus; -typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev ); +typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev, gpointer obj ); struct _GMythUPnPClass { @@ -104,8 +104,9 @@ GType gmyth_upnp_get_type (void); GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info, GMythUPnPDeviceListener handler ); -gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp ); -gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp ); + +GList * gmyth_upnp_do_search_sync( GMythUPnP* gmyth_upnp ); + GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp ); G_END_DECLS