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