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