[svn r249] All upnp code removed. Now we have a library called gmyth-upnp trunk
authormelunko
Wed Jan 10 16:59:37 2007 +0000 (2007-01-10)
branchtrunk
changeset 2480f6b44cf56bb
parent 247 336a58ad1a90
child 249 dcf6bffe29a1
[svn r249] All upnp code removed. Now we have a library called gmyth-upnp
gmyth/configure.ac
gmyth/src/Makefile.am
gmyth/src/gmyth_backendinfo.c
gmyth/src/gmyth_upnp.c
gmyth/src/gmyth_upnp.h
     1.1 --- a/gmyth/configure.ac	Tue Jan 09 22:43:23 2007 +0000
     1.2 +++ b/gmyth/configure.ac	Wed Jan 10 16:59:37 2007 +0000
     1.3 @@ -234,31 +234,6 @@
     1.4  AC_SUBST(MYSQL_CFLAGS)
     1.5  AC_SUBST(MYSQL_LIBS)
     1.6  
     1.7 -dnl ========== Check for Cyberlink UPnP Libraries
     1.8 -AC_ARG_ENABLE(upnp,
     1.9 -	[AC_HELP_STRING([--enable-upnp], [enable building UPnP related stuff])],
    1.10 -	enable_upnp="$enableval",
    1.11 -	enable_upnp=no)
    1.12 -
    1.13 -if test "x$enable_upnp" = "xyes" ; then
    1.14 -	AC_MSG_NOTICE([Checking for the UPnP CyberLink for C library...])
    1.15 -	PKG_CHECK_MODULES(CYBERLINK,
    1.16 -	  clinkc,
    1.17 -	  HAVE_CYBERLINK=yes, HAVE_CYBERLINK=no)
    1.18 -fi
    1.19 -
    1.20 -if test "x$HAVE_CYBERLINK" = "xyes"; then
    1.21 -  AC_DEFINE(WITH_UPNP, 1, [build with upnp related stuff])
    1.22 -else
    1.23 -  AC_MSG_RESULT([UPnP features (using clinkc library) will not be added.])
    1.24 -fi
    1.25 -
    1.26 -AM_CONDITIONAL(WITH_UPNP, test "x$HAVE_CYBERLINK" = "xyes")
    1.27 -
    1.28 -dnl make CYBERLINK_CFLAGS and CYBERLINK_LIBS available
    1.29 -AC_SUBST(CYBERLINK_CFLAGS)
    1.30 -AC_SUBST(CYBERLINK_LIBS)
    1.31 -
    1.32  #dnl Enable gtk-doc
    1.33  #GTK_DOC_CHECK(1.4)
    1.34  
     2.1 --- a/gmyth/src/Makefile.am	Tue Jan 09 22:43:23 2007 +0000
     2.2 +++ b/gmyth/src/Makefile.am	Wed Jan 10 16:59:37 2007 +0000
     2.3 @@ -26,10 +26,6 @@
     2.4  	gmyth_uri.c					\
     2.5  	$(BUILT_SOURCES)
     2.6  
     2.7 -if WITH_UPNP
     2.8 -libgmyth_la_SOURCES += 			\
     2.9 -	gmyth_upnp.c
    2.10 -endif
    2.11  
    2.12  EXTRA_libgmyth_la_SOURCES = gmyth_marshal.list
    2.13  
    2.14 @@ -52,11 +48,6 @@
    2.15  	$(GSTPLUGINSBASE_CFLAGS)	\
    2.16  	$(MYSQL_CFLAGS)
    2.17  
    2.18 -if WITH_UPNP
    2.19 -libgmyth_la_CFLAGS += 			\
    2.20 -	$(CYBERLINK_CFLAGS)
    2.21 -endif
    2.22 -
    2.23  libgmyth_la_LDFLAGS = 			\
    2.24  	-export-dynamic 			\
    2.25  	$(MYSQL_LIBS) 				\
    2.26 @@ -64,13 +55,6 @@
    2.27  	$(GSTBASE_LIBS)				\
    2.28  	$(GSTPLUGINS_LIBS)
    2.29  
    2.30 -if WITH_UPNP
    2.31 -libgmyth_la_LDFLAGS += 			\
    2.32 -	$(CYBERLINK_LIBS)
    2.33 -libgmyth_la_LIBS = 			\
    2.34 -	$(CYBERLINK_LIBS)
    2.35 -endif
    2.36 -
    2.37  libgmyth_includedir = 			\
    2.38  	$(pkgincludedir)
    2.39  
    2.40 @@ -94,9 +78,4 @@
    2.41  	gmyth_programinfo.h			\
    2.42  	gmyth_uri.h
    2.43  	
    2.44 -if WITH_UPNP
    2.45 -libgmyth_include_HEADERS += 			\
    2.46 -	gmyth_upnp.h
    2.47 -endif
    2.48 -
    2.49  CLEANFILES = $(BUILT_SOURCES)
     3.1 --- a/gmyth/src/gmyth_backendinfo.c	Tue Jan 09 22:43:23 2007 +0000
     3.2 +++ b/gmyth/src/gmyth_backendinfo.c	Wed Jan 10 16:59:37 2007 +0000
     3.3 @@ -32,10 +32,6 @@
     3.4  #include "gmyth_uri.h"
     3.5  #include "gmyth_debug.h"
     3.6  
     3.7 -#ifdef WITH_UPNP
     3.8 -#include "gmyth_upnp.h"
     3.9 -#endif
    3.10 -
    3.11  static void gmyth_backend_info_class_init  (GMythBackendInfoClass *klass);
    3.12  static void gmyth_backend_info_init        (GMythBackendInfo *object);
    3.13  
    3.14 @@ -152,15 +148,7 @@
    3.15      
    3.16      if ( NULL == hostname || strlen(hostname) <= 0 )
    3.17      { 
    3.18 -    #ifdef WITH_UPNP
    3.19 -	    GMythUPnP *gmyth_upnp = gmyth_upnp_new( backend_info );
    3.20 -	    /* backend_info = gmyth_upnp_get_backend_info( gmyth_upnp ); */
    3.21 -	    backend_info->hostname = g_strdup ( gmyth_upnp_get_host( gmyth_upnp ) );
    3.22 -	    g_object_unref( gmyth_upnp );
    3.23 -    #else
    3.24 -	  	gmyth_debug ( "Error trying to set a hostname equals to NULL (it doesn't using UPnP)." );
    3.25 -  		return NULL;
    3.26 -    #endif
    3.27 +	gmyth_debug ( "Error trying to set a hostname equals to NULL (it doesn't using UPnP)." );
    3.28      } else {    	
    3.29      	backend_info->hostname = g_strdup (hostname);
    3.30      }
    3.31 @@ -197,15 +185,7 @@
    3.32  
    3.33      if ( port <= 0 )
    3.34      { 
    3.35 -    #ifdef WITH_UPNP
    3.36 -	    GMythUPnP *gmyth_upnp = gmyth_upnp_new( backend_info );
    3.37 -	    backend_info = gmyth_upnp_get_backend_info( gmyth_upnp );
    3.38 -	    backend_info->port = gmyth_upnp_get_port( gmyth_upnp );
    3.39 -	    g_object_unref( gmyth_upnp );
    3.40 -    #else
    3.41 -	  	gmyth_debug ( "Error trying to set a hostname equals to NULL (it doesn't using UPnP)." );
    3.42 -  		return NULL;
    3.43 -    #endif
    3.44 +        gmyth_debug ( "Error trying to set a hostname equals to NULL (it doesn't using UPnP)." );
    3.45      } else {    	
    3.46      	backend_info->port = port;
    3.47      }
     4.1 --- a/gmyth/src/gmyth_upnp.c	Tue Jan 09 22:43:23 2007 +0000
     4.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.3 @@ -1,350 +0,0 @@
     4.4 -/**
     4.5 - * GMyth Library
     4.6 - *
     4.7 - * @file gmyth/gmyth_upnp.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 - *
    4.15 - *//*
    4.16 - * 
    4.17 - * This program is free software; you can redistribute it and/or modify
    4.18 - * it under the terms of the GNU Lesser General Public License as published by
    4.19 - * the Free Software Foundation; either version 2 of the License, or
    4.20 - * (at your option) any later version.
    4.21 - *
    4.22 - * This program is distributed in the hope that it will be useful,
    4.23 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    4.24 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    4.25 - * GNU General Public License for more details.
    4.26 - *
    4.27 - * You should have received a copy of the GNU Lesser General Public License
    4.28 - * along with this program; if not, write to the Free Software
    4.29 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    4.30 - *   
    4.31 - */
    4.32 -
    4.33 -#ifdef HAVE_CONFIG_H
    4.34 -#include "config.h"
    4.35 -#endif
    4.36 -
    4.37 -#include "gmyth_upnp.h"
    4.38 -
    4.39 -#include <arpa/inet.h>
    4.40 -#include <sys/types.h>
    4.41 -#include <sys/socket.h>
    4.42 -#include <netdb.h>
    4.43 -#include <errno.h>
    4.44 -#include <stdlib.h>
    4.45 -
    4.46 -#include "gmyth_backendinfo.h"
    4.47 -#include "gmyth_socket.h"
    4.48 -#include "gmyth_uri.h"
    4.49 -#include "gmyth_debug.h"
    4.50 -
    4.51 -#define GMYTH_UPNP_MAX_SEARCHS		10
    4.52 -
    4.53 -static void gmyth_upnp_class_init          (GMythUPnPClass *klass);
    4.54 -static void gmyth_upnp_init                (GMythUPnP *object);
    4.55 -
    4.56 -static void gmyth_upnp_dispose  (GObject *object);
    4.57 -static void gmyth_upnp_finalize (GObject *object);
    4.58 -
    4.59 -static gboolean gmyth_upnp_initialize ( GMythUPnP *gmyth_upnp, GMythBackendInfo *gmyth_backend_info );
    4.60 -
    4.61 -static gboolean gmyth_upnp_print_cp_device_list( CgUpnpControlPoint* controlPt, gchar **udn, 
    4.62 -						GList **mythtv_servers_lst );
    4.63 -
    4.64 -G_DEFINE_TYPE(GMythUPnP, gmyth_upnp, G_TYPE_OBJECT)
    4.65 -
    4.66 -static GStaticMutex mutex = G_STATIC_MUTEX_INIT;
    4.67 -
    4.68 -static void
    4.69 -gmyth_upnp_class_init (GMythUPnPClass *klass)
    4.70 -{
    4.71 -	GObjectClass *gobject_class;
    4.72 -
    4.73 -	gobject_class = (GObjectClass *) klass;
    4.74 -
    4.75 -	gobject_class->dispose  = gmyth_upnp_dispose;
    4.76 -	gobject_class->finalize = gmyth_upnp_finalize;	
    4.77 -}
    4.78 -
    4.79 -static void
    4.80 -gmyth_upnp_init ( GMythUPnP *gmyth_upnp )
    4.81 -{
    4.82 -	gmyth_upnp->upnp_dev_found = FALSE;
    4.83 -	
    4.84 -	gmyth_upnp->uri = NULL;
    4.85 -	gmyth_upnp->host = NULL;
    4.86 -	gmyth_upnp->port = 0;
    4.87 -	gmyth_upnp->protocol = NULL;
    4.88 -	
    4.89 -	gmyth_upnp->gmyth_backend_info = NULL;
    4.90 -	
    4.91 -	gmyth_upnp->control_point = NULL;
    4.92 -	
    4.93 -}
    4.94 -
    4.95 -/** Creates a new instance of GMythUPnP.
    4.96 - * 
    4.97 - * @return a new instance of GMythUPnP. 
    4.98 - */
    4.99 -GMythUPnP *
   4.100 -gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info ) 
   4.101 -{
   4.102 -    GMythUPnP *gmyth_upnp = GMYTH_UPNP (g_object_new (GMYTH_UPNP_TYPE, NULL));
   4.103 -    
   4.104 -    gmyth_upnp->gmyth_backend_info = gmyth_backend_info;
   4.105 -    
   4.106 -    if ( !gmyth_upnp_initialize ( gmyth_upnp, gmyth_backend_info ) )
   4.107 -    	return NULL;
   4.108 -    
   4.109 -    return gmyth_upnp;
   4.110 -}
   4.111 -
   4.112 -static void
   4.113 -gmyth_upnp_dispose  (GObject *object)
   4.114 -{
   4.115 -	GMythUPnP *gmyth_upnp = GMYTH_UPNP(object);
   4.116 -
   4.117 -	if ( gmyth_upnp->control_point != NULL ) {
   4.118 -		cg_upnp_controlpoint_stop( gmyth_upnp->control_point );
   4.119 -		cg_upnp_controlpoint_delete( gmyth_upnp->control_point );
   4.120 -		gmyth_upnp->control_point = NULL;
   4.121 -	}
   4.122 -
   4.123 -	if ( gmyth_upnp->uri != NULL ) {
   4.124 -		g_free ( gmyth_upnp->uri );
   4.125 -		gmyth_upnp->uri = NULL;
   4.126 -	}
   4.127 -	
   4.128 -	if ( gmyth_upnp->host != NULL ) {
   4.129 -		g_free ( gmyth_upnp->host );
   4.130 -		gmyth_upnp->host = NULL;
   4.131 -	}
   4.132 -	
   4.133 -	if ( gmyth_upnp->protocol != NULL ) {
   4.134 -		g_free ( gmyth_upnp->protocol );
   4.135 -		gmyth_upnp->protocol = NULL;
   4.136 -	}
   4.137 -	
   4.138 -	if ( gmyth_upnp->mythtv_servers != NULL )	{
   4.139 -		g_list_free( gmyth_upnp->mythtv_servers );
   4.140 -		gmyth_upnp->mythtv_servers = NULL;
   4.141 -	}
   4.142 -	
   4.143 -	G_OBJECT_CLASS (gmyth_upnp_parent_class)->dispose (object);
   4.144 -}
   4.145 -
   4.146 -static void
   4.147 -gmyth_upnp_finalize (GObject *object)
   4.148 -{
   4.149 -	g_signal_handlers_destroy (object);
   4.150 -
   4.151 -	G_OBJECT_CLASS (gmyth_upnp_parent_class)->finalize (object);
   4.152 -}
   4.153 -
   4.154 -/**
   4.155 - * Create a control point and start it.
   4.156 - */
   4.157 -static gboolean
   4.158 -gmyth_upnp_initialize ( GMythUPnP *gmyth_upnp, GMythBackendInfo *gmyth_backend_info )
   4.159 -{
   4.160 -	
   4.161 -	gboolean ret = FALSE;
   4.162 -	
   4.163 -	GMythURI* uri = NULL;
   4.164 -	
   4.165 -	guint iter_count = GMYTH_UPNP_MAX_SEARCHS;
   4.166 -	
   4.167 -	g_return_val_if_fail( gmyth_backend_info != NULL, FALSE );
   4.168 -	
   4.169 -	/* Create the cybergarage control point */
   4.170 -	gmyth_upnp->control_point = cg_upnp_controlpoint_new();
   4.171 -	/* cg_upnp_controlpoint_setdevicelistener( gmyth_upnp->control_point, device_listener ); */
   4.172 -	
   4.173 -	/* Start the control point */
   4.174 -  if ( cg_upnp_controlpoint_start( gmyth_upnp->control_point ) == FALSE)
   4.175 -	{
   4.176 -	  gmyth_debug( "Unable to start UPnP control point!!!" );
   4.177 -	  goto done;
   4.178 -  }
   4.179 -	else
   4.180 -	{
   4.181 -    gmyth_debug( "Control point started." );
   4.182 -	}
   4.183 -	
   4.184 -	while ( gmyth_upnp->upnp_dev_found == FALSE && ( --iter_count > 0 ) ) {
   4.185 -		
   4.186 -		gmyth_debug( "UPnP MythTV Client control point is searching MythTV AV Device server...\n" );
   4.187 -       
   4.188 -		if ( gmyth_upnp->control_point != NULL )
   4.189 -			cg_upnp_controlpoint_search ( gmyth_upnp->control_point, 
   4.190 -		        		"urn:schemas-upnp-org:service:ContentDirectory:1" );
   4.191 -
   4.192 -		/* just to avoid clinkc pthread concurrency faults */
   4.193 -		cg_wait( 1000 );
   4.194 -		
   4.195 -		/* discover if it was found */
   4.196 -		gmyth_upnp->upnp_dev_found = gmyth_upnp_print_cp_device_list( gmyth_upnp->control_point, &gmyth_upnp->udn,
   4.197 -									&gmyth_upnp->mythtv_servers );
   4.198 -		
   4.199 -	}
   4.200 -	
   4.201 -	if ( gmyth_upnp->upnp_dev_found ) {
   4.202 -		
   4.203 -		gmyth_debug( "Found UPnP MythTV AV Device...\n" );
   4.204 -		
   4.205 -		if ( g_list_first( gmyth_upnp->mythtv_servers ) != NULL && (g_list_first( gmyth_upnp->mythtv_servers ))->data != NULL )
   4.206 -		{
   4.207 -			gmyth_upnp->uri = (gchar*) (g_list_first( gmyth_upnp->mythtv_servers ))->data;
   4.208 -			uri = gmyth_uri_new_with_value( gmyth_upnp->uri );
   4.209 -			
   4.210 -			gmyth_upnp->host = gmyth_uri_get_host( uri );
   4.211 -			gmyth_upnp->port = gmyth_uri_get_port( uri );
   4.212 -			gmyth_upnp->protocol = gmyth_uri_get_protocol( uri );
   4.213 -			
   4.214 -			/* sets all the discovered data from the UPnP remote device, like host name, IP address, port,... */
   4.215 -			if ( NULL != gmyth_upnp->host )
   4.216 -				gmyth_backend_info_set_hostname ( gmyth_upnp->gmyth_backend_info, gmyth_upnp->host );
   4.217 -			
   4.218 -			if ( gmyth_upnp->port > 0 )
   4.219 -				 gmyth_backend_info_set_port ( gmyth_upnp->gmyth_backend_info, gmyth_upnp->port );
   4.220 -				 
   4.221 -			ret = TRUE;
   4.222 -		}
   4.223 -	}	
   4.224 -
   4.225 -done:
   4.226 -
   4.227 -  if ( uri != NULL )
   4.228 -  {
   4.229 -  	g_object_unref( uri );
   4.230 -  	uri = NULL;
   4.231 -  }  	
   4.232 -
   4.233 -	return ret;
   4.234 -	
   4.235 -}
   4.236 -
   4.237 -/** 
   4.238 - * Prints the Control Point's device list
   4.239 - */
   4.240 -static gboolean
   4.241 -gmyth_upnp_print_cp_device_list( CgUpnpControlPoint* controlPt, gchar **udn, GList **mythtv_servers_lst )
   4.242 -{
   4.243 -	
   4.244 -	g_return_val_if_fail( mythtv_servers_lst != NULL, FALSE );	
   4.245 -	g_return_val_if_fail( controlPt != NULL, FALSE );
   4.246 -	
   4.247 -	gchar* mythtvFriendlyName = "Myth";
   4.248 -	/* begin assertion about the size of discovered devices */
   4.249 -	gint numDevices = cg_upnp_controlpoint_getndevices(controlPt);
   4.250 -	gint cntDevs = 0;	
   4.251 -	//CgUpnpDeviceList *devList = NULL;
   4.252 -	CgUpnpDevice *childDev;
   4.253 -	gchar *devName = NULL, *dev_url = NULL;
   4.254 -	gboolean upnp_dev_found = FALSE;
   4.255 -	
   4.256 -	gmyth_debug( "UPnP MythTV AV Device list size = %d\n", numDevices );
   4.257 -	
   4.258 -	for ( childDev = cg_upnp_controlpoint_getdevices(controlPt); childDev != NULL; 
   4.259 -			childDev = cg_upnp_device_next(childDev) ) {
   4.260 -		devName = cg_upnp_device_getfriendlyname(childDev);
   4.261 -		dev_url = cg_upnp_device_getlocationfromssdppacket( childDev );
   4.262 -		gmyth_debug( "Device's friendly name = %s, and  device's URL = %s\n", devName, dev_url );
   4.263 -		if ( ( upnp_dev_found = ( g_strstr_len( devName, strlen( devName ), mythtvFriendlyName ) != NULL ) ) == TRUE ) 
   4.264 -		{
   4.265 -			*udn = cg_upnp_device_getudn( childDev );
   4.266 -			*mythtv_servers_lst = g_list_append( *mythtv_servers_lst, dev_url ); 
   4.267 -		}
   4.268 -		++cntDevs;
   4.269 -	}
   4.270 -	
   4.271 -	if ( upnp_dev_found == TRUE ) {
   4.272 -		gmyth_debug( "MythTV AV Device found, from a total of %d devices.\n", cntDevs );
   4.273 -	} else if ( numDevices == cntDevs ) {
   4.274 -		gmyth_debug( "MythTV AV Device not found, from a total of %d devices.\n", cntDevs );
   4.275 -	} else {
   4.276 -		gmyth_debug( "Control Point's MythTV AV Device count is wrong: iterated over %d devices, but there are %d registered devices.\n", cntDevs, numDevices );
   4.277 -	}
   4.278 -	
   4.279 -	return upnp_dev_found;
   4.280 -
   4.281 -}
   4.282 -
   4.283 -/** Gets the GMythBackendInfo host object associated to this upnp.
   4.284 - * 
   4.285 - * @return The string host object currently valid or NULL if the settings
   4.286 - * were not opened.
   4.287 - */
   4.288 -gchar*
   4.289 -gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp )
   4.290 -{
   4.291 -	
   4.292 -	if ( NULL == gmyth_upnp || NULL == gmyth_upnp->host ) 
   4.293 -	{
   4.294 -		gmyth_debug ("[%s] GMythUPnP host field not initialized\n", __FUNCTION__);
   4.295 -		return NULL;
   4.296 -	}
   4.297 -
   4.298 -	return gmyth_upnp->host;
   4.299 -}
   4.300 -
   4.301 -/** Gets the GMythBackendInfo port object associated to this upnp.
   4.302 - * 
   4.303 - * @return The string object currently valid or NULL if the port number.
   4.304 - */
   4.305 -gint
   4.306 -gmyth_upnp_get_port( GMythUPnP *gmyth_upnp )
   4.307 -{
   4.308 -
   4.309 -	if ( NULL == gmyth_upnp || gmyth_upnp->port <= 0 ) 
   4.310 -	{
   4.311 -		gmyth_debug ("[%s] GMythUPnP host field not initialized\n", __FUNCTION__);
   4.312 -		return 0;
   4.313 -	}
   4.314 -
   4.315 -	return gmyth_upnp->port;
   4.316 -}
   4.317 -
   4.318 -/** Gets the UPnP AV devices server's list associated to this upnp.
   4.319 - * 
   4.320 - * @return The GList* containing all the URI values for each recognized UPnP device,
   4.321 - * 			or NULL if it couldn't recognize any MythTV AV device.
   4.322 - */
   4.323 -GList*
   4.324 -gmyth_upnp_get_servers ( GMythUPnP *gmyth_upnp )
   4.325 -{
   4.326 -	
   4.327 -	if ( NULL == gmyth_upnp || NULL == gmyth_upnp->mythtv_servers ) 
   4.328 -	{
   4.329 -		gmyth_debug ("[%s] GMythUPnP has no MythTV servers recognized.\n", __FUNCTION__);
   4.330 -		return NULL;
   4.331 -	}
   4.332 -
   4.333 -	return gmyth_upnp->mythtv_servers;
   4.334 -}
   4.335 -
   4.336 -/** Gets the GMythBackendInfo object associated to this upnp.
   4.337 - * 
   4.338 - * @return The GMythBackendInfo object currently valid or NULL if the settings
   4.339 - * were not opened.
   4.340 - */
   4.341 -GMythBackendInfo*
   4.342 -gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp )
   4.343 -{
   4.344 -	
   4.345 -	if ( NULL == gmyth_upnp || NULL == gmyth_upnp->gmyth_backend_info ) 
   4.346 -	{
   4.347 -		gmyth_debug ("[%s] GMythUPnP not initialized\n", __FUNCTION__);
   4.348 -		return NULL;
   4.349 -	}
   4.350 -
   4.351 -	return gmyth_upnp->gmyth_backend_info;
   4.352 -}
   4.353 -
     5.1 --- a/gmyth/src/gmyth_upnp.h	Tue Jan 09 22:43:23 2007 +0000
     5.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.3 @@ -1,96 +0,0 @@
     5.4 -/**
     5.5 - * GMyth Library
     5.6 - *
     5.7 - * @file gmyth/gmyth_upnp.h
     5.8 - * 
     5.9 - * @brief <p> GMythUPnP allows that a MythTV frontend discovers a 
    5.10 - * MythTV backend, using the UPnP architecture.
    5.11 - *
    5.12 - * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    5.13 - * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
    5.14 - *
    5.15 - *//*
    5.16 - * 
    5.17 - * This program is free software; you can redistribute it and/or modify
    5.18 - * it under the terms of the GNU Lesser General Public License as published by
    5.19 - * the Free Software Foundation; either version 2 of the License, or
    5.20 - * (at your option) any later version.
    5.21 - *
    5.22 - * This program is distributed in the hope that it will be useful,
    5.23 - * but WITHOUT ANY WARRANTY; without even the implied warranty of
    5.24 - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    5.25 - * GNU General Public License for more details.
    5.26 - *
    5.27 - * You should have received a copy of the GNU Lesser General Public License
    5.28 - * along with this program; if not, write to the Free Software
    5.29 - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    5.30 - *   
    5.31 - */
    5.32 -
    5.33 -#ifndef _GMYTH_UPNP_H_
    5.34 -#define _GMYTH_UPNP_H_
    5.35 -
    5.36 -#include <glib.h>
    5.37 -#include <glib-object.h>
    5.38 -
    5.39 -#include <stdlib.h>
    5.40 -#include <stdio.h>
    5.41 -#include <string.h>
    5.42 -
    5.43 -#include <cybergarage/upnp/cupnp.h>
    5.44 -#include "gmyth_backendinfo.h"
    5.45 -
    5.46 -G_BEGIN_DECLS
    5.47 -
    5.48 -#define GMYTH_UPNP_TYPE               (gmyth_upnp_get_type ())
    5.49 -#define GMYTH_UPNP(obj)          		 	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
    5.50 -#define GMYTH_UPNP_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
    5.51 -#define IS_GMYTH_UPNP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
    5.52 -#define IS_GMYTH_UPNP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
    5.53 -#define GMYTH_UPNP_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
    5.54 -
    5.55 -typedef struct _GMythUPnP         GMythUPnP;
    5.56 -typedef struct _GMythUPnPClass    GMythUPnPClass;
    5.57 -
    5.58 -/****************************************
    5.59 -* Data Type
    5.60 -****************************************/
    5.61 -
    5.62 -struct _GMythUPnPClass
    5.63 -{
    5.64 -  GObjectClass parent_class;
    5.65 -
    5.66 -  /* callbacks */
    5.67 -  /* no one for now */
    5.68 -};
    5.69 -
    5.70 -struct _GMythUPnP {
    5.71 -	
    5.72 -	GObject parent;
    5.73 -	
    5.74 -	gchar *uri;
    5.75 -	gchar *host;
    5.76 -	gint port;
    5.77 -	gchar *protocol;
    5.78 -	
    5.79 -	CgUpnpControlPoint* control_point;
    5.80 -	
    5.81 -	gchar *udn;
    5.82 -	
    5.83 -	GMythBackendInfo *gmyth_backend_info;
    5.84 -	
    5.85 -	GList* mythtv_servers;
    5.86 -	
    5.87 -	gboolean upnp_dev_found;
    5.88 -	
    5.89 -};
    5.90 -
    5.91 -GType       			gmyth_upnp_get_type (void);
    5.92 -GMythUPnP *				gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info );
    5.93 -gchar*						gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
    5.94 -gint							gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
    5.95 -GMythBackendInfo*	gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
    5.96 -
    5.97 -G_END_DECLS
    5.98 -
    5.99 -#endif /* _GMYTH_UPNP_H_ */