epoc32/include/stdapis/dbus-1.0/dbus/dbus-macros.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:27:01 +0100
branchSymbian2
changeset 3 e1b950c65cb4
permissions -rw-r--r--
Attempt to represent the S^2->S^3 header reorganisation as a series of "hg rename" operations
williamr@2
     1
/* -*- mode: C; c-file-style: "gnu" -*- */
williamr@2
     2
/* dbus-macros.h  generic macros
williamr@2
     3
 *
williamr@2
     4
 * Copyright (C) 2002  Red Hat Inc.
williamr@2
     5
 *
williamr@2
     6
 * Licensed under the Academic Free License version 2.1
williamr@2
     7
 * 
williamr@2
     8
 * This program is free software; you can redistribute it and/or modify
williamr@2
     9
 * it under the terms of the GNU General Public License as published by
williamr@2
    10
 * the Free Software Foundation; either version 2 of the License, or
williamr@2
    11
 * (at your option) any later version.
williamr@2
    12
 *
williamr@2
    13
 * This program is distributed in the hope that it will be useful,
williamr@2
    14
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
williamr@2
    15
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
williamr@2
    16
 * GNU General Public License for more details.
williamr@2
    17
 * 
williamr@2
    18
 * You should have received a copy of the GNU General Public License
williamr@2
    19
 * along with this program; if not, write to the Free Software
williamr@2
    20
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
williamr@2
    21
 *
williamr@2
    22
 */
williamr@2
    23
#if !defined (DBUS_INSIDE_DBUS_H) && !defined (DBUS_COMPILATION)
williamr@2
    24
#error "Only <dbus/dbus.h> can be included directly, this file may disappear or change contents."
williamr@2
    25
#endif
williamr@2
    26
williamr@2
    27
#ifndef DBUS_MACROS_H
williamr@2
    28
#define DBUS_MACROS_H
williamr@2
    29
williamr@2
    30
#ifdef  __cplusplus
williamr@2
    31
#  define DBUS_BEGIN_DECLS  extern "C" {
williamr@2
    32
#  define DBUS_END_DECLS    }
williamr@2
    33
#else
williamr@2
    34
#  define DBUS_BEGIN_DECLS
williamr@2
    35
#  define DBUS_END_DECLS
williamr@2
    36
#endif
williamr@2
    37
williamr@2
    38
#ifndef TRUE
williamr@2
    39
#  define TRUE 1
williamr@2
    40
#endif
williamr@2
    41
#ifndef FALSE
williamr@2
    42
#  define FALSE 0
williamr@2
    43
#endif
williamr@2
    44
williamr@2
    45
#ifndef NULL
williamr@2
    46
#  ifdef __cplusplus
williamr@2
    47
#    define NULL        (0L)
williamr@2
    48
#  else /* !__cplusplus */
williamr@2
    49
#    define NULL        ((void*) 0)
williamr@2
    50
#  endif /* !__cplusplus */
williamr@2
    51
#endif
williamr@2
    52
williamr@2
    53
#if  __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
williamr@2
    54
#define DBUS_GNUC_DEPRECATED __attribute__((__deprecated__))
williamr@2
    55
#else
williamr@2
    56
#define DBUS_GNUC_DEPRECATED
williamr@2
    57
#endif
williamr@2
    58
williamr@2
    59
/* Normally docs are in .c files, but there isn't a .c file for this. */
williamr@2
    60
/**
williamr@2
    61
 * @defgroup DBusMacros Utility macros
williamr@2
    62
 * @ingroup  DBus
williamr@2
    63
 * @brief #TRUE, #FALSE, #NULL, and so on
williamr@2
    64
 *
williamr@2
    65
 * Utility macros.
williamr@2
    66
 *
williamr@2
    67
 * @{
williamr@2
    68
 */
williamr@2
    69
williamr@2
    70
/**
williamr@2
    71
 * @def DBUS_BEGIN_DECLS
williamr@2
    72
 *
williamr@2
    73
 * Macro used prior to declaring functions in the D-Bus header
williamr@2
    74
 * files. Expands to "extern "C"" when using a C++ compiler,
williamr@2
    75
 * and expands to nothing when using a C compiler.
williamr@2
    76
 *
williamr@2
    77
 * Please don't use this in your own code, consider it
williamr@2
    78
 * D-Bus internal.
williamr@2
    79
 */
williamr@2
    80
/**
williamr@2
    81
 * @def DBUS_END_DECLS
williamr@2
    82
 *
williamr@2
    83
 * Macro used after declaring functions in the D-Bus header
williamr@2
    84
 * files. Expands to "}" when using a C++ compiler,
williamr@2
    85
 * and expands to nothing when using a C compiler.
williamr@2
    86
 *
williamr@2
    87
 * Please don't use this in your own code, consider it
williamr@2
    88
 * D-Bus internal.
williamr@2
    89
 */
williamr@2
    90
/**
williamr@2
    91
 * @def TRUE
williamr@2
    92
 *
williamr@2
    93
 * Expands to "1"
williamr@2
    94
 */
williamr@2
    95
/**
williamr@2
    96
 * @def FALSE
williamr@2
    97
 *
williamr@2
    98
 * Expands to "0"
williamr@2
    99
 */
williamr@2
   100
/**
williamr@2
   101
 * @def NULL
williamr@2
   102
 *
williamr@2
   103
 * A null pointer, defined appropriately for C or C++.
williamr@2
   104
 */
williamr@2
   105
/**
williamr@2
   106
 * @def DBUS_GNUC_DEPRECATED
williamr@2
   107
 *
williamr@2
   108
 * Tells gcc to warn about a function or type if it's used.
williamr@2
   109
 * Code marked in this way should also be enclosed in
williamr@2
   110
 * @code
williamr@2
   111
 * #ifndef DBUS_DISABLE_DEPRECATED
williamr@2
   112
 *  deprecated stuff here
williamr@2
   113
 * #endif
williamr@2
   114
 * @endcode
williamr@2
   115
 *
williamr@2
   116
 * Please don't use this in your own code, consider it
williamr@2
   117
 * D-Bus internal.
williamr@2
   118
 */
williamr@2
   119
williamr@2
   120
/** @} */
williamr@2
   121
williamr@2
   122
#endif /* DBUS_MACROS_H */