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
Evan@653
     1
/* This file contains macros that wrap calls to the purple dbus module.
Evan@653
     2
   These macros call the appropriate functions if the build includes
Evan@653
     3
   dbus support and do nothing otherwise.  See "dbus-server.h" for
Evan@653
     4
   documentation.  */
Evan@653
     5
Evan@653
     6
#ifndef _PURPLE_DBUS_MAYBE_H_
Evan@653
     7
#define _PURPLE_DBUS_MAYBE_H_
Evan@653
     8
Evan@653
     9
#ifdef HAVE_DBUS
Evan@653
    10
Evan@653
    11
#ifndef DBUS_API_SUBJECT_TO_CHANGE
Evan@653
    12
#define DBUS_API_SUBJECT_TO_CHANGE
Evan@653
    13
#endif
Evan@653
    14
Evan@653
    15
#include "dbus-server.h"
Evan@653
    16
Evan@653
    17
/* this provides a type check */
Evan@653
    18
#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
Evan@653
    19
    type *typed_ptr = ptr; \
Evan@653
    20
    purple_dbus_register_pointer(typed_ptr, PURPLE_DBUS_TYPE(type));	\
Evan@653
    21
}
Evan@653
    22
#define PURPLE_DBUS_UNREGISTER_POINTER(ptr) purple_dbus_unregister_pointer(ptr)
Evan@653
    23
Evan@653
    24
#else  /* !HAVE_DBUS */
Evan@653
    25
Evan@653
    26
#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
Evan@653
    27
    if (ptr) {} \
Evan@653
    28
}
Evan@653
    29
Evan@653
    30
#define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
Evan@653
    31
#define DBUS_EXPORT
Evan@653
    32
Evan@653
    33
#endif	/* HAVE_DBUS */
Evan@653
    34
Evan@653
    35
#endif