Add gobject introspection
[profile/ivi/GUPnP.git] / libgupnp / gupnp-control-point.h
1 /*
2  * Copyright (C) 2006, 2007 OpenedHand Ltd.
3  *
4  * Author: Jorn Baayen <jorn@openedhand.com>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Library General Public
8  * License as published by the Free Software Foundation; either
9  * version 2 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * Library General Public License for more details.
15  *
16  * You should have received a copy of the GNU Library General Public
17  * License along with this library; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22 #ifndef __GUPNP_CONTROL_POINT_H__
23 #define __GUPNP_CONTROL_POINT_H__
24
25 #include <libgssdp/gssdp-resource-browser.h>
26
27 #include "gupnp-context.h"
28 #include "gupnp-resource-factory.h"
29 #include "gupnp-device-proxy.h"
30 #include "gupnp-service-proxy.h"
31
32 G_BEGIN_DECLS
33
34 GType
35 gupnp_control_point_get_type (void) G_GNUC_CONST;
36
37 #define GUPNP_TYPE_CONTROL_POINT \
38                 (gupnp_control_point_get_type ())
39 #define GUPNP_CONTROL_POINT(obj) \
40                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
41                  GUPNP_TYPE_CONTROL_POINT, \
42                  GUPnPControlPoint))
43 #define GUPNP_CONTROL_POINT_CLASS(obj) \
44                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
45                  GUPNP_TYPE_CONTROL_POINT, \
46                  GUPnPControlPointClass))
47 #define GUPNP_IS_CONTROL_POINT(obj) \
48                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
49                  GUPNP_TYPE_CONTROL_POINT))
50 #define GUPNP_IS_CONTROL_POINT_CLASS(obj) \
51                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
52                  GUPNP_TYPE_CONTROL_POINT))
53 #define GUPNP_CONTROL_POINT_GET_CLASS(obj) \
54                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
55                  GUPNP_TYPE_CONTROL_POINT, \
56                  GUPnPControlPointClass))
57
58 typedef struct _GUPnPControlPointPrivate GUPnPControlPointPrivate;
59 typedef struct _GUPnPControlPoint GUPnPControlPoint;
60 typedef struct _GUPnPControlPointClass GUPnPControlPointClass;
61
62 /**
63  * GUPnPControlPoint:
64  *
65  * This struct contains private data only, and should be accessed using the
66  * functions below.
67  */
68 struct _GUPnPControlPoint {
69         GSSDPResourceBrowser parent;
70
71         GUPnPControlPointPrivate *priv;
72 };
73
74 struct _GUPnPControlPointClass {
75         GSSDPResourceBrowserClass parent_class;
76
77         /* signals */
78         void (* device_proxy_available)    (GUPnPControlPoint *control_point,
79                                             GUPnPDeviceProxy  *proxy);
80
81         void (* device_proxy_unavailable)  (GUPnPControlPoint *control_point,
82                                             GUPnPDeviceProxy  *proxy);
83
84         void (* service_proxy_available)   (GUPnPControlPoint *control_point,
85                                             GUPnPServiceProxy *proxy);
86
87         void (* service_proxy_unavailable) (GUPnPControlPoint *control_point,
88                                             GUPnPServiceProxy *proxy);
89
90         /* future padding */
91         void (* _gupnp_reserved1) (void);
92         void (* _gupnp_reserved2) (void);
93         void (* _gupnp_reserved3) (void);
94 };
95
96 GUPnPControlPoint *
97 gupnp_control_point_new                  (GUPnPContext         *context,
98                                           const char           *target);
99
100 GUPnPControlPoint *
101 gupnp_control_point_new_full             (GUPnPContext         *context,
102                                           GUPnPResourceFactory *factory,
103                                           const char           *target);
104
105 GUPnPContext *
106 gupnp_control_point_get_context          (GUPnPControlPoint    *control_point);
107
108 const GList *
109 gupnp_control_point_list_device_proxies  (GUPnPControlPoint    *control_point);
110
111 const GList *
112 gupnp_control_point_list_service_proxies (GUPnPControlPoint    *control_point);
113
114 GUPnPResourceFactory *
115 gupnp_control_point_get_resource_factory (GUPnPControlPoint    *control_point);
116
117 G_END_DECLS
118
119 #endif /* __GUPNP_CONTROL_POINT_H__ */