|
From: <ren...@us...> - 2008-02-15 13:52:18
|
Revision: 924
http://gmyth.svn.sourceforge.net/gmyth/?rev=924&view=rev
Author: renatofilho
Date: 2008-02-15 05:52:23 -0800 (Fri, 15 Feb 2008)
Log Message:
-----------
created method gmyth_upnp_get_devices
Modified Paths:
--------------
trunk/gmyth-upnp/autogen.sh
trunk/gmyth-upnp/configure.ac
trunk/gmyth-upnp/gmyth-upnp.pc.in
trunk/gmyth-upnp/src/gmyth_upnp.c
trunk/gmyth-upnp/src/gmyth_upnp.h
Modified: trunk/gmyth-upnp/autogen.sh
===================================================================
--- trunk/gmyth-upnp/autogen.sh 2008-02-14 16:13:51 UTC (rev 923)
+++ trunk/gmyth-upnp/autogen.sh 2008-02-15 13:52:23 UTC (rev 924)
@@ -4,7 +4,7 @@
srcdir=`dirname $0`
test -z "$srcdir" && srcdir=.
-PKG_NAME="mtv"
+PKG_NAME="gmyth-upnp"
(test -f $srcdir/configure.ac) || {
echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
Modified: trunk/gmyth-upnp/configure.ac
===================================================================
--- trunk/gmyth-upnp/configure.ac 2008-02-14 16:13:51 UTC (rev 923)
+++ trunk/gmyth-upnp/configure.ac 2008-02-15 13:52:23 UTC (rev 924)
@@ -3,7 +3,7 @@
AC_PREREQ(2.50)
-AC_INIT([gmyth-upnp],[0.7])
+AC_INIT([gmyth-upnp],[0.7.1])
AC_CONFIG_SRCDIR([src/gmyth_upnp.c])
AC_CONFIG_HEADER(config.h)
Modified: trunk/gmyth-upnp/gmyth-upnp.pc.in
===================================================================
--- trunk/gmyth-upnp/gmyth-upnp.pc.in 2008-02-14 16:13:51 UTC (rev 923)
+++ trunk/gmyth-upnp/gmyth-upnp.pc.in 2008-02-15 13:52:23 UTC (rev 924)
@@ -5,8 +5,8 @@
Name: gmyth-upnp
Description: Myth TV upnp library based upon GLib/GObject paradigm
-Version: @VERSION@
-Requires: gobject-2.0 glib-2.0 clinkc
+Version: 0.7.1
+Requires: gobject-2.0 glib-2.0 libupnp
Libs: @LIBGMYTH_LIBS@ -L${libdir} -lgmythupnp
Cflags: @LIBGMYTH_CFLAGS@ -I${includedir}/gmyth-upnp
Modified: trunk/gmyth-upnp/src/gmyth_upnp.c
===================================================================
--- trunk/gmyth-upnp/src/gmyth_upnp.c 2008-02-14 16:13:51 UTC (rev 923)
+++ trunk/gmyth-upnp/src/gmyth_upnp.c 2008-02-15 13:52:23 UTC (rev 924)
@@ -212,6 +212,31 @@
g_warning ("Fail to start upnp listener: %d", ret);
}
+static void
+_fill_servers_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
+{
+ GList **lst;
+
+ lst = (GList **) user_data;
+
+ *lst = g_list_append (*lst, g_object_ref (value));
+}
+
+GList*
+gmyth_upnp_get_devices (GMythUPnP *self)
+{
+ GMythUPnPPrivate *priv;
+ GList *lst;
+
+ priv = GMYTH_UPNP_GET_PRIVATE (self);
+ lst = NULL;
+ g_hash_table_foreach (priv->servers, (GHFunc) _fill_servers_cb, &lst);
+
+ return lst;
+}
+
static gboolean
_idle_emit_device_found_signal (gpointer data)
{
@@ -329,7 +354,6 @@
g_strdup (uuid),
g_object_ref (info));
g_mutex_unlock (priv->mutex);
- g_debug ("info url: %s", info_url);
g_free (info_url);
idle_data = g_new0 (GMythUPnPIdleData, 1);
@@ -403,11 +427,9 @@
d_event = (struct Upnp_Discovery *) e;
- g_debug ("TYPE: %s", d_event->ServiceType);
-
if (strcmp (d_event->ServiceType, UPNP_SERVICE_FILTER) != 0)
{
- g_debug ("invalid device : %s", d_event->DeviceId);
+ g_warning ("invalid device : %s", d_event->DeviceId);
break;
}
@@ -446,7 +468,6 @@
}
default:
- g_debug ("No handle event: %d", e_type);
break;
}
Modified: trunk/gmyth-upnp/src/gmyth_upnp.h
===================================================================
--- trunk/gmyth-upnp/src/gmyth_upnp.h 2008-02-14 16:13:51 UTC (rev 923)
+++ trunk/gmyth-upnp/src/gmyth_upnp.h 2008-02-15 13:52:23 UTC (rev 924)
@@ -77,6 +77,7 @@
GType gmyth_upnp_get_type (void);
GMythUPnP* gmyth_upnp_get_instance (void);
void gmyth_upnp_search (GMythUPnP * gmyth_upnp);
+GList* gmyth_upnp_get_devices (GMythUPnP * gmyth_upnp);
G_END_DECLS
#endif /* _GMYTH_UPNP_H_ */
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|