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 |
*//*
|
melunko@250
|
13 |
*
|
melunko@250
|
14 |
* This program is free software; you can redistribute it and/or modify
|
melunko@250
|
15 |
* it under the terms of the GNU Lesser General Public License as published by
|
melunko@250
|
16 |
* the Free Software Foundation; either version 2 of the License, or
|
melunko@250
|
17 |
* (at your option) any later version.
|
melunko@250
|
18 |
*
|
melunko@250
|
19 |
* This program is distributed in the hope that it will be useful,
|
melunko@250
|
20 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
melunko@250
|
21 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
melunko@250
|
22 |
* GNU General Public License for more details.
|
melunko@250
|
23 |
*
|
melunko@250
|
24 |
* You should have received a copy of the GNU Lesser General Public License
|
melunko@250
|
25 |
* along with this program; if not, write to the Free Software
|
melunko@250
|
26 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
melunko@250
|
27 |
*
|
melunko@250
|
28 |
*/
|
melunko@250
|
29 |
|
melunko@250
|
30 |
#ifndef _GMYTH_UPNP_H_
|
melunko@250
|
31 |
#define _GMYTH_UPNP_H_
|
melunko@250
|
32 |
|
melunko@250
|
33 |
#include <glib.h>
|
melunko@250
|
34 |
#include <glib-object.h>
|
melunko@250
|
35 |
|
melunko@250
|
36 |
#include <stdlib.h>
|
melunko@250
|
37 |
#include <stdio.h>
|
melunko@250
|
38 |
#include <string.h>
|
melunko@250
|
39 |
|
melunko@250
|
40 |
#include <cybergarage/upnp/cupnp.h>
|
melunko@250
|
41 |
#include "gmyth_backendinfo.h"
|
melunko@250
|
42 |
|
melunko@250
|
43 |
G_BEGIN_DECLS
|
melunko@250
|
44 |
|
melunko@250
|
45 |
#define GMYTH_UPNP_TYPE (gmyth_upnp_get_type ())
|
melunko@250
|
46 |
#define GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
|
melunko@250
|
47 |
#define GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
|
melunko@250
|
48 |
#define IS_GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
|
melunko@250
|
49 |
#define IS_GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
|
melunko@250
|
50 |
#define GMYTH_UPNP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
|
melunko@250
|
51 |
|
melunko@250
|
52 |
typedef struct _GMythUPnP GMythUPnP;
|
melunko@250
|
53 |
typedef struct _GMythUPnPClass GMythUPnPClass;
|
melunko@250
|
54 |
|
melunko@250
|
55 |
/****************************************
|
melunko@250
|
56 |
* Data Type
|
melunko@250
|
57 |
****************************************/
|
melunko@250
|
58 |
|
melunko@250
|
59 |
struct _GMythUPnPClass
|
melunko@250
|
60 |
{
|
melunko@250
|
61 |
GObjectClass parent_class;
|
melunko@250
|
62 |
|
melunko@250
|
63 |
/* callbacks */
|
melunko@250
|
64 |
/* no one for now */
|
melunko@250
|
65 |
};
|
melunko@250
|
66 |
|
melunko@250
|
67 |
struct _GMythUPnP {
|
melunko@250
|
68 |
|
melunko@250
|
69 |
GObject parent;
|
melunko@250
|
70 |
|
melunko@250
|
71 |
gchar *uri;
|
melunko@250
|
72 |
gchar *host;
|
melunko@250
|
73 |
gint port;
|
melunko@250
|
74 |
gchar *protocol;
|
melunko@250
|
75 |
|
melunko@250
|
76 |
CgUpnpControlPoint* control_point;
|
melunko@250
|
77 |
|
melunko@250
|
78 |
gchar *udn;
|
melunko@250
|
79 |
|
melunko@250
|
80 |
GMythBackendInfo *gmyth_backend_info;
|
melunko@250
|
81 |
|
melunko@250
|
82 |
GList* mythtv_servers;
|
melunko@250
|
83 |
|
melunko@250
|
84 |
gboolean upnp_dev_found;
|
melunko@250
|
85 |
|
melunko@250
|
86 |
};
|
melunko@250
|
87 |
|
melunko@250
|
88 |
GType gmyth_upnp_get_type (void);
|
melunko@250
|
89 |
GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info );
|
melunko@250
|
90 |
gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
|
melunko@250
|
91 |
gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
|
melunko@250
|
92 |
GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
|
melunko@250
|
93 |
|
melunko@250
|
94 |
G_END_DECLS
|
melunko@250
|
95 |
|
melunko@250
|
96 |
#endif /* _GMYTH_UPNP_H_ */
|