[svn r930] removed upnp dependency trunk
authorrenatofilho
Mon Feb 25 13:49:59 2008 +0000 (2008-02-25)
branchtrunk
changeset 9215bf73f56521b
parent 920 e3e434d3ed83
child 922 04cd5e61dca3
[svn r930] removed upnp dependency
gmyth/AUTHORS
gmyth/configure.ac
gmyth/samples/Makefile.am
gmyth/samples/gmyth_upnp_search.c
     1.1 --- a/gmyth/AUTHORS	Thu Feb 21 22:49:45 2008 +0000
     1.2 +++ b/gmyth/AUTHORS	Mon Feb 25 13:49:59 2008 +0000
     1.3 @@ -2,3 +2,4 @@
     1.4  Hallyson Luiz de Morais Melo <hallyson.melo@indt.org.br>
     1.5  Leonardo Sobral Cunha <leonardo.cunha@indt.org.br>
     1.6  Rosfran Lins Borges <rosfran.borges@indt.org.br>
     1.7 +Renato Araujo Oliveira Filho <rento.filho@indt.org.br>
     2.1 --- a/gmyth/configure.ac	Thu Feb 21 22:49:45 2008 +0000
     2.2 +++ b/gmyth/configure.ac	Mon Feb 25 13:49:59 2008 +0000
     2.3 @@ -144,20 +144,6 @@
     2.4          CFLAGS="$CFLAGS -pg"
     2.5  fi
     2.6  
     2.7 -AC_ARG_ENABLE(upnp,
     2.8 -        AS_HELP_STRING([--enable-upnp],
     2.9 -                [enable clinkc's UPnP library (default = no)]),
    2.10 -                [
    2.11 -                        if test $enableval = no; then
    2.12 -                                USE_UPNP=no;
    2.13 -                        else
    2.14 -                                USE_UPNP=yes;
    2.15 -                        fi
    2.16 -                ],[
    2.17 -                        USE_UPNP=no;
    2.18 -                ]
    2.19 -)
    2.20 -
    2.21  # Check for pkgconfig
    2.22  AC_CHECK_PROG(HAVE_PKGCONFIG, pkg-config, yes, no)
    2.23  # Give error and exit if we don't have pkgconfig
    2.24 @@ -227,17 +213,6 @@
    2.25  AC_SUBST(LIBCURL_CFLAGS)
    2.26  AC_SUBST(LIBCURL_LIBS)
    2.27  
    2.28 -if [ test $USE_UPNP = yes ]; then
    2.29 -	# checks if the gmyth-upnp library can be found
    2.30 -	PKG_CHECK_MODULES(UPNP, gmyth-upnp, HAVE_UPNP=yes, HAVE_UPNP=no)
    2.31 -	if test "x$HAVE_UPNP" = "xyes"; then
    2.32 -		AC_DEFINE(HAVE_UPNP, 1, [GMyth UPnP library found!])
    2.33 -		CFLAGS="$CFLAGS -DHAVE_UPNP"
    2.34 -	fi
    2.35 -fi
    2.36 -
    2.37 -AM_CONDITIONAL(HAVE_UPNP, test "x$HAVE_UPNP" = "xyes")
    2.38 -
    2.39  #
    2.40  # mysql libraries
    2.41  #
     3.1 --- a/gmyth/samples/Makefile.am	Thu Feb 21 22:49:45 2008 +0000
     3.2 +++ b/gmyth/samples/Makefile.am	Mon Feb 25 13:49:59 2008 +0000
     3.3 @@ -1,20 +1,11 @@
     3.4  bin_PROGRAMS = gmyth-cat gmyth-ls
     3.5  
     3.6 -if HAVE_UPNP
     3.7 -bin_PROGRAMS += gmyth-upnp-search
     3.8 -endif
     3.9 -
    3.10  gmyth_cat_SOURCES = \
    3.11          gmyth_cat.c
    3.12  
    3.13  gmyth_ls_SOURCES = \
    3.14          gmyth_ls.c
    3.15  
    3.16 -if HAVE_UPNP
    3.17 -gmyth_upnp_search_SOURCES = \
    3.18 -        gmyth_upnp_search.c
    3.19 -endif
    3.20 -
    3.21  LDADD = \
    3.22          $(top_builddir)/src/libgmyth.la
    3.23  
    3.24 @@ -28,12 +19,3 @@
    3.25          -I$(top_srcdir)/src \
    3.26          $(GLIB_CFLAGS) \
    3.27          $(GOBJECT_CFLAGS)
    3.28 -
    3.29 -if HAVE_UPNP
    3.30 -INCLUDES += \
    3.31 -	$(UPNP_CFLAGS)
    3.32 -
    3.33 -AM_LDFLAGS += \
    3.34 -	$(UPNP_LIBS)
    3.35 -endif
    3.36 -
     4.1 --- a/gmyth/samples/gmyth_upnp_search.c	Thu Feb 21 22:49:45 2008 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,123 +0,0 @@
     4.4 -
     4.5 -#ifdef HAVE_CONFIG_H
     4.6 -#include "config.h"
     4.7 -#endif
     4.8 -
     4.9 -#include <stdio.h>
    4.10 -#include <glib.h>
    4.11 -
    4.12 -#include <gmyth-upnp/gmyth_upnp.h>
    4.13 -
    4.14 -#include "gmyth_backendinfo.h"
    4.15 -#include "gmyth_file_transfer.h"
    4.16 -#include "gmyth_livetv.h"
    4.17 -#include "gmyth_util.h"
    4.18 -#include "gmyth_common.h"
    4.19 -
    4.20 -typedef struct {
    4.21 -    GMythBackendInfo *b_info;
    4.22 -    gchar          *mythtv_id;
    4.23 -} gupnp_options_t;
    4.24 -
    4.25 -static gupnp_options_t *
    4.26 -_gupnp_options_new()
    4.27 -{
    4.28 -    gupnp_options_t *options = g_new0(gupnp_options_t, 1);
    4.29 -    options->b_info = gmyth_backend_info_new();
    4.30 -
    4.31 -    return options;
    4.32 -}
    4.33 -
    4.34 -static void
    4.35 -_gupnp_options_free(gupnp_options_t * options)
    4.36 -{
    4.37 -    g_return_if_fail(options != NULL);
    4.38 -
    4.39 -    if (options->b_info)
    4.40 -        g_object_unref(options->b_info);
    4.41 -    g_free(options->mythtv_id);
    4.42 -}
    4.43 -
    4.44 -static          gboolean
    4.45 -_parse_args(int argc, char *argv[], gupnp_options_t * options)
    4.46 -{
    4.47 -    GError         *error = NULL;
    4.48 -    GOptionContext *context;
    4.49 -
    4.50 -    gchar          *mythtv_id = NULL;
    4.51 -
    4.52 -    GOptionEntry    entries[] = {
    4.53 -        {"mythtvid", 'm', 0, G_OPTION_ARG_STRING, &mythtv_id,
    4.54 -         "MythTV UPnP service " "identifigupnpion", "UPNP_ID"},
    4.55 -
    4.56 -        {NULL}
    4.57 -    };
    4.58 -
    4.59 -    g_return_val_if_fail(options != NULL, FALSE);
    4.60 -
    4.61 -    context =
    4.62 -        g_option_context_new
    4.63 -        ("- searches for a list of connected mythtv backend recorded "
    4.64 -         "file and prints it on the standard output\n");
    4.65 -    g_option_context_add_main_entries(context, entries, NULL);
    4.66 -    g_option_context_parse(context, &argc, &argv, &error);
    4.67 -    g_option_context_set_help_enabled(context, TRUE);
    4.68 -
    4.69 -    g_option_context_free(context);
    4.70 -
    4.71 -    g_free(mythtv_id);
    4.72 -
    4.73 -    return TRUE;
    4.74 -}
    4.75 -
    4.76 -
    4.77 -static void
    4.78 -_got_upnp_device(GMythUPnP * gupnp, GMythUPnPDeviceStatus status,
    4.79 -                 gchar * udn)
    4.80 -{
    4.81 -    g_debug("Got Device !!! [%s, %s]",
    4.82 -            gmyth_upnp_device_status_to_string(status), udn);
    4.83 -}
    4.84 -
    4.85 -static          gboolean
    4.86 -_gupnp_search_devices(gupnp_options_t * options)
    4.87 -{
    4.88 -    GList          *upnp_servers = NULL;
    4.89 -    GMythUPnP      *gupnp;
    4.90 -    GMythBackendInfo *backend_info = gmyth_backend_info_new();
    4.91 -
    4.92 -    g_return_val_if_fail(options != NULL, FALSE);
    4.93 -    g_return_val_if_fail(options->b_info != NULL, FALSE);
    4.94 -
    4.95 -    gupnp = gmyth_upnp_new(backend_info, _got_upnp_device);
    4.96 -    upnp_servers = gmyth_upnp_do_search_sync(gupnp);
    4.97 -
    4.98 -    g_list_free(upnp_servers);
    4.99 -    g_object_unref(gupnp);
   4.100 -
   4.101 -    return TRUE;
   4.102 -}
   4.103 -
   4.104 -int
   4.105 -main(int argc, char *argv[])
   4.106 -{
   4.107 -    gboolean        res = FALSE;
   4.108 -    gupnp_options_t *options;
   4.109 -
   4.110 -    g_type_init();
   4.111 -    if (!g_thread_supported())
   4.112 -        g_thread_init(NULL);
   4.113 -
   4.114 -    options = _gupnp_options_new();
   4.115 -    res = _parse_args(argc, argv, options);
   4.116 -    if (!res) {
   4.117 -        g_printerr("Argument invalid. Type --help\n");
   4.118 -        return 1;
   4.119 -    }
   4.120 -
   4.121 -    res = _gupnp_search_devices(options);
   4.122 -
   4.123 -    _gupnp_options_free(options);
   4.124 -
   4.125 -    return 0;
   4.126 -}