Add the droute and dbind libraries as static libraries within this repository.
[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                  const char *introspect_dir);
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 DRouteMethod   *methods,
81                            const DRouteProperty *properties);
82
83 DBusMessage *
84 droute_not_yet_handled_error   (DBusMessage *message);
85
86 DBusMessage *
87 droute_invalid_arguments_error (DBusMessage *message);
88
89 DBusMessage *
90 droute_out_of_memory_error     (DBusMessage *message);
91
92 DBusConnection *
93 droute_get_bus (DRouteContext *cnx);
94
95 #endif /* _DROUTE_H */