gmyth-upnp/src/gmyth_upnp.h
author leo_sobral
Tue Mar 06 14:06:16 2007 +0000 (2007-03-06)
branchtrunk
changeset 390 0298ee6b7449
parent 250 ac3ca128dbca
child 696 7afeec40ed62
permissions -rw-r--r--
[svn r395] reverted invocation to strtoll and indented code, removing tabs
     1 /**
     2  * GMyth Library
     3  *
     4  * @file gmyth/gmyth_upnp.h
     5  * 
     6  * @brief <p> GMythUPnP allows that a MythTV frontend discovers a 
     7  * MythTV backend, using the UPnP architecture.
     8  *
     9  * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
    10  * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
    11  *
    12  *//*
    13  * 
    14  * This program is free software; you can redistribute it and/or modify
    15  * it under the terms of the GNU Lesser General Public License as published by
    16  * the Free Software Foundation; either version 2 of the License, or
    17  * (at your option) any later version.
    18  *
    19  * This program is distributed in the hope that it will be useful,
    20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    22  * GNU General Public License for more details.
    23  *
    24  * You should have received a copy of the GNU Lesser General Public License
    25  * along with this program; if not, write to the Free Software
    26  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    27  *   
    28  */
    29 
    30 #ifndef _GMYTH_UPNP_H_
    31 #define _GMYTH_UPNP_H_
    32 
    33 #include <glib.h>
    34 #include <glib-object.h>
    35 
    36 #include <stdlib.h>
    37 #include <stdio.h>
    38 #include <string.h>
    39 
    40 #include <cybergarage/upnp/cupnp.h>
    41 #include <gmyth/gmyth_backendinfo.h>
    42 
    43 G_BEGIN_DECLS
    44 
    45 #define GMYTH_UPNP_TYPE               (gmyth_upnp_get_type ())
    46 #define GMYTH_UPNP(obj)          		 	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
    47 #define GMYTH_UPNP_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
    48 #define IS_GMYTH_UPNP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
    49 #define IS_GMYTH_UPNP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
    50 #define GMYTH_UPNP_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
    51 
    52 typedef struct _GMythUPnP         GMythUPnP;
    53 typedef struct _GMythUPnPClass    GMythUPnPClass;
    54 
    55 /****************************************
    56 * Data Type
    57 ****************************************/
    58 
    59 struct _GMythUPnPClass
    60 {
    61   GObjectClass parent_class;
    62 
    63   /* callbacks */
    64   /* no one for now */
    65 };
    66 
    67 struct _GMythUPnP {
    68 	
    69 	GObject parent;
    70 	
    71 	gchar *uri;
    72 	gchar *host;
    73 	gint port;
    74 	gchar *protocol;
    75 	
    76 	CgUpnpControlPoint* control_point;
    77 	
    78 	gchar *udn;
    79 	
    80 	GMythBackendInfo *gmyth_backend_info;
    81 	
    82 	GList* mythtv_servers;
    83 	
    84 	gboolean upnp_dev_found;
    85 	
    86 };
    87 
    88 GType       			gmyth_upnp_get_type (void);
    89 GMythUPnP *				gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info );
    90 gchar*						gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
    91 gint							gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
    92 GMythBackendInfo*	gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
    93 
    94 G_END_DECLS
    95 
    96 #endif /* _GMYTH_UPNP_H_ */