sl@0: /* -*- mode: C; c-file-style: "gnu" -*- */ sl@0: /* dbus-macros.h generic macros sl@0: * sl@0: * Copyright (C) 2002 Red Hat Inc. sl@0: * sl@0: * Licensed under the Academic Free License version 2.1 sl@0: * sl@0: * This program is free software; you can redistribute it and/or modify sl@0: * it under the terms of the GNU General Public License as published by sl@0: * the Free Software Foundation; either version 2 of the License, or sl@0: * (at your option) any later version. sl@0: * sl@0: * This program is distributed in the hope that it will be useful, sl@0: * but WITHOUT ANY WARRANTY; without even the implied warranty of sl@0: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the sl@0: * GNU General Public License for more details. sl@0: * sl@0: * You should have received a copy of the GNU General Public License sl@0: * along with this program; if not, write to the Free Software sl@0: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA sl@0: * sl@0: */ sl@0: #if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION) sl@0: #error "Only can be included directly, this file may disappear or change contents." sl@0: #endif sl@0: sl@0: #ifndef DBUS_MACROS_H sl@0: #define DBUS_MACROS_H sl@0: sl@0: #ifdef __cplusplus sl@0: # define DBUS_BEGIN_DECLS extern "C" { sl@0: # define DBUS_END_DECLS } sl@0: #else sl@0: # define DBUS_BEGIN_DECLS sl@0: # define DBUS_END_DECLS sl@0: #endif sl@0: sl@0: #ifndef TRUE sl@0: # define TRUE 1 sl@0: #endif sl@0: #ifndef FALSE sl@0: # define FALSE 0 sl@0: #endif sl@0: sl@0: #ifndef NULL sl@0: # ifdef __cplusplus sl@0: # define NULL (0L) sl@0: # else /* !__cplusplus */ sl@0: # define NULL ((void*) 0) sl@0: # endif /* !__cplusplus */ sl@0: #endif sl@0: sl@0: #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1) sl@0: #define DBUS_GNUC_DEPRECATED __attribute__((__deprecated__)) sl@0: #else sl@0: #define DBUS_GNUC_DEPRECATED sl@0: #endif sl@0: sl@0: /* Normally docs are in .c files, but there isn't a .c file for this. */ sl@0: /** sl@0: * @defgroup DBusMacros Utility macros sl@0: * @ingroup DBus sl@0: * @brief #TRUE, #FALSE, #NULL, and so on sl@0: * sl@0: * Utility macros. sl@0: * sl@0: * @{ sl@0: */ sl@0: sl@0: /** sl@0: * @def DBUS_BEGIN_DECLS sl@0: * sl@0: * Macro used prior to declaring functions in the D-Bus header sl@0: * files. Expands to "extern "C"" when using a C++ compiler, sl@0: * and expands to nothing when using a C compiler. sl@0: * sl@0: * Please don't use this in your own code, consider it sl@0: * D-Bus internal. sl@0: */ sl@0: /** sl@0: * @def DBUS_END_DECLS sl@0: * sl@0: * Macro used after declaring functions in the D-Bus header sl@0: * files. Expands to "}" when using a C++ compiler, sl@0: * and expands to nothing when using a C compiler. sl@0: * sl@0: * Please don't use this in your own code, consider it sl@0: * D-Bus internal. sl@0: */ sl@0: /** sl@0: * @def TRUE sl@0: * sl@0: * Expands to "1" sl@0: */ sl@0: /** sl@0: * @def FALSE sl@0: * sl@0: * Expands to "0" sl@0: */ sl@0: /** sl@0: * @def NULL sl@0: * sl@0: * A null pointer, defined appropriately for C or C++. sl@0: */ sl@0: /** sl@0: * @def DBUS_GNUC_DEPRECATED sl@0: * sl@0: * Tells gcc to warn about a function or type if it's used. sl@0: * Code marked in this way should also be enclosed in sl@0: * @code sl@0: * #ifndef DBUS_DISABLE_DEPRECATED sl@0: * deprecated stuff here sl@0: * #endif sl@0: * @endcode sl@0: * sl@0: * Please don't use this in your own code, consider it sl@0: * D-Bus internal. sl@0: */ sl@0: sl@0: /** @} */ sl@0: sl@0: #endif /* DBUS_MACROS_H */