Migrate certificates, icons, logs to XDG dirs
[pidgin-git.git] / libpurple / dbus-maybe.h
blob7156358c629546130f59f254f904498022864cbf
1 #ifndef _PURPLE_DBUS_MAYBE_H_
2 #define _PURPLE_DBUS_MAYBE_H_
3 /**
4 * SECTION:dbus-maybe
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
12 * documentation.
15 #ifdef HAVE_DBUS
17 #ifndef DBUS_API_SUBJECT_TO_CHANGE
18 #define DBUS_API_SUBJECT_TO_CHANGE
19 #endif
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) { \
33 if (ptr) {} \
36 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
38 #endif /* HAVE_DBUS */
40 #endif