2009-04-15 Mike Gorse <mgorse@novell.com>
[platform/core/uifw/at-spi2-atk.git] / spi-common / spi-dbus.h
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2001, 2002 Sun Microsystems Inc.,
6  * Copyright 2001, 2002 Ximian, Inc.
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
24 #ifndef SPI_DBUS_H_
25 #define SPI_DBUS_H_
26
27 #include <glib.h>
28 #include <spi-common/spi-types.h>
29
30 #define DBG(a,b) if(_dbg>=(a))b
31
32 extern int _dbg;
33
34 #define SPI_DBUS_PATH_DEC "/org/freedesktop/atspi/registry/deviceeventcontroller"
35 #define SPI_DBUS_INTERFACE_ACCESSIBLE "org.freedesktop.atspi.Accessible"
36 #define SPI_DBUS_INTERFACE_ACTION "org.freedesktop.atspi.Action"
37 #define SPI_DBUS_INTERFACE_APPLICATION "org.freedesktop.atspi.Application"
38 #define SPI_DBUS_INTERFACE_COLLECTION "org.freedesktop.atspi.Collection"
39 #define SPI_DBUS_INTERFACE_COMPONENT "org.freedesktop.atspi.Component"
40 #define SPI_DBUS_INTERFACE_DEC "org.freedesktop.atspi.DeviceEventController"
41 #define SPI_DBUS_INTERFACE_DEVICE_EVENT_LISTENER "org.freedesktop.atspi.DeviceEventListener"
42 #define SPI_DBUS_INTERFACE_DESKTOP "org.freedesktop.atspi.Desktop"
43 #define SPI_DBUS_INTERFACE_DOCUMENT "org.freedesktop.atspi.Document"
44 #define SPI_DBUS_INTERFACE_EDITABLE_TEXT "org.freedesktop.atspi.EditableText"
45 #define SPI_DBUS_INTERFACE_EVENT_KEYBOARD "org.freedesktop.atspi.Event.Keyboard"
46 #define SPI_DBUS_INTERFACE_EVENT_MOUSE "org.freedesktop.atspi.Event.Mouse"
47 #define SPI_DBUS_INTERFACE_HYPERLINK "org.freedesktop.atspi.Hyperlink"
48 #define SPI_DBUS_INTERFACE_HYPERTEXT "org.freedesktop.atspi.Hypertext"
49 #define SPI_DBUS_INTERFACE_IMAGE "org.freedesktop.atspi.Image"
50 #define SPI_DBUS_INTERFACE_REGISTRY "org.freedesktop.atspi.Registry"
51 #define SPI_DBUS_INTERFACE_SELECTION "org.freedesktop.atspi.Selection"
52 #define SPI_DBUS_INTERFACE_TABLE "org.freedesktop.atspi.Table"
53 #define SPI_DBUS_INTERFACE_TEXT "org.freedesktop.atspi.Text"
54 #define SPI_DBUS_INTERFACE_TREE "org.freedesktop.atspi.Tree"
55 #define SPI_DBUS_INTERFACE_VALUE "org.freedesktop.atspi.Value"
56 #define SPI_DBUS_NAME_REGISTRY "org.freedesktop.atspi.Registry"
57 #define SPI_DBUS_PATH_DESKTOP "/org/freedesktop/atspi/registry/desktop"
58 #define SPI_DBUS_PATH_NULL "/org/freedesktop/accessible/null"
59 #define SPI_DBUS_PATH_REGISTRY "/org/freedesktop/atspi/registry"
60
61 DBusMessage *spi_dbus_general_error(DBusMessage *message);
62 DBusMessage *spi_dbus_return_rect(DBusMessage *message, gint ix, gint iy, gint iwidth, gint iheight);
63
64 void spi_dbus_emit_valist(DBusConnection *bus, const char *path, const char *interface, const char *name, int first_arg_type, va_list args);
65 dbus_bool_t spi_dbus_message_iter_get_struct(DBusMessageIter *iter, ...);
66 dbus_bool_t spi_dbus_message_iter_append_struct(DBusMessageIter *iter, ...);
67 dbus_bool_t spi_dbus_marshall_deviceEvent(DBusMessage *message, const Accessibility_DeviceEvent *e);
68 dbus_bool_t spi_dbus_demarshall_deviceEvent(DBusMessage *message, Accessibility_DeviceEvent *e);
69 dbus_bool_t spi_dbus_get_simple_property (DBusConnection *bus, const char *dest, const char *path, const char *interface, const char *prop, int *type, void *ptr, DBusError *error);
70 void spi_dbus_emit_signal(DBusConnection *bus, const char *path, const char *klass, const char *major, const char *minor, dbus_int32_t detail1, dbus_int32_t detail2, const char *type, const void *val);
71 /*
72 void spi_dbus_add_disconnect_match (DBusConnection *bus, const char *name);
73 void spi_dbus_remove_disconnect_match (DBusConnection *bus, const char *name);
74 */
75
76 #endif /* SPI_DBUS_H_ */