Convert droute introspection to use string literals created from
[platform/core/uifw/at-spi2-atk.git] / droute / droute.h
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2008 Novell, Inc.
6  * Copyright 2008 Codethink Ltd.
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., 59 Temple Place - Suite 330,
21  * Boston, MA 02111-1307, USA.
22  */
23 #ifndef _DROUTE_H
24 #define _DROUTE_H
25
26 #include <dbus/dbus.h>
27 #include <glib.h>
28
29 #include <droute/droute-variant.h>
30
31
32 typedef DBusMessage *(*DRouteFunction)         (DBusConnection *, DBusMessage *, void *);
33 typedef dbus_bool_t  (*DRoutePropertyFunction) (DBusMessageIter *, void *);
34
35 typedef void        *(*DRouteGetDatumFunction) (const char *, void *);
36
37 typedef struct _DRouteMethod DRouteMethod;
38 struct _DRouteMethod
39 {
40     DRouteFunction func;
41     const char *name;
42 };
43
44 typedef struct _DRouteProperty DRouteProperty;
45 struct _DRouteProperty
46 {
47     DRoutePropertyFunction get;
48     DRoutePropertyFunction set;
49     const char *name;
50 };
51
52 /*---------------------------------------------------------------------------*/
53
54 typedef struct _DRouteContext DRouteContext;
55
56 typedef struct _DRoutePath    DRoutePath;
57
58 /*---------------------------------------------------------------------------*/
59
60 DRouteContext *
61 droute_new      (DBusConnection *bus);
62
63 void
64 droute_free     (DRouteContext *cnx);
65
66 DRoutePath *
67 droute_add_one  (DRouteContext *cnx,
68                  const char    *path,
69                  const void    *data);
70
71 DRoutePath *
72 droute_add_many (DRouteContext *cnx,
73                  const char    *path,
74                  const void    *data,
75                  const DRouteGetDatumFunction get_datum);
76
77 void
78 droute_path_add_interface (DRoutePath *path,
79                            const char *name,
80                            const char *introspect,
81                            const DRouteMethod   *methods,
82                            const DRouteProperty *properties);
83
84 DBusMessage *
85 droute_not_yet_handled_error   (DBusMessage *message);
86
87 DBusMessage *
88 droute_invalid_arguments_error (DBusMessage *message);
89
90 DBusMessage *
91 droute_out_of_memory_error     (DBusMessage *message);
92
93 DBusConnection *
94 droute_get_bus (DRouteContext *cnx);
95
96 #endif /* _DROUTE_H */