Add gobject introspection
[profile/ivi/GUPnP.git] / libgupnp / gupnp-resource-factory.h
1 /*
2  * Copyright (C) 2007 Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
3  * Copyright (C) 2006, 2007 OpenedHand Ltd.
4  *
5  * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
6  *         Jorn Baayen <jorn@openedhand.com>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Library General Public
10  * License as published by the Free Software Foundation; either
11  * version 2 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Library General Public License for more details.
17  *
18  * You should have received a copy of the GNU Library General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23
24 #ifndef __GUPNP_RESOURCE_FACTORY_H__
25 #define __GUPNP_RESOURCE_FACTORY_H__
26
27 #include <glib-object.h>
28
29 G_BEGIN_DECLS
30
31 GType
32 gupnp_resource_factory_get_type (void) G_GNUC_CONST;
33
34 #define GUPNP_TYPE_RESOURCE_FACTORY \
35                 (gupnp_resource_factory_get_type ())
36 #define GUPNP_RESOURCE_FACTORY(obj) \
37                 (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
38                  GUPNP_TYPE_RESOURCE_FACTORY, \
39                  GUPnPResourceFactory))
40 #define GUPNP_RESOURCE_FACTORY_CLASS(obj) \
41                 (G_TYPE_CHECK_CLASS_CAST ((obj), \
42                  GUPNP_TYPE_RESOURCE_FACTORY, \
43                  GUPnPResourceFactoryClass))
44 #define GUPNP_IS_RESOURCE_FACTORY(obj) \
45                 (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
46                  GUPNP_TYPE_RESOURCE_FACTORY))
47 #define GUPNP_IS_RESOURCE_FACTORY_CLASS(obj) \
48                 (G_TYPE_CHECK_CLASS_TYPE ((obj), \
49                  GUPNP_TYPE_RESOURCE_FACTORY))
50 #define GUPNP_RESOURCE_FACTORY_GET_CLASS(obj) \
51                 (G_TYPE_INSTANCE_GET_CLASS ((obj), \
52                  GUPNP_TYPE_RESOURCE_FACTORY, \
53                  GUPnPResourceFactoryClass))
54
55 typedef struct _GUPnPResourceFactoryPrivate GUPnPResourceFactoryPrivate;
56 typedef struct _GUPnPResourceFactory GUPnPResourceFactory;
57 typedef struct _GUPnPResourceFactoryClass GUPnPResourceFactoryClass;
58
59 /**
60  * GUPnPResourceFactory:
61  *
62  * This struct contains private data only, and should be accessed using the
63  * functions below.
64  */
65 struct _GUPnPResourceFactory {
66         GObject parent;
67
68         GUPnPResourceFactoryPrivate *priv;
69 };
70
71 struct _GUPnPResourceFactoryClass {
72         GObjectClass parent_class;
73
74         /* future padding */
75         void (* _gupnp_reserved1) (void);
76         void (* _gupnp_reserved2) (void);
77         void (* _gupnp_reserved3) (void);
78         void (* _gupnp_reserved4) (void);
79 };
80
81 GUPnPResourceFactory *
82 gupnp_resource_factory_new         (void);
83
84 GUPnPResourceFactory *
85 gupnp_resource_factory_get_default (void);
86
87 void
88 gupnp_resource_factory_register_resource_type
89                                    (GUPnPResourceFactory *factory,
90                                     const char           *upnp_type,
91                                     GType                 type);
92
93 gboolean
94 gupnp_resource_factory_unregister_resource_type
95                                    (GUPnPResourceFactory *factory,
96                                     const char           *upnp_type);
97
98 void
99 gupnp_resource_factory_register_resource_proxy_type
100                                    (GUPnPResourceFactory *factory,
101                                     const char           *upnp_type,
102                                     GType                 type);
103
104 gboolean
105 gupnp_resource_factory_unregister_resource_proxy_type
106                                    (GUPnPResourceFactory *factory,
107                                     const char           *upnp_type);
108
109 G_END_DECLS
110
111 #endif /* __GUPNP_RESOURCE_FACTORY_H__ */