view src/dbus-maybe.h @ 12195:d040123d2b69

[gaim-migrate @ 14497] A saved status dropdown. I don't know if it works, because the only way for me to test it right now is through remote X, over 3000 miles away. And I ain't puttin up with that for long. I'm going to check it out when I get home and fix it up locally. committer: Tailor Script <tailor@pidgin.im>
author Sean Egan <seanegan@gmail.com>
date Wed, 23 Nov 2005 02:04:59 +0000
parents ebb02ea3c789
children
line wrap: on
line source

/* This file contains macros that wrap calls to the gaim 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 _GAIM_DBUS_MAYBE_H_
#define _GAIM_DBUS_MAYBE_H_

#ifdef HAVE_DBUS

#include "dbus-server.h"

/* this provides a type check */
#define GAIM_DBUS_REGISTER_POINTER(ptr, type) { \
    type *typed_ptr = ptr; \
    gaim_dbus_register_pointer(typed_ptr, GAIM_DBUS_TYPE(type));	\
}
#define GAIM_DBUS_UNREGISTER_POINTER(ptr) gaim_dbus_unregister_pointer(ptr)

#else  /* !HAVE_DBUS */

#define GAIM_DBUS_REGISTER_POINTER(ptr, type) 
#define GAIM_DBUS_UNREGISTER_POINTER(ptr)
#define DBUS_EXPORT

#endif	/* HAVE_DBUS */

#endif