2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2008 Novell, Inc.
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Library General Public
9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Library General Public License for more details.
17 * You should have received a copy of the GNU Library General Public
18 * License along with this library; if not, write to the
19 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20 * Boston, MA 02111-1307, USA.
25 #include <dbus/dbus.h>
26 #include "glib.h" /* needed for GString */
28 #define DROUTE_METHOD 0
29 #define DROUTE_SIGNAL 1
31 typedef DBusMessage *(*DRouteFunction)(DBusConnection *, DBusMessage *, void *);
32 typedef dbus_bool_t (*DRoutePropertyFunction)(const char *, DBusMessageIter *, void *);
34 typedef struct _DRouteMethod DRouteMethod;
39 dbus_bool_t wants_droute_data;
42 typedef struct _DRouteProperty DRouteProperty;
43 struct _DRouteProperty
45 DRoutePropertyFunction get;
46 DRoutePropertyFunction set;
50 typedef void *(*DRouteGetDatumFunction)(const char *, void *);
51 typedef void (*DRouteFreeDatumFunction)(void *);
53 typedef struct _DRouteInterface DRouteInterface;
54 struct _DRouteInterface
56 DRouteMethod *methods;
57 DRouteProperty *properties;
58 DRouteGetDatumFunction get_datum;
59 DRouteFreeDatumFunction free_datum;
63 typedef struct _DRouteData DRouteData;
68 char (*introspect_children)(const char *, GString *, void *);
72 DBusHandlerResult droute_message(DBusConnection *bus, DBusMessage *message, void *user_data);
74 dbus_bool_t droute_return_v_int32(DBusMessageIter *iter, dbus_int32_t val);
75 dbus_bool_t droute_return_v_double(DBusMessageIter *iter, double val);
76 dbus_bool_t droute_return_v_string(DBusMessageIter *iter, const char *val);
77 dbus_int32_t droute_get_v_int32(DBusMessageIter *iter);
78 const char *droute_get_v_string(DBusMessageIter *iter);
79 dbus_bool_t droute_return_v_object(DBusMessageIter *iter, const char *path);
81 dbus_bool_t droute_add_interface(DRouteData *data, const char *name, DRouteMethod *methods, DRouteProperty *properties, DRouteGetDatumFunction get_datum, DRouteFreeDatumFunction free_datum);
82 #endif /* _DROUTE_H */