jbsrc/lib/src/extras/jb-dbus.h (2505B) - raw
1 /*
2 * JB, the Jean-Yves Lefort's Build System
3 * Copyright (C) 2008 Jean-Yves Lefort <jylefort@brutele.be>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 3 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License along
16 * with this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef _JB_DBUS_H
21 #define _JB_DBUS_H
22
23 #include "jb-resource.h"
24 #include "jb-feature.h"
25
26 extern JBFeature jb_dbus_feature;
27
28 #define JB_TYPE_DBUS_INTERFACE_CLIENT (jb_dbus_interface_client_get_type())
29 #define JB_DBUS_INTERFACE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JB_TYPE_DBUS_INTERFACE_CLIENT, JBDBusInterfaceClient))
30 #define JB_IS_DBUS_INTERFACE_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JB_TYPE_DBUS_INTERFACE_CLIENT))
31
32 typedef struct
33 {
34 JBGroupResource parent;
35
36 char *name;
37 char *client;
38 } JBDBusInterfaceClient;
39
40 typedef struct
41 {
42 JBGroupResourceClass parent;
43 } JBDBusInterfaceClientClass;
44
45 GType jb_dbus_interface_client_get_type (void);
46
47 JBDBusInterfaceClient *jb_dbus_interface_client_new (const char *name,
48 const char *client);
49
50 #define JB_TYPE_DBUS_INTERFACE_SERVER (jb_dbus_interface_server_get_type())
51 #define JB_DBUS_INTERFACE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), JB_TYPE_DBUS_INTERFACE_SERVER, JBDBusInterfaceServer))
52 #define JB_IS_DBUS_INTERFACE_SERVER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), JB_TYPE_DBUS_INTERFACE_SERVER))
53
54 typedef struct
55 {
56 JBGroupResource parent;
57
58 char *name;
59 char *server;
60 char *server_prefix;
61 } JBDBusInterfaceServer;
62
63 typedef struct
64 {
65 JBGroupResourceClass parent;
66 } JBDBusInterfaceServerClass;
67
68 GType jb_dbus_interface_server_get_type (void);
69
70 JBDBusInterfaceServer *jb_dbus_interface_server_new (const char *name,
71 const char *server,
72 const char *server_prefix);
73
74 void jb_group_add_dbus_interface (JBGroup *self,
75 const char *name,
76 const char *client,
77 const char *server,
78 const char *server_prefix);
79
80 #endif /* _JB_DBUS_H */