Frameworks/libpurple.framework/Versions/0.6.2/Headers/dbus-maybe.h
author Zachary West <zacw@adium.im>
Fri Aug 21 13:25:11 2009 -0700 (2009-08-21)
changeset 2592 e8d15275025e
parent 1739 Frameworks/libpurple.framework/Versions/0.6.0/Headers/dbus-maybe.h@8b0daad9656c
permissions -rw-r--r--
im.pidgin.adium.1-4 at 267c6165e02e34318a1823960bd04c0639952f73
     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
     4    documentation.  */
     5 
     6 #ifndef _PURPLE_DBUS_MAYBE_H_
     7 #define _PURPLE_DBUS_MAYBE_H_
     8 
     9 #ifdef HAVE_DBUS
    10 
    11 #ifndef DBUS_API_SUBJECT_TO_CHANGE
    12 #define DBUS_API_SUBJECT_TO_CHANGE
    13 #endif
    14 
    15 #include "dbus-server.h"
    16 
    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));	\
    21 }
    22 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
    23 
    24 #else  /* !HAVE_DBUS */
    25 
    26 #define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
    27     if (ptr) {} \
    28 }
    29 
    30 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
    31 #define DBUS_EXPORT
    32 
    33 #endif	/* HAVE_DBUS */
    34 
    35 #endif