[svn r702] Changed the architecture to support GObject signals in the clinkc's UPnP model.
4 * @file gmyth/gmyth_upnp.h
6 * @brief <p> GMythUPnP allows that a MythTV frontend discovers a
7 * MythTV backend, using the UPnP architecture.
9 * Copyright (C) 2006 INdT - Instituto Nokia de Tecnologia.
10 * @author Rosfran Lins Borges <rosfran.borges@indt.org.br>
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU Lesser General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
30 #ifndef _GMYTH_UPNP_H_
31 #define _GMYTH_UPNP_H_
34 #include <glib-object.h>
40 #include <cybergarage/upnp/cupnp.h>
41 #include <gmyth/gmyth_backendinfo.h>
45 #define GMYTH_UPNP_TYPE (gmyth_upnp_get_type ())
46 #define GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE, GMythUPnP))
47 #define GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE, GMythUPnPClass))
48 #define IS_GMYTH_UPNP(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GMYTH_UPNP_TYPE))
49 #define IS_GMYTH_UPNP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GMYTH_UPNP_TYPE))
50 #define GMYTH_UPNP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GMYTH_UPNP_TYPE, GMythUPnPClass))
52 typedef struct _GMythUPnP GMythUPnP;
53 typedef struct _GMythUPnPClass GMythUPnPClass;
54 typedef struct _GMythUPnPPrivate GMythUPnPPrivate;
56 /****************************************
58 ****************************************/
60 typedef enum upnp_device_list_status {
61 GMYTH_UPNP_DEVICE_ADDED = 0,
62 GMYTH_UPNP_DEVICE_REMOVED,
63 GMYTH_UPNP_DEVICE_UPDATED
64 } GMythUPnPDeviceStatus;
66 typedef void (*GMythUPnPDeviceListener) ( GMythUPnPDeviceStatus status, gchar *dev );
68 struct _GMythUPnPClass
70 GObjectClass parent_class;
73 guint device_found_handler_signal_id;
75 GMythUPnPDeviceListener device_found_handler;
80 struct _GMythUPnPDevice {
87 typedef struct _GMythUPnPDevice GMythUPnPDevice;
92 GMythUPnPPrivate *priv;
95 CgUpnpControlPoint* control_point;
99 GMythBackendInfo *backend_info;
101 gboolean upnp_dev_found;
104 GType gmyth_upnp_get_type (void);
105 GMythUPnP * gmyth_upnp_new ( GMythBackendInfo *gmyth_backend_info,
106 GMythUPnPDeviceListener handler );
107 gchar* gmyth_upnp_get_host ( GMythUPnP *gmyth_upnp );
108 gint gmyth_upnp_get_port ( GMythUPnP *gmyth_upnp );
109 GMythBackendInfo* gmyth_upnp_get_backend_info ( GMythUPnP *gmyth_upnp );
113 #endif /* _GMYTH_UPNP_H_ */