gmyth-upnp/src/gmyth_upnp.h
author renatofilho
Fri Feb 15 13:52:23 2008 +0000 (2008-02-15)
branchtrunk
changeset 915 e612ba1d16ab
parent 909 847da7267234
child 922 04cd5e61dca3
permissions -rw-r--r--
[svn r924] created method gmyth_upnp_get_devices
     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  * This program is free software; you can redistribute it and/or modify
    13  * it under the terms of the GNU Lesser General Public License as published by
    14  * the Free Software Foundation; either version 2 of the License, or
    15  * (at your option) any later version.
    16  *
    17  * This program is distributed in the hope that it will be useful,
    18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    20  * GNU General Public License for more details.
    21  *
    22  * You should have received a copy of the GNU Lesser General Public License
    23  * along with this program; if not, write to the Free Software
    24  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
    25  *   
    26  */
    27 
    28 #ifndef _GMYTH_UPNP_H_
    29 #define _GMYTH_UPNP_H_
    30 
    31 #include <glib.h>
    32 #include <glib-object.h>
    33 
    34 #include <stdlib.h>
    35 #include <stdio.h>
    36 #include <string.h>
    37 
    38 #include <gmyth/gmyth_backendinfo.h>
    39 
    40 G_BEGIN_DECLS
    41 #define GMYTH_UPNP_TYPE               (gmyth_upnp_get_type ())
    42 #define GMYTH_UPNP(obj)          		 	(G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
    43 #define GMYTH_UPNP_CLASS(klass)       (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
    44 #define IS_GMYTH_UPNP(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
    45 #define IS_GMYTH_UPNP_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
    46 #define GMYTH_UPNP_GET_CLASS(obj)     (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
    47 typedef struct _GMythUPnP GMythUPnP;
    48 typedef struct _GMythUPnPClass GMythUPnPClass;
    49 typedef struct _GMythUPnPDevice GMythUPnPDevice;
    50 
    51 /****************************************
    52 * Data Type
    53 ****************************************/
    54 
    55 typedef enum upnp_device_list_status {
    56     GMYTH_UPNP_DEVICE_ADDED = 0,
    57     GMYTH_UPNP_DEVICE_UPDATED,
    58     GMYTH_UPNP_DEVICE_REMOVED
    59 } GMythUPnPDeviceStatus;
    60 
    61 struct _GMythUPnPDevice {
    62     gchar  *uri;
    63     gchar  *host;
    64     gint   port;
    65     gchar  *protocol;
    66 };
    67 
    68 
    69 struct _GMythUPnPClass {
    70     GObjectClass    parent_class;
    71 };
    72 
    73 struct _GMythUPnP {
    74     GObject         parent;
    75 };
    76 
    77 GType               gmyth_upnp_get_type         (void);
    78 GMythUPnP*          gmyth_upnp_get_instance     (void);
    79 void                gmyth_upnp_search           (GMythUPnP * gmyth_upnp);
    80 GList*              gmyth_upnp_get_devices      (GMythUPnP * gmyth_upnp);
    81 
    82 G_END_DECLS
    83 #endif                          /* _GMYTH_UPNP_H_ */