Frameworks/libpurple.framework/Versions/2.10.12r8d2874a79747/Headers/dbus-maybe.h
branchadium-1.5.11
changeset 6014 fcb71cb71a3d
parent 5941 307f53385811
parent 6013 f8d0dc659e3f
child 6016 325e2ab3406f
equal deleted inserted replaced
5941:307f53385811 6014:fcb71cb71a3d
     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