1 /* This file contains macros that wrap calls to the purple dbus module.
2 These macros call the appropriate functions if the build includes
3 dbus support and do nothing otherwise. See "dbus-server.h" for
6 #ifndef _PURPLE_DBUS_MAYBE_H_
7 #define _PURPLE_DBUS_MAYBE_H_
11 #ifndef DBUS_API_SUBJECT_TO_CHANGE
12 #define DBUS_API_SUBJECT_TO_CHANGE
15 #include "dbus-server.h"
17 /* this provides a type check */
18 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
19 type *typed_ptr = ptr; \
20 purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type)); \
22 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
24 #else /* !HAVE_DBUS */
26 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
30 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
33 #endif /* HAVE_DBUS */