view libpurple/dbus-maybe.h @ 31693:5f3df5c14c0e

applied changes from 10a19d0da323fdc8c2b315968e383219d8b9101f through fc575a35d01a235fedb83f75b6f8b2a60fe9d48b Original commit message: Change Finch to use Pidgin's clientkey/devid when connecting to ICQ. For whatever reason the Finch-specific clientkey/devid stopped working. Whatever. Fixes #14294
author Mark Doliner <mark@kingant.net>
date Mon, 20 Jun 2011 05:33:34 +0000
parents 1568dc7a14f8
children
line wrap: on
line source

/* This file contains macros that wrap calls to the purple dbus module.
   These macros call the appropriate functions if the build includes
   dbus support and do nothing otherwise.  See "dbus-server.h" for
   documentation.  */

#ifndef _PURPLE_DBUS_MAYBE_H_
#define _PURPLE_DBUS_MAYBE_H_

#ifdef HAVE_DBUS

#ifndef DBUS_API_SUBJECT_TO_CHANGE
#define DBUS_API_SUBJECT_TO_CHANGE
#endif

#include "dbus-server.h"

/* this provides a type check */
#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
    type *typed_ptr = ptr; \
    purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type));	\
}
#define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)

#else  /* !HAVE_DBUS */

#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
    if (ptr) {} \
}

#define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
#define DBUS_EXPORT

#endif	/* HAVE_DBUS */

#endif