Remove X related lines
[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 typedef gchar *(*DRouteIntrospectChildrenFunction) (const char *, void *);
35
36 typedef void        *(*DRouteGetDatumFunction) (const char *, void *);
37
38 typedef struct _DRouteMethod DRouteMethod;
39 struct _DRouteMethod
40 {
41     DRouteFunction func;
42     const char *name;
43 };
44
45 typedef struct _DRouteProperty DRouteProperty;
46 struct _DRouteProperty
47 {
48     DRoutePropertyFunction get;
49     DRoutePropertyFunction set;
50     const char *name;
51 };
52
53 /*---------------------------------------------------------------------------*/
54
55 typedef struct _DRouteContext DRouteContext;
56
57 typedef struct _DRoutePath    DRoutePath;
58
59 /*---------------------------------------------------------------------------*/
60
61 DRouteContext *
62 droute_new      ();
63
64 void
65 droute_free     (DRouteContext *cnx);
66
67 DRoutePath *
68 droute_add_one  (DRouteContext *cnx,
69                  const char    *path,
70                  const void    *data);
71
72 DRoutePath *
73 droute_add_many (DRouteContext *cnx,
74                  const char    *path,
75                  const void    *data,
76                  DRouteIntrospectChildrenFunction introspect_children_cb,
77                  void *introspect_children_data,
78                  const DRouteGetDatumFunction get_datum);
79
80 void
81 droute_path_add_interface (DRoutePath *path,
82                            const char *name,
83                            const char *introspect,
84                            const DRouteMethod   *methods,
85                            const DRouteProperty *properties);
86
87 DBusMessage *
88 droute_not_yet_handled_error   (DBusMessage *message);
89
90 DBusMessage *
91 droute_invalid_arguments_error (DBusMessage *message);
92
93 DBusMessage *
94 droute_out_of_memory_error     (DBusMessage *message);
95
96 void
97 droute_path_register (DRoutePath *path, DBusConnection *bus);
98
99 void
100 droute_path_unregister (DRoutePath *path, DBusConnection *bus);
101
102 void
103 droute_context_register (DRouteContext *cnx, DBusConnection *bus);
104
105 void
106 droute_context_unregister (DRouteContext *cnx, DBusConnection *bus);
107
108 void
109 droute_intercept_dbus (DBusConnection *connection);
110
111 void
112 droute_unintercept_dbus (DBusConnection *connection);
113 #endif /* _DROUTE_H */