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