1.1 --- a/gmyth-upnp/Makefile.am Mon Feb 25 14:12:27 2008 +0000
1.2 +++ b/gmyth-upnp/Makefile.am Mon Feb 25 14:14:29 2008 +0000
1.3 @@ -1,4 +1,4 @@
1.4 -SUBDIRS= src test
1.5 +SUBDIRS= src tests
1.6
1.7 ### all of the standard pc files we need to generate
1.8 pcfiles = gmyth-upnp.pc
2.1 --- a/gmyth-upnp/configure.ac Mon Feb 25 14:12:27 2008 +0000
2.2 +++ b/gmyth-upnp/configure.ac Mon Feb 25 14:14:29 2008 +0000
2.3 @@ -128,7 +128,7 @@
2.4 AC_OUTPUT([
2.5 Makefile
2.6 src/Makefile
2.7 -test/Makefile
2.8 +tests/Makefile
2.9 gmyth-upnp.pc])
2.10
2.11 if test "x$enable_debug" != "xno"; then
3.1 --- a/gmyth-upnp/test/Makefile.am Mon Feb 25 14:12:27 2008 +0000
3.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
3.3 @@ -1,18 +0,0 @@
3.4 -LDADD = \
3.5 - $(GLIB_LIBS) \
3.6 - $(LIBUPNP_LIBS) \
3.7 - $(top_srcdir)/src/.libs/libgmythupnp.la
3.8 -
3.9 -INCLUDES = \
3.10 - -I$(top_srcdir)/src \
3.11 - $(GLIB_CFLAGS) \
3.12 - $(GOBJECT_CFLAGS) \
3.13 - $(LIBUPNP_CFLAGS)
3.14 -
3.15 -noinst_PROGRAMS = \
3.16 - gmyth-upnp-test
3.17 -
3.18 -gmyth_upnp_test_SOURCES = \
3.19 - main.c
3.20 -
3.21 -CLEANFILES = $(BUILT_SOURCES)
4.1 --- a/gmyth-upnp/test/main.c Mon Feb 25 14:12:27 2008 +0000
4.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
4.3 @@ -1,78 +0,0 @@
4.4 -/**
4.5 - * GMyth Library
4.6 - *
4.7 - * @file test/main.c
4.8 - *
4.9 - * @brief <p> GMythUPnP allows that a MythTV frontend discovers a
4.10 - * MythTV backend, using the UPnP architecture.
4.11 - *
4.12 - * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
4.13 - * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
4.14 - * @authon Renato Araujo Oliveira Filho <renato.filho@indt.org.br>
4.15 - *
4.16 - * This library is free software; you can redistribute it and/or
4.17 - * modify it under the terms of the GNU Library General Public
4.18 - * License as published by the Free Software Foundation; either
4.19 - * version 2 of the License, or (at your option) any later version.
4.20 - *
4.21 - * This library is distributed in the hope that it will be useful,
4.22 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
4.23 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4.24 - * Library General Public License for more details.
4.25 - *
4.26 - * You should have received a copy of the GNU Library General Public
4.27 - * License along with this library; if not, write to the
4.28 - * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
4.29 - * Boston, MA 02111-1307, USA.
4.30 - */
4.31 -
4.32 -
4.33 -#include <glib.h>
4.34 -
4.35 -#include "gmyth_upnp.h"
4.36 -
4.37 -static void
4.38 -_device_found_cb (GMythUPnP *upnp,
4.39 - GMythBackendInfo *info,
4.40 - gpointer data)
4.41 -{
4.42 - g_debug ("BACKEND FOUND: %s", info->hostname);
4.43 -}
4.44 -
4.45 -static void
4.46 -_device_lost_cb (GMythUPnP *upnp,
4.47 - GMythBackendInfo *info,
4.48 - gpointer data)
4.49 -{
4.50 - g_debug ("BACKEND LOST: %s", info->hostname);
4.51 -}
4.52 -
4.53 -
4.54 -
4.55 -int main (int argc, char** argv)
4.56 -{
4.57 - GMythUPnP *o;
4.58 - GMainLoop *loop;
4.59 -
4.60 - g_type_init ();
4.61 - g_thread_init (NULL);
4.62 -
4.63 - o = gmyth_upnp_get_instance ();
4.64 - g_signal_connect (o,
4.65 - "device-found",
4.66 - G_CALLBACK (_device_found_cb),
4.67 - NULL);
4.68 - g_signal_connect (o,
4.69 - "device-lost",
4.70 - G_CALLBACK (_device_lost_cb),
4.71 - NULL);
4.72 -
4.73 -
4.74 - gmyth_upnp_search (o);
4.75 -
4.76 - loop = g_main_loop_new (NULL, FALSE);
4.77 - g_main_loop_run (loop);
4.78 - g_object_unref (o);
4.79 -
4.80 - return 0;
4.81 -}
5.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
5.2 +++ b/gmyth-upnp/tests/Makefile.am Mon Feb 25 14:14:29 2008 +0000
5.3 @@ -0,0 +1,18 @@
5.4 +LDADD = \
5.5 + $(GLIB_LIBS) \
5.6 + $(LIBUPNP_LIBS) \
5.7 + $(top_srcdir)/src/.libs/libgmythupnp.la
5.8 +
5.9 +INCLUDES = \
5.10 + -I$(top_srcdir)/src \
5.11 + $(GLIB_CFLAGS) \
5.12 + $(GOBJECT_CFLAGS) \
5.13 + $(LIBUPNP_CFLAGS)
5.14 +
5.15 +noinst_PROGRAMS = \
5.16 + gmyth-upnp-test
5.17 +
5.18 +gmyth_upnp_test_SOURCES = \
5.19 + main.c
5.20 +
5.21 +CLEANFILES = $(BUILT_SOURCES)
6.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
6.2 +++ b/gmyth-upnp/tests/main.c Mon Feb 25 14:14:29 2008 +0000
6.3 @@ -0,0 +1,78 @@
6.4 +/**
6.5 + * GMyth Library
6.6 + *
6.7 + * @file test/main.c
6.8 + *
6.9 + * @brief <p> GMythUPnP allows that a MythTV frontend discovers a
6.10 + * MythTV backend, using the UPnP architecture.
6.11 + *
6.12 + * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
6.13 + * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
6.14 + * @authon Renato Araujo Oliveira Filho <renato.filho@indt.org.br>
6.15 + *
6.16 + * This library is free software; you can redistribute it and/or
6.17 + * modify it under the terms of the GNU Library General Public
6.18 + * License as published by the Free Software Foundation; either
6.19 + * version 2 of the License, or (at your option) any later version.
6.20 + *
6.21 + * This library is distributed in the hope that it will be useful,
6.22 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
6.23 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6.24 + * Library General Public License for more details.
6.25 + *
6.26 + * You should have received a copy of the GNU Library General Public
6.27 + * License along with this library; if not, write to the
6.28 + * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6.29 + * Boston, MA 02111-1307, USA.
6.30 + */
6.31 +
6.32 +
6.33 +#include <glib.h>
6.34 +
6.35 +#include "gmyth_upnp.h"
6.36 +
6.37 +static void
6.38 +_device_found_cb (GMythUPnP *upnp,
6.39 + GMythBackendInfo *info,
6.40 + gpointer data)
6.41 +{
6.42 + g_debug ("BACKEND FOUND: %s", info->hostname);
6.43 +}
6.44 +
6.45 +static void
6.46 +_device_lost_cb (GMythUPnP *upnp,
6.47 + GMythBackendInfo *info,
6.48 + gpointer data)
6.49 +{
6.50 + g_debug ("BACKEND LOST: %s", info->hostname);
6.51 +}
6.52 +
6.53 +
6.54 +
6.55 +int main (int argc, char** argv)
6.56 +{
6.57 + GMythUPnP *o;
6.58 + GMainLoop *loop;
6.59 +
6.60 + g_type_init ();
6.61 + g_thread_init (NULL);
6.62 +
6.63 + o = gmyth_upnp_get_instance ();
6.64 + g_signal_connect (o,
6.65 + "device-found",
6.66 + G_CALLBACK (_device_found_cb),
6.67 + NULL);
6.68 + g_signal_connect (o,
6.69 + "device-lost",
6.70 + G_CALLBACK (_device_lost_cb),
6.71 + NULL);
6.72 +
6.73 +
6.74 + gmyth_upnp_search (o);
6.75 +
6.76 + loop = g_main_loop_new (NULL, FALSE);
6.77 + g_main_loop_run (loop);
6.78 + g_object_unref (o);
6.79 +
6.80 + return 0;
6.81 +}