00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef DBUS_PROTOCOL_H
00026 #define DBUS_PROTOCOL_H
00027
00028
00029
00030
00031
00032 #ifdef __cplusplus
00033 extern "C" {
00034 #if 0
00035 }
00036 #endif
00037 #endif
00038
00039
00052
00053 #define DBUS_LITTLE_ENDIAN ('l')
00054 #define DBUS_BIG_ENDIAN ('B')
00057 #define DBUS_MAJOR_PROTOCOL_VERSION 1
00058
00060 #define DBUS_TYPE_INVALID ((int) '\0')
00061
00062 #define DBUS_TYPE_INVALID_AS_STRING "\0"
00063
00064
00066 #define DBUS_TYPE_BYTE ((int) 'y')
00067
00068 #define DBUS_TYPE_BYTE_AS_STRING "y"
00069
00070 #define DBUS_TYPE_BOOLEAN ((int) 'b')
00071
00072 #define DBUS_TYPE_BOOLEAN_AS_STRING "b"
00073
00074 #define DBUS_TYPE_INT16 ((int) 'n')
00075
00076 #define DBUS_TYPE_INT16_AS_STRING "n"
00077
00078 #define DBUS_TYPE_UINT16 ((int) 'q')
00079
00080 #define DBUS_TYPE_UINT16_AS_STRING "q"
00081
00082 #define DBUS_TYPE_INT32 ((int) 'i')
00083
00084 #define DBUS_TYPE_INT32_AS_STRING "i"
00085
00086 #define DBUS_TYPE_UINT32 ((int) 'u')
00087
00088 #define DBUS_TYPE_UINT32_AS_STRING "u"
00089
00090 #define DBUS_TYPE_INT64 ((int) 'x')
00091
00092 #define DBUS_TYPE_INT64_AS_STRING "x"
00093
00094 #define DBUS_TYPE_UINT64 ((int) 't')
00095
00096 #define DBUS_TYPE_UINT64_AS_STRING "t"
00097
00098 #define DBUS_TYPE_DOUBLE ((int) 'd')
00099
00100 #define DBUS_TYPE_DOUBLE_AS_STRING "d"
00101
00102 #define DBUS_TYPE_STRING ((int) 's')
00103
00104 #define DBUS_TYPE_STRING_AS_STRING "s"
00105
00106 #define DBUS_TYPE_OBJECT_PATH ((int) 'o')
00107
00108 #define DBUS_TYPE_OBJECT_PATH_AS_STRING "o"
00109
00110 #define DBUS_TYPE_SIGNATURE ((int) 'g')
00111
00112 #define DBUS_TYPE_SIGNATURE_AS_STRING "g"
00113
00114
00116 #define DBUS_TYPE_ARRAY ((int) 'a')
00117
00118 #define DBUS_TYPE_ARRAY_AS_STRING "a"
00119
00120 #define DBUS_TYPE_VARIANT ((int) 'v')
00121
00122 #define DBUS_TYPE_VARIANT_AS_STRING "v"
00123
00132 #define DBUS_TYPE_STRUCT ((int) 'r')
00133
00134 #define DBUS_TYPE_STRUCT_AS_STRING "r"
00135
00139 #define DBUS_TYPE_DICT_ENTRY ((int) 'e')
00140
00141 #define DBUS_TYPE_DICT_ENTRY_AS_STRING "e"
00142
00147 #define DBUS_NUMBER_OF_TYPES (16)
00148
00149
00150
00152 #define DBUS_STRUCT_BEGIN_CHAR ((int) '(')
00153
00154 #define DBUS_STRUCT_BEGIN_CHAR_AS_STRING "("
00155
00156 #define DBUS_STRUCT_END_CHAR ((int) ')')
00157
00158 #define DBUS_STRUCT_END_CHAR_AS_STRING ")"
00159
00160 #define DBUS_DICT_ENTRY_BEGIN_CHAR ((int) '{')
00161
00162 #define DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING "{"
00163
00164 #define DBUS_DICT_ENTRY_END_CHAR ((int) '}')
00165
00166 #define DBUS_DICT_ENTRY_END_CHAR_AS_STRING "}"
00167
00174 #define DBUS_MAXIMUM_NAME_LENGTH 255
00175
00177 #define DBUS_MAXIMUM_SIGNATURE_LENGTH 255
00178
00182 #define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024
00183
00187 #define DBUS_MAXIMUM_MATCH_RULE_ARG_NUMBER 63
00188
00199 #define DBUS_MAXIMUM_ARRAY_LENGTH (67108864)
00200
00201 #define DBUS_MAXIMUM_ARRAY_LENGTH_BITS 26
00202
00206 #define DBUS_MAXIMUM_MESSAGE_LENGTH (DBUS_MAXIMUM_ARRAY_LENGTH * 2)
00207
00208 #define DBUS_MAXIMUM_MESSAGE_LENGTH_BITS 27
00209
00215 #define DBUS_MAXIMUM_TYPE_RECURSION_DEPTH 32
00216
00217
00218
00220 #define DBUS_MESSAGE_TYPE_INVALID 0
00221
00222 #define DBUS_MESSAGE_TYPE_METHOD_CALL 1
00223
00224 #define DBUS_MESSAGE_TYPE_METHOD_RETURN 2
00225
00226 #define DBUS_MESSAGE_TYPE_ERROR 3
00227
00228 #define DBUS_MESSAGE_TYPE_SIGNAL 4
00229
00230
00231
00235 #define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1
00236
00242 #define DBUS_HEADER_FLAG_NO_AUTO_START 0x2
00243
00244
00245
00247 #define DBUS_HEADER_FIELD_INVALID 0
00248
00251 #define DBUS_HEADER_FIELD_PATH 1
00252
00255 #define DBUS_HEADER_FIELD_INTERFACE 2
00256
00257 #define DBUS_HEADER_FIELD_MEMBER 3
00258
00261 #define DBUS_HEADER_FIELD_ERROR_NAME 4
00262
00265 #define DBUS_HEADER_FIELD_REPLY_SERIAL 5
00266
00269 #define DBUS_HEADER_FIELD_DESTINATION 6
00270
00274 #define DBUS_HEADER_FIELD_SENDER 7
00275
00278 #define DBUS_HEADER_FIELD_SIGNATURE 8
00279
00286 #define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SIGNATURE
00287
00301 #define DBUS_HEADER_SIGNATURE \
00302 DBUS_TYPE_BYTE_AS_STRING \
00303 DBUS_TYPE_BYTE_AS_STRING \
00304 DBUS_TYPE_BYTE_AS_STRING \
00305 DBUS_TYPE_BYTE_AS_STRING \
00306 DBUS_TYPE_UINT32_AS_STRING \
00307 DBUS_TYPE_UINT32_AS_STRING \
00308 DBUS_TYPE_ARRAY_AS_STRING \
00309 DBUS_STRUCT_BEGIN_CHAR_AS_STRING \
00310 DBUS_TYPE_BYTE_AS_STRING \
00311 DBUS_TYPE_VARIANT_AS_STRING \
00312 DBUS_STRUCT_END_CHAR_AS_STRING
00313
00314
00321 #define DBUS_MINIMUM_HEADER_SIZE 16
00322
00323
00324
00325
00326
00327
00328
00330 #define DBUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
00331
00332 #define DBUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
00333
00334 #define DBUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown"
00335
00336 #define DBUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner"
00337
00338 #define DBUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
00339
00340 #define DBUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
00341
00342 #define DBUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
00343
00344 #define DBUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
00345
00346 #define DBUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
00347
00348 #define DBUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
00349
00350 #define DBUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
00351
00352 #define DBUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
00353
00358 #define DBUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
00359
00360 #define DBUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
00361
00362 #define DBUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
00363
00364 #define DBUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
00365
00366 #define DBUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
00367
00368 #define DBUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
00369
00370 #define DBUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists"
00371
00372 #define DBUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
00373
00377 #define DBUS_ERROR_TIMED_OUT "org.freedesktop.DBus.Error.TimedOut"
00378
00379 #define DBUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
00380
00381 #define DBUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
00382
00383 #define DBUS_ERROR_SPAWN_EXEC_FAILED "org.freedesktop.DBus.Error.Spawn.ExecFailed"
00384
00385 #define DBUS_ERROR_SPAWN_FORK_FAILED "org.freedesktop.DBus.Error.Spawn.ForkFailed"
00386
00387 #define DBUS_ERROR_SPAWN_CHILD_EXITED "org.freedesktop.DBus.Error.Spawn.ChildExited"
00388
00389 #define DBUS_ERROR_SPAWN_CHILD_SIGNALED "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
00390
00391 #define DBUS_ERROR_SPAWN_FAILED "org.freedesktop.DBus.Error.Spawn.Failed"
00392
00393 #define DBUS_ERROR_SPAWN_SETUP_FAILED "org.freedesktop.DBus.Error.Spawn.FailedToSetup"
00394
00395 #define DBUS_ERROR_SPAWN_CONFIG_INVALID "org.freedesktop.DBus.Error.Spawn.ConfigInvalid"
00396
00397 #define DBUS_ERROR_SPAWN_SERVICE_INVALID "org.freedesktop.DBus.Error.Spawn.ServiceNotValid"
00398
00399 #define DBUS_ERROR_SPAWN_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.Spawn.ServiceNotFound"
00400
00401 #define DBUS_ERROR_SPAWN_PERMISSIONS_INVALID "org.freedesktop.DBus.Error.Spawn.PermissionsInvalid"
00402
00403 #define DBUS_ERROR_SPAWN_FILE_INVALID "org.freedesktop.DBus.Error.Spawn.FileInvalid"
00404
00405 #define DBUS_ERROR_SPAWN_NO_MEMORY "org.freedesktop.DBus.Error.Spawn.NoMemory"
00406
00407 #define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
00408
00409 #define DBUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature"
00410
00411 #define DBUS_ERROR_INVALID_FILE_CONTENT "org.freedesktop.DBus.Error.InvalidFileContent"
00412
00413 #define DBUS_ERROR_SELINUX_SECURITY_CONTEXT_UNKNOWN "org.freedesktop.DBus.Error.SELinuxSecurityContextUnknown"
00414
00415 #define DBUS_ERROR_ADT_AUDIT_DATA_UNKNOWN "org.freedesktop.DBus.Error.AdtAuditDataUnknown"
00416
00417 #define DBUS_ERROR_OBJECT_PATH_IN_USE "org.freedesktop.DBus.Error.ObjectPathInUse"
00418
00419
00420
00422 #define DBUS_INTROSPECT_1_0_XML_NAMESPACE "http://www.freedesktop.org/standards/dbus"
00423
00424 #define DBUS_INTROSPECT_1_0_XML_PUBLIC_IDENTIFIER "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN"
00425
00426 #define DBUS_INTROSPECT_1_0_XML_SYSTEM_IDENTIFIER "http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"
00427
00428 #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"
00429
00432 #ifdef __cplusplus
00433 #if 0
00434 {
00435 #endif
00436 }
00437 #endif
00438
00439 #endif