1 #ifndef _PURPLE_DBUS_MAYBE_H_
2 #define _PURPLE_DBUS_MAYBE_H_
5 * @section_id: libpurple-dbus-maybe
6 * @short_description: <filename>dbus-maybe.h</filename>
7 * @title: DBUS Wrappers
9 * This file contains macros that wrap calls to the purple dbus module.
10 * These macros call the appropriate functions if the build includes
11 * dbus support and do nothing otherwise. See "dbus-server.h" for
17 #ifndef DBUS_API_SUBJECT_TO_CHANGE
18 #define DBUS_API_SUBJECT_TO_CHANGE
21 #include "dbus-server.h"
23 /* this provides a type check */
24 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
25 type *typed_ptr = ptr; \
26 purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type)); \
28 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
30 #else /* !HAVE_DBUS */
32 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
36 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
38 #endif /* HAVE_DBUS */