diff options
author | Mark Doffman <mdoff@silver-wind.(none)> | 2008-05-16 16:11:40 +0100 |
---|---|---|
committer | Mark Doffman <mdoff@silver-wind.(none)> | 2008-05-16 16:16:19 +0100 |
commit | ff143bfb6c3ca9e1a7362bd7f9c7c5eba31eb135 (patch) | |
tree | 3661a3149da6031c5a0e74463fdd428738e2bf1b /droute/droute.h | |
parent | 5d01be6ec7d2cb2e662c695bd4c28c50ac3f2dab (diff) | |
download | at-spi2-atk-ff143bfb6c3ca9e1a7362bd7f9c7c5eba31eb135.tar.gz |
2008-05-16 Mark Doffman <mark.doffman@codethink.co.uk>
Re-organize the directories. The main purpose of
this change is to remove CORBA code and references
that are no longer used.
* atk-adaptor/
Code here used to live in libspi and atk-bridge.
* droute/
The droute module has been moved from libspi to
its own directory.
* spi-common
Code and definitions common to registryd and
the atk-adaptor. Mostly moved from libspi/dbus.c
and accessible.h.
* cspi/
Removed for the moment. Will have to be
mostly rewritten for D-Bus.
Diffstat (limited to 'droute/droute.h')
-rw-r--r-- | droute/droute.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/droute/droute.h b/droute/droute.h new file mode 100644 index 0000000..c3006cc --- /dev/null +++ b/droute/droute.h @@ -0,0 +1,82 @@ +/* + * AT-SPI - Assistive Technology Service Provider Interface + * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap) + * + * Copyright 2008 Novell, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + */ +#ifndef _DROUTE_H +#define _DROUTE_H + +#include <dbus/dbus.h> +#include "glib.h" /* needed for GString */ + +#define DROUTE_METHOD 0 +#define DROUTE_SIGNAL 1 + +typedef DBusMessage *(*DRouteFunction)(DBusConnection *, DBusMessage *, void *); +typedef dbus_bool_t (*DRoutePropertyFunction)(const char *, DBusMessageIter *, void *); + +typedef struct _DRouteMethod DRouteMethod; +struct _DRouteMethod +{ + DRouteFunction func; + const char *name; + dbus_bool_t wants_droute_data; +}; + +typedef struct _DRouteProperty DRouteProperty; +struct _DRouteProperty +{ + DRoutePropertyFunction get; + DRoutePropertyFunction set; + const char *name; +}; + + typedef void *(*DRouteGetDatumFunction)(const char *, void *); + typedef void (*DRouteFreeDatumFunction)(void *); + +typedef struct _DRouteInterface DRouteInterface; +struct _DRouteInterface +{ + DRouteMethod *methods; + DRouteProperty *properties; + DRouteGetDatumFunction get_datum; + DRouteFreeDatumFunction free_datum; + char *name; +}; + +typedef struct _DRouteData DRouteData; +struct _DRouteData +{ + DBusConnection *bus; + GSList *interfaces; + char (*introspect_children)(const char *, GString *, void *); + void *user_data; +}; + +DBusHandlerResult droute_message(DBusConnection *bus, DBusMessage *message, void *user_data); + +dbus_bool_t droute_return_v_int32(DBusMessageIter *iter, dbus_int32_t val); +dbus_bool_t droute_return_v_double(DBusMessageIter *iter, double val); +dbus_bool_t droute_return_v_string(DBusMessageIter *iter, const char *val); +dbus_int32_t droute_get_v_int32(DBusMessageIter *iter); +const char *droute_get_v_string(DBusMessageIter *iter); +dbus_bool_t droute_return_v_object(DBusMessageIter *iter, const char *path); + +dbus_bool_t droute_add_interface(DRouteData *data, const char *name, DRouteMethod *methods, DRouteProperty *properties, DRouteGetDatumFunction get_datum, DRouteFreeDatumFunction free_datum); +#endif /* _DROUTE_H */ |