os/ossrv/ossrv_pub/dbus/inc/dbus-protocol.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
sl@0
     1
/* -*- mode: C; c-file-style: "gnu" -*- */
sl@0
     2
/* dbus-protocol.h  D-Bus protocol constants
sl@0
     3
 *
sl@0
     4
 * Copyright (C) 2002, 2003  CodeFactory AB
sl@0
     5
 * Copyright (C) 2004, 2005 Red Hat, Inc.
sl@0
     6
 *
sl@0
     7
 * Licensed under the Academic Free License version 2.1
sl@0
     8
 *
sl@0
     9
 * This program is free software; you can redistribute it and/or modify
sl@0
    10
 * it under the terms of the GNU General Public License as published by
sl@0
    11
 * the Free Software Foundation; either version 2 of the License, or
sl@0
    12
 * (at your option) any later version.
sl@0
    13
 *
sl@0
    14
 * This program is distributed in the hope that it will be useful,
sl@0
    15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
sl@0
    16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
sl@0
    17
 * GNU General Public License for more details.
sl@0
    18
 *
sl@0
    19
 * You should have received a copy of the GNU General Public License
sl@0
    20
 * along with this program; if not, write to the Free Software
sl@0
    21
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
sl@0
    22
 *
sl@0
    23
 */
sl@0
    24
sl@0
    25
#ifndef DBUS_PROTOCOL_H
sl@0
    26
#define DBUS_PROTOCOL_H
sl@0
    27
sl@0
    28
/* Don't include anything in here from anywhere else. It's
sl@0
    29
 * intended for use by any random library.
sl@0
    30
 */
sl@0
    31
sl@0
    32
#ifdef  __cplusplus
sl@0
    33
extern "C" {
sl@0
    34
#if 0
sl@0
    35
} /* avoids confusing emacs indentation */
sl@0
    36
#endif
sl@0
    37
#endif
sl@0
    38
sl@0
    39
/* Normally docs are in .c files, but there isn't a .c file for this. */
sl@0
    40
/**
sl@0
    41
 * @defgroup DBusProtocol Protocol constants
sl@0
    42
 * @ingroup  DBus
sl@0
    43
 *
sl@0
    44
 * @brief Defines constants which are part of the D-Bus protocol
sl@0
    45
 *
sl@0
    46
 * This header is intended for use by any library, not only libdbus.
sl@0
    47
 *
sl@0
    48
 * @{
sl@0
    49
 */
sl@0
    50
sl@0
    51
sl@0
    52
/* Message byte order */
sl@0
    53
#define DBUS_LITTLE_ENDIAN ('l')  /**< Code marking LSB-first byte order in the wire protocol. */
sl@0
    54
#define DBUS_BIG_ENDIAN    ('B')  /**< Code marking MSB-first byte order in the wire protocol. */
sl@0
    55
sl@0
    56
/** Protocol version. */
sl@0
    57
#define DBUS_MAJOR_PROTOCOL_VERSION 1
sl@0
    58
sl@0
    59
/** Type code that is never equal to a legitimate type code */
sl@0
    60
#define DBUS_TYPE_INVALID       ((int) '\0')
sl@0
    61
/** #DBUS_TYPE_INVALID as a string literal instead of a int literal */
sl@0
    62
#define DBUS_TYPE_INVALID_AS_STRING        "\0"
sl@0
    63
sl@0
    64
/* Primitive types */
sl@0
    65
/** Type code marking an 8-bit unsigned integer */
sl@0
    66
#define DBUS_TYPE_BYTE          ((int) 'y')
sl@0
    67
/** #DBUS_TYPE_BYTE as a string literal instead of a int literal */
sl@0
    68
#define DBUS_TYPE_BYTE_AS_STRING           "y"
sl@0
    69
/** Type code marking a boolean */
sl@0
    70
#define DBUS_TYPE_BOOLEAN       ((int) 'b')
sl@0
    71
/** #DBUS_TYPE_BOOLEAN as a string literal instead of a int literal */
sl@0
    72
#define DBUS_TYPE_BOOLEAN_AS_STRING        "b"
sl@0
    73
/** Type code marking a 16-bit signed integer */
sl@0
    74
#define DBUS_TYPE_INT16         ((int) 'n')
sl@0
    75
/** #DBUS_TYPE_INT16 as a string literal instead of a int literal */
sl@0
    76
