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