4 * Purple is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program 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
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef _PURPLE_DBUS_MAYBE_H_
24 #define _PURPLE_DBUS_MAYBE_H_
27 * @section_id: libpurple-dbus-maybe
28 * @short_description: <filename>dbus-maybe.h</filename>
29 * @title: DBUS Wrappers
31 * This file contains macros that wrap calls to the purple dbus module.
32 * These macros call the appropriate functions if the build includes
33 * dbus support and do nothing otherwise. See "dbus-server.h" for
39 #ifndef DBUS_API_SUBJECT_TO_CHANGE
40 #define DBUS_API_SUBJECT_TO_CHANGE
43 #include "dbus-server.h"
45 /* this provides a type check */
46 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
47 type *typed_ptr = ptr; \
48 purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type)); \
50 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
52 #else /* !HAVE_DBUS */
54 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
58 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
60 #endif /* HAVE_DBUS */