#define DBUS_TYPE_INT16_AS_STRING          "n"
sl@0
    77
/** Type code marking a 16-bit unsigned integer */
sl@0
    78
#define DBUS_TYPE_UINT16        ((int) 'q')
sl@0
    79
/** #DBUS_TYPE_UINT16 as a string literal instead of a int literal */
sl@0
    80
#define DBUS_TYPE_UINT16_AS_STRING         "q"
sl@0
    81
/** Type code marking a 32-bit signed integer */
sl@0
    82
#define DBUS_TYPE_INT32         ((int) 'i')
sl@0
    83
/** #DBUS_TYPE_INT32 as a string literal instead of a int literal */
sl@0
    84
#define DBUS_TYPE_INT32_AS_STRING          "i"
sl@0
    85
/** Type code marking a 32-bit unsigned integer */
sl@0
    86
#define DBUS_TYPE_UINT32        ((int) 'u')
sl@0
    87
/** #DBUS_TYPE_UINT32 as a string literal instead of a int literal */
sl@0
    88
#define DBUS_TYPE_UINT32_AS_STRING         "u"
sl@0
    89
/** Type code marking a 64-bit signed integer */
sl@0
    90
#define DBUS_TYPE_INT64         ((int) 'x')
sl@0
    91
/** #DBUS_TYPE_INT64 as a string literal instead of a int literal */
sl@0
    92
#define DBUS_TYPE_INT64_AS_STRING          "x"
sl@0
    93
/** Type code marking a 64-bit unsigned integer */
sl@0
    94
#define DBUS_TYPE_UINT64        ((int) 't')
sl@0
    95
/** #DBUS_TYPE_UINT64 as a string literal instead of a int literal */
sl@0
    96
#define DBUS_TYPE_UINT64_AS_STRING         "t"
sl@0
    97
/** Type code marking an 8-byte double in IEEE 754 format */
sl@0
    98
#define DBUS_TYPE_DOUBLE        ((int) 'd')
sl@0
    99
/** #DBUS_TYPE_DOUBLE as a string literal instead of a int literal */
sl@0
   100
#define DBUS_TYPE_DOUBLE_AS_STRING         "d"
sl@0
   101
/** Type code marking a UTF-8 encoded, nul-terminated Unicode string */
sl@0
   102
#define DBUS_TYPE_STRING        ((int) 's')
sl@0
   103
/** #DBUS_TYPE_STRING as a string literal instead of a int literal */
sl@0
   104
#define DBUS_TYPE_STRING_AS_STRING         "s"
sl@0
   105
/** Type code marking a D-Bus object path */
sl@0
   106
#define DBUS_TYPE_OBJECT_PATH   ((int) 'o')
sl@0
   107
/** #DBUS_TYPE_OBJECT_PATH as a string literal instead of a int literal */
sl@0
   108
#define DBUS_TYPE_OBJECT_PATH_AS_STRING    "o"
sl@0
   109
/** Type code marking a D-Bus type signature */
sl@0
   110
#define DBUS_TYPE_SIGNATURE     ((int) 'g')
sl@0
   111
/** #DBUS_TYPE_SIGNATURE as a string literal instead of a int literal */
sl@0
   112
#define DBUS_TYPE_SIGNATURE_AS_STRING      "g"
sl@0
   113
sl@0
   114
/* Compound types */
sl@0
   115
/** Type code marking a D-Bus array type */
sl@0
   116
#define DBUS_TYPE_ARRAY         ((int) 'a')
sl@0
   117
/** #DBUS_TYPE_ARRAY as a string literal instead of a int literal */
sl@0
   118
#define DBUS_TYPE_ARRAY_AS_STRING          "a"
sl@0
   119
/** Type code marking a D-Bus variant type */
sl@0
   120
#define DBUS_TYPE_VARIANT       ((int) 'v')
sl@0
   121
/** #DBUS_TYPE_VARIANT as a string literal instead of a int literal */
sl@0
   122
#define DBUS_TYPE_VARIANT_AS_STRING        "v"
sl@0
   123
sl@0
   124
/** STRUCT and DICT_ENTRY are sort of special since their codes can't
sl@0
   125
 * appear in a type string, instead
sl@0
   126
 * DBUS_STRUCT_BEGIN_CHAR/DBUS_DICT_ENTRY_BEGIN_CHAR have to appear
sl@0
   127
 */
sl@0
   128
/** Type code used to represent a struct; however, this type code does not appear
sl@0
   129
 * in type signatures, instead #DBUS_STRUCT_BEGIN_CHAR and #DBUS_STRUCT_END_CHAR will
sl@0
   130
 * appear in a signature.
sl@0
   131
 */
sl@0
   132
#define DBUS_TYPE_STRUCT        ((int) 'r')
sl@0
   133
/** #DBUS_TYPE_STRUCT as a string literal instead of a int literal */
sl@0
   134
#define DBUS_TYPE_STRUCT_AS_STRING         "r"
sl@0
   135
/** Type code used to represent a dict entry; however, this type code does not appear
sl@0
   136
 * in type signatures, instead #DBUS_DICT_ENTRY_BEGIN_CHAR and #DBUS_DICT_ENTRY_END_CHAR will
sl@0
   137
 * appear in a signature.
sl@0
   138
 */
sl@0
   139
#define DBUS_TYPE_DICT_ENTRY    ((int) 'e')
sl@0
   140
/** #DBUS_TYPE_DICT_ENTRY as a string literal instead of a int literal */
sl@0
   141
#define DBUS_TYPE_DICT_ENTRY_AS_STRING     "e"
sl@0
   142
sl@0
   143
/** Does not include #DBUS_TYPE_INVALID, #DBUS_STRUCT_BEGIN_CHAR, #DBUS_STRUCT_END_CHAR,
sl@0
   144
 * #DBUS_DICT_ENTRY_BEGIN_CHAR, or #DBUS_DICT_ENTRY_END_CHAR - i.e. it is the number of
sl@0
   145
 * valid types, not the number of distinct characters that may appear in a type signature.
sl@0
   146
 */
sl@0
   147
#define DBUS_NUMBER_OF_TYPES    (16)
sl@0
   148
sl@0
   149
/* characters other than typecodes that appear in type signatures */
sl@0
   150
sl@0
   151
/** Code marking the start of a struct type in a type signature */
sl@0
   152
#define DBUS_STRUCT_BEGIN_CHAR   ((int) '(')
sl@0
   153
/** #DBUS_STRUCT_BEGIN_CHAR as a string literal instead of a int literal */
sl@0
   154
#define DBUS_STRUCT_BEGIN_CHAR_AS_STRING   "("
sl@0
   155
/** Code marking the end of a struct type in a type signature */
sl@0
   156
#define DBUS_STRUCT_END_CHAR     ((int) ')')
sl@0
   157
/** #DBUS_STRUCT_END_CHAR a string literal instead of a int literal */
sl@0
   158
#define DBUS_STRUCT_END_CHAR_AS_STRING     ")"
sl@0
   159
/** Code marking the start of a dict entry type in a type signature */
sl@0
   160
#define DBUS_DICT_ENTRY_BEGIN_CHAR   ((int) '{')
sl@0
   161
/** #DBUS_DICT_ENTRY_BEGIN_CHAR as a string literal instead of a int literal */
sl@0
   162
#define DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING   "{"
sl@0
   163
/** Code marking the end of a dict entry type in a type signature */
sl@0
   164
#define DBUS_DICT_ENTRY_END_CHAR     ((int) '}')
sl@0
   165
/** #DBUS_DICT_ENTRY_END_CHAR as a string literal instead of a int literal */
sl@0
   166
#define DBUS_DICT_ENTRY_END_CHAR_AS_STRING     "}"
sl@0
   167
sl@0
   168
/** Max length in bytes of a bus name, interface, or member (not object
sl@0
   169
 * path, paths are unlimited). This is limited because lots of stuff
sl@0
   170
 * is O(n) in this number, plus it would be obnoxious to type in a
sl@0
   171
 * paragraph-long method name so most likely something like that would
sl@0
   172
 * be an exploit.
sl@0
   173
 */
sl@0
   174
#define DBUS_MAXIMUM_NAME_LENGTH 255
sl@0
   175
sl@0
   176
/** This one is 255 so it fits in a byte */
sl@0
   177
#define DBUS_MAXIMUM_SIGNATURE_LENGTH 255
sl@0
   178
sl@0
   179
/** Max length of a match rule string; to keep people from hosing the
sl@0
   180
 * daemon with some huge rule
sl@0
   181
 */
sl@0
   182
#define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024
sl@0
   183
sl@0
   184
/** Max arg number you can match on in a match rule, e.g.
sl@0
   185
 * arg0='hello' is OK, arg3489720987='hello' is not
sl@0
   186
 */
sl@0
   187
#define DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER 63
sl@0
   188
  
sl@0
   189
/** Max length of a marshaled array in bytes (64M, 2^26) We use signed
sl@0
   190
 * int for lengths so must be INT_MAX or less.  We need something a
sl@0
   191
 * bit smaller than INT_MAX because the array is inside a message with
sl@0
   192
 * header info, etc.  so an INT_MAX array wouldn't allow the message
sl@0
   193
 * overhead.  The 64M number is an attempt at a larger number than
sl@0
   194
 * we'd reasonably ever use, but small enough that your bus would chew
sl@0
   195
 * through it fairly quickly without locking up forever. If you have
sl@0
   196
 * data that's likely to be larger than this, you should probably be
sl@0
   197
 * sending it in multiple incremental messages anyhow.
sl@0
   198
 */
sl@0
   199
#define DBUS_MAXIMUM_ARRAY_LENGTH (67108864)
sl@0
   200
/** Number of bits you need in an unsigned to store the max array size */
sl@0
   201
#define DBUS_MAXIMUM_ARRAY_LENGTH_BITS 26
sl@0
   202
sl@0
   203
/** The maximum total message size including header and body; similar
sl@0
   204
 * rationale to max array size.
sl@0
   205
 */
sl@0
   206
#define DBUS_MAXIMUM_MESSAGE_LENGTH (DBUS_MAXIMUM_ARRAY_LENGTH * 2)
sl@0
   207
/** Number of bits you need in an unsigned to store the max message size */
sl@0
   208
#define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27
sl@0
   209
sl@0
   210
/** Depth of recursion in the type tree. This is automatically limited
sl@0
   211
 * to DBUS_MAXIMUM_SIGNATURE_LENGTH since you could only have an array
sl@0
   212
 * of array of array of ... that fit in the max signature.  But that's
sl@0
   213
 * probably a bit too large.
sl@0
   214
 */
sl@0
   215
#define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH 32
sl@0
   216
sl@0
   217
/* Types of message */
sl@0
   218
sl@0
   219
/** This value is never a valid message type, see dbus_message_get_type() */
sl@0
   220
#define DBUS_MESSAGE_TYPE_INVALID       0
sl@0
   221
/** Message type of a method call message, see dbus_message_get_type() */
sl@0
   222
#define DBUS_MESSAGE_TYPE_METHOD_CALL   1
sl@0
   223
/** Message type of a method return message, see dbus_message_get_type() */
sl@0
   224
#define DBUS_MESSAGE_TYPE_METHOD_RETURN 2
sl@0
   225
/** Message type of an error reply message, see dbus_message_get_type() */
sl@0
   226
#define DBUS_MESSAGE_TYPE_ERROR         3
sl@0
   227
/** Message type of a signal message, see dbus_message_get_type() */
sl@0
   228
#define DBUS_MESSAGE_TYPE_SIGNAL        4
sl@0
   229
sl@0
   230
/* Header flags */
sl@0
   231
sl@0
   232
/** If set, this flag means that the sender of a message does not care about getting
sl@0
   233
 * a reply, so the recipient need not send one. See dbus_message_set_no_reply().
sl@0
   234
 */
sl@0
   235
#define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1
sl@0
   236
/**
sl@0
   237
 * If set, this flag means that even if the message bus knows how to start an owner for
sl@0
   238
 * the destination bus name (see dbus_message_set_destination()), it should not
sl@0
   239
 * do so. If this flag is not set, the bus may launch a program to process the
sl@0
   240
 * message.
sl@0
   241
 */
sl@0
   242
#define DBUS_HEADER_FLAG_NO_AUTO_START     0x2
sl@0
   243
sl@0
   244
/* Header fields */
sl@0
   245
sl@0
   246
/** Not equal to any valid header field code */
sl@0
   247
#define DBUS_HEADER_FIELD_INVALID        0
sl@0
   248
/** Header field code for the path - the path is the object emitting a signal or the object receiving a method call.
sl@0
   249
 * See dbus_message_set_path().
sl@0
   250
 */
sl@0
   251
#define DBUS_HEADER_FIELD_PATH           1
sl@0
   252
/** Header field code for the interface containing a member (method or signal).
sl@0
   253
 * See dbus_message_set_interface().
sl@0
   254
 */
sl@0
   255
#define DBUS_HEADER_FIELD_INTERFACE      2
sl@0
   256
/** Header field code for a member (method or signal). See dbus_message_set_member(). */
sl@0
   257
#define DBUS_HEADER_FIELD_MEMBER         3
sl@0
   258
/** Header field code for an error name (found in #DBUS_MESSAGE_TYPE_ERROR messages).
sl@0
   259
 * See dbus_message_set_error_name().
sl@0
   260
 */
sl@0
   261
#define DBUS_HEADER_FIELD_ERROR_NAME     4
sl@0
   262
/** Header field code for a reply serial, used to match a #DBUS_MESSAGE_TYPE_METHOD_RETURN message with the
sl@0
   263
 * message that it's a reply to. See dbus_message_set_reply_serial().
sl@0
   264
 */
sl@0
   265
#define DBUS_HEADER_FIELD_REPLY_SERIAL   5
sl@0
   266
/**
sl@0
   267
 * Header field code for the destination bus name of a message. See dbus_message_set_destination().
sl@0
   268
 */
sl@0
   269
#define DBUS_HEADER_FIELD_DESTINATION    6
sl@0
   270
/**
sl@0
   271
 * Header field code for the sender of a message; usually initialized by the message bus.
sl@0
   272
 * See dbus_message_set_sender().
sl@0
   273
 */
sl@0
   274
#define DBUS_HEADER_FIELD_SENDER         7
sl@0
   275
/**
sl@0
   276
 * Header field code for the type signature of a message.
sl@0
   277
 */
sl@0
   278
#define DBUS_HEADER_FIELD_SIGNATURE      8
sl@0
   279
sl@0
   280
/**
sl@0
   281
 * Value of the highest-numbered header field code, can be used to determine
sl@0
   282
 * the size of an array indexed by header field code. Remember though
sl@0
   283
 * that unknown codes must be ignored, so check for that before
sl@0
   284
 * indexing the array.
sl@0
   285
 */
sl@0
   286
#define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SIGNATURE
sl@0
   287
sl@0
   288
/** Header format is defined as a signature:
sl@0
   289
 *   byte                            byte order
sl@0
   290
 *   byte                            message type ID
sl@0
   291
 *   byte                            flags
sl@0
   292
 *   byte                            protocol version
sl@0
   293
 *   uint32                          body length
sl@0
   294
 *   uint32                          serial
sl@0
   295
 *   array of struct (byte,variant)  (field name, value)
sl@0
   296
 *
sl@0
   297
 * The length of the header can be computed as the
sl@0
   298
 * fixed size of the initial data, plus the length of
sl@0
   299
 * the array at the end, plus padding to an 8-boundary.
sl@0
   300
 */
sl@0
   301
#define DBUS_HEADER_SIGNATURE                   \
sl@0
   302
     DBUS_TYPE_BYTE_AS_STRING                   \
sl@0
   303
     DBUS_TYPE_BYTE_AS_STRING                   \
sl@0
   304
     DBUS_TYPE_BYTE_AS_STRING                   \
sl@0
   305
     DBUS_TYPE_BYTE_AS_STRING                   \
sl@0
   306
     DBUS_TYPE_UINT32_AS_STRING                 \
sl@0
   307
     DBUS_TYPE_UINT32_AS_STRING                 \
sl@0
   308
     DBUS_TYPE_ARRAY_AS_STRING                  \
sl@0
   309
     DBUS_STRUCT_BEGIN_CHAR_AS_STRING           \
sl@0
   310
     DBUS_TYPE_BYTE_AS_STRING                   \
sl@0
   311
     DBUS_TYPE_VARIANT_AS_STRING                \
sl@0
   312
     DBUS_STRUCT_END_CHAR_AS_STRING
sl@0
   313
sl@0
   314
sl@0
   315
/**
sl@0
   316
 * The smallest header size that can occur.  (It won't be valid due to
sl@0
   317
 * missing required header fields.) This is 4 bytes, two uint32, an
sl@0
   318
 * array length. This isn't any kind of resource limit, just the
sl@0
   319
 * necessary/logical outcome of the header signature.
sl@0
   320
 */
sl@0
   321
#define DBUS_MINIMUM_HEADER_SIZE 16
sl@0
   322
sl@0
   323
/* Errors */
sl@0
   324
/* WARNING these get autoconverted to an enum in dbus-glib.h. Thus,
sl@0
   325
 * if you change the order it breaks the ABI. Keep them in order.
sl@0
   326
 * Also, don't change the formatting since that will break the sed
sl@0
   327
 * script.
sl@0
   328
 */
sl@0
   329
/** A generic error; "something went wrong" - see the error message for more. */
sl@0
   330
#define DBUS_ERROR_FAILED                     "org.freedesktop.DBus.Error.Failed"
sl@0
   331
/** There was not enough memory to complete an operation. */
sl@0
   332
#define DBUS_ERROR_NO_MEMORY                  "org.freedesktop.DBus.Error.NoMemory"
sl@0
   333
/** The bus doesn't know how to launch a service to supply the bus name you wanted. */
sl@0
   334
#define DBUS_ERROR_SERVICE_UNKNOWN            "org.freedesktop.DBus.Error.ServiceUnknown"
sl@0
   335
/** The bus name you referenced doesn't exist (i.e. no application owns it). */
sl@0
   336
#define DBUS_ERROR_NAME_HAS_NO_OWNER          "org.freedesktop.DBus.Error.NameHasNoOwner"
sl@0
   337
/** No reply to a message expecting one, usually means a timeout occurred. */
sl@0
   338
#define DBUS_ERROR_NO_REPLY                   "org.freedesktop.DBus.Error.NoReply"
sl@0
   339
/** Something went wrong reading or writing to a socket, for example. */
sl@0
   340
#define DBUS_ERROR_IO_ERROR                   "org.freedesktop.DBus.Error.IOError"
sl@0
   341
/** A D-Bus bus address was malformed. */
sl@0
   342
#define DBUS_ERROR_BAD_ADDRESS                "org.freedesktop.DBus.Error.BadAddress"
sl@0
   343
/** Requested operation isn't supported (like ENOSYS on UNIX). */
sl@0
   344
#define DBUS_ERROR_NOT_SUPPORTED              "org.freedesktop.DBus.Error.NotSupported"
sl@0
   345
/** Some limited resource is exhausted. */
sl@0
   346
#define DBUS_ERROR_LIMITS_EXCEEDED            "org.freedesktop.DBus.Error.LimitsExceeded"
sl@0
   347
/** Security restrictions don't allow doing what you're trying to do. */
sl@0
   348
#define DBUS_ERROR_ACCESS_DENIED              "org.freedesktop.DBus.Error.AccessDenied"
sl@0
   349
/** Authentication didn't work. */
sl@0
   350
#define DBUS_ERROR_AUTH_FAILED                "org.freedesktop.DBus.Error.AuthFailed"
sl@0
   351
/** Unable to connect to server (probably caused by ECONNREFUSED on a socket). */
sl@0
   352
#define DBUS_ERROR_NO_SERVER                  "org.freedesktop.DBus.Error.NoServer"
sl@0
   353
/** Certain timeout errors, possibly ETIMEDOUT on a socket.
sl@0
   354
 * Note that #DBUS_ERROR_NO_REPLY is used for message reply timeouts.
sl@0
   355
 * @warning this is confusingly-named given that #DBUS_ERROR_TIMED_OUT also exists. We can't fix
sl@0
   356
 * it for compatibility reasons so just be careful.
sl@0
   357
 */
sl@0
   358
#define DBUS_ERROR_TIMEOUT                    "org.freedesktop.DBus.Error.Timeout"
sl@0
   359
/** No network access (probably ENETUNREACH on a socket). */
sl@0
   360
#define DBUS_ERROR_NO_NETWORK                 "org.freedesktop.DBus.Error.NoNetwork"
sl@0
   361
/** Can't bind a socket since its address is in use (i.e. EADDRINUSE). */
sl@0
   362
#define DBUS_ERROR_ADDRESS_IN_USE             "org.freedesktop.DBus.Error.AddressInUse"
sl@0
   363
/** The connection is disconnected and you're trying to use it. */
sl@0
   364
#define DBUS_ERROR_DISCONNECTED               "org.freedesktop.DBus.Error.Disconnected"
sl@0
   365
/** Invalid arguments passed to a method call. */
sl@0
   366
#define DBUS_ERROR_INVALID_ARGS               "org.freedesktop.DBus.Error.InvalidArgs"
sl@0
   367
/** Missing file. */
sl@0
   368
#define DBUS_ERROR_FILE_NOT_FOUND             "org.freedesktop.DBus.Error.FileNotFound"
sl@0
   369
/** Existing file and the operation you're using does not silently overwrite. */
sl@0
   370
#define DBUS_ERROR_FILE_EXISTS                "org.freedesktop.DBus.Error.FileExists"
sl@0
   371
/** Method name you invoked isn't known by the object you invoked it on. */
sl@0
   372
#define DBUS_ERROR_UNKNOWN_METHOD             "org.freedesktop.DBus.Error.UnknownMethod"
sl@0
   373
/** Certain timeout errors, e.g. while starting a service.
sl@0
   374
 * @warning this is confusingly-named given that #DBUS_ERROR_TIMEOUT also exists. We can't fix
sl@0
   375
 * it for compatibility reasons so just be careful.
sl@0
   376
 */
sl@0
   377
#define DBUS_ERROR_TIMED_OUT                  "org.freedesktop.DBus.Error.TimedOut"
sl@0
   378
/** Tried to remove or modify a match rule that didn't exist. */
sl@0
   379
#define DBUS_ERROR_MATCH_RULE_NOT_FOUND       "org.freedesktop.DBus.Error.MatchRuleNotFound"
sl@0
   380
/** The match rule isn't syntactically valid. */
sl@0
   381
#define DBUS_ERROR_MATCH_RULE_INVALID         "org.freedesktop.DBus.Error.MatchRuleInvalid"
sl@0
   382
/** While starting a new process, the exec() call failed. */
sl@0
   383
#define DBUS_ERROR_SPAWN_EXEC_FAILED          "org.freedesktop.DBus.Error.Spawn.ExecFailed"
sl@0
   384
/** While starting a new process, the fork() call failed. */
sl@0
   385
#define DBUS_ERROR_SPAWN_FORK_FAILED          "org.freedesktop.DBus.Error.Spawn.ForkFailed"
sl@0
   386
/** While starting a new process, the child exited with a status code. */
sl@0
   387
#define DBUS_ERROR_SPAWN_CHILD_EXITED         "org.freedesktop.DBus.Error.Spawn.ChildExited"
sl@0
   388
/** While starting a new process, the child exited on a signal. */
sl@0
   389
#define DBUS_ERROR_SPAWN_CHILD_SIGNALED       "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
sl@0
   390
/** While starting a new process, something went wrong. */
sl@0
   391
#define DBUS_ERROR_SPAWN_FAILED               "org.freedesktop.DBus.Error.Spawn.Failed"
sl@0
   392
/** Tried to get a UNIX process ID and it wasn't available. */
sl@0
   393
#define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN    "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
sl@0
   394
/** A type signature is not valid. */
sl@0
   395
#define DBUS_ERROR_INVALID_SIGNATURE          "org.freedesktop.DBus.Error.InvalidSignature"
sl@0
   396
/** A file contains invalid syntax or is otherwise broken. */
sl@0
   397
#define DBUS_ERROR_INVALID_FILE_CONTENT       "org.freedesktop.DBus.Error.InvalidFileContent"
sl@0
   398
/** Asked for SELinux security context and it wasn't available. */
sl@0
   399
#define DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN    "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
sl@0
   400
sl@0
   401
/* XML introspection format */
sl@0
   402
sl@0
   403
/** XML namespace of the introspection format version 1.0 */
sl@0
   404
#define DBUS_INTROSPECT_1_0_XML_NAMESPACE         "http://www.freedesktop.org/standards/dbus"
sl@0
   405
/** XML public identifier of the introspection format version 1.0 */
sl@0
   406
#define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
sl@0
   407
/** XML system identifier of the introspection format version 1.0 */
sl@0
   408
#define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
sl@0
   409
/** XML document type declaration of the introspection format version 1.0 */
sl@0
   410
#define DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE "<!DOCTYPE node PUBLIC \""DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER"\"\n\""DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER"\">\n"
sl@0
   411
sl@0
   412
/** @} */
sl@0
   413
sl@0
   414
#ifdef __cplusplus
sl@0
   415
#if 0
sl@0
   416
{ /* avoids confusing emacs indentation */
sl@0
   417
#endif
sl@0
   418
}
sl@0
   419
#endif
sl@0
   420
sl@0
   421
#endif /* DBUS_PROTOCOL_H */