Main Page | Modules | Data Structures | File List | Data Fields | Related Pages

dbus-protocol.h

00001 /* -*- mode: C; c-file-style: "gnu" -*- */
00002 /* dbus-protocol.h  D-Bus protocol constants
00003  *
00004  * Copyright (C) 2002, 2003  CodeFactory AB
00005  *
00006  * Licensed under the Academic Free License version 2.1
00007  * 
00008  * This program is free software; you can redistribute it and/or modify
00009  * it under the terms of the GNU General Public License as published by
00010  * the Free Software Foundation; either version 2 of the License, or
00011  * (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  * 
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00021  *
00022  */
00023 
00024 #ifndef DBUS_PROTOCOL_H
00025 #define DBUS_PROTOCOL_H
00026 
00027 /* Don't include anything in here from anywhere else. It's
00028  * intended for use by any random library.
00029  */
00030 
00031 #ifdef  __cplusplus
00032 extern "C" {
00033 #endif
00034 
00035 /* Message byte order */
00036 #define DBUS_LITTLE_ENDIAN ('l')  /* LSB first */
00037 #define DBUS_BIG_ENDIAN    ('B')  /* MSB first */    
00038 
00039 /* Protocol version */
00040 #define DBUS_MAJOR_PROTOCOL_VERSION 0
00041 
00042 /* Data types */
00043 #define DBUS_TYPE_INVALID       ((int) '\0')
00044 #define DBUS_TYPE_NIL           ((int) 'v')
00045 #define DBUS_TYPE_BYTE          ((int) 'y')
00046 #define DBUS_TYPE_BOOLEAN       ((int) 'b')
00047 #define DBUS_TYPE_INT32         ((int) 'i')
00048 #define DBUS_TYPE_UINT32        ((int) 'u')
00049 #define DBUS_TYPE_INT64         ((int) 'x')
00050 #define DBUS_TYPE_UINT64        ((int) 't')
00051 #define DBUS_TYPE_DOUBLE        ((int) 'd')
00052 #define DBUS_TYPE_STRING        ((int) 's')
00053 #define DBUS_TYPE_CUSTOM        ((int) 'c')
00054 #define DBUS_TYPE_ARRAY         ((int) 'a')
00055 #define DBUS_TYPE_DICT          ((int) 'm')
00056 #define DBUS_TYPE_OBJECT_PATH   ((int) 'o')
00057 
00058 #define DBUS_NUMBER_OF_TYPES    (13)
00059 
00060 /* Max length in bytes of a service or interface or member name */
00061 #define DBUS_MAXIMUM_NAME_LENGTH 256
00062 
00063 /* Max length of a match rule string */
00064 #define DBUS_MAXIMUM_MATCH_RULE_LENGTH 1024
00065 
00066 /* Types of message */
00067 #define DBUS_MESSAGE_TYPE_INVALID       0
00068 #define DBUS_MESSAGE_TYPE_METHOD_CALL   1
00069 #define DBUS_MESSAGE_TYPE_METHOD_RETURN 2
00070 #define DBUS_MESSAGE_TYPE_ERROR         3
00071 #define DBUS_MESSAGE_TYPE_SIGNAL        4
00072   
00073 /* Header flags */
00074 #define DBUS_HEADER_FLAG_NO_REPLY_EXPECTED 0x1
00075 #define DBUS_HEADER_FLAG_AUTO_ACTIVATION   0x2
00076   
00077 /* Header fields */
00078 #define DBUS_HEADER_FIELD_INVALID        0
00079 #define DBUS_HEADER_FIELD_PATH           1
00080 #define DBUS_HEADER_FIELD_INTERFACE      2
00081 #define DBUS_HEADER_FIELD_MEMBER         3
00082 #define DBUS_HEADER_FIELD_ERROR_NAME     4
00083 #define DBUS_HEADER_FIELD_REPLY_SERIAL   5
00084 #define DBUS_HEADER_FIELD_DESTINATION    6
00085 #define DBUS_HEADER_FIELD_SENDER         7
00086 #define DBUS_HEADER_FIELD_SIGNATURE      8
00087 
00088 #define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SIGNATURE
00089 
00090 /* Services */
00091 #define DBUS_SERVICE_ORG_FREEDESKTOP_DBUS      "org.freedesktop.DBus"
00092 
00093 /* Paths */
00094 #define DBUS_PATH_ORG_FREEDESKTOP_DBUS  "/org/freedesktop/DBus"
00095 #define DBUS_PATH_ORG_FREEDESKTOP_LOCAL "/org/freedesktop/Local"
00096   
00097 /* Interfaces, these #define don't do much other than
00098  * catch typos at compile time
00099  */
00100 #define DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS  "org.freedesktop.DBus"
00101 #define DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE "org.freedesktop.Introspectable"
00102   
00103 /* This is a special interface whose methods can only be invoked
00104  * by the local implementation (messages from remote apps aren't
00105  * allowed to specify this interface).
00106  */
00107 #define DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL "org.freedesktop.Local"
00108   
00109 /* Service owner flags */
00110 #define DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT 0x1
00111 #define DBUS_SERVICE_FLAG_REPLACE_EXISTING     0x2
00112 
00113 /* Service replies */
00114 #define DBUS_SERVICE_REPLY_PRIMARY_OWNER  0x1
00115 #define DBUS_SERVICE_REPLY_IN_QUEUE       0x2
00116 #define DBUS_SERVICE_REPLY_SERVICE_EXISTS 0x4
00117 #define DBUS_SERVICE_REPLY_ALREADY_OWNER  0x8
00118 
00119 /* Activation replies */
00120 #define DBUS_ACTIVATION_REPLY_ACTIVATED      0x0
00121 #define DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE 0x1
00122 
00123 /* Errors */
00124 /* WARNING these get autoconverted to an enum in dbus-glib.h. Thus,
00125  * if you change the order it breaks the ABI. Keep them in order.
00126  * Also, don't change the formatting since that will break the sed
00127  * script.
00128  */
00129 #define DBUS_ERROR_FAILED                     "org.freedesktop.DBus.Error.Failed"
00130 #define DBUS_ERROR_NO_MEMORY                  "org.freedesktop.DBus.Error.NoMemory"
00131 #define DBUS_ERROR_ACTIVATE_SERVICE_NOT_FOUND "org.freedesktop.DBus.Error.ServiceNotFound"
00132 #define DBUS_ERROR_SERVICE_DOES_NOT_EXIST     "org.freedesktop.DBus.Error.ServiceDoesNotExist"
00133 #define DBUS_ERROR_SERVICE_HAS_NO_OWNER       "org.freedesktop.DBus.Error.ServiceHasNoOwner"
00134 #define DBUS_ERROR_NO_REPLY                   "org.freedesktop.DBus.Error.NoReply"
00135 #define DBUS_ERROR_IO_ERROR                   "org.freedesktop.DBus.Error.IOError"
00136 #define DBUS_ERROR_BAD_ADDRESS                "org.freedesktop.DBus.Error.BadAddress"
00137 #define DBUS_ERROR_NOT_SUPPORTED              "org.freedesktop.DBus.Error.NotSupported"
00138 #define DBUS_ERROR_LIMITS_EXCEEDED            "org.freedesktop.DBus.Error.LimitsExceeded"
00139 #define DBUS_ERROR_ACCESS_DENIED              "org.freedesktop.DBus.Error.AccessDenied"
00140 #define DBUS_ERROR_AUTH_FAILED                "org.freedesktop.DBus.Error.AuthFailed"
00141 #define DBUS_ERROR_NO_SERVER                  "org.freedesktop.DBus.Error.NoServer"
00142 #define DBUS_ERROR_TIMEOUT                    "org.freedesktop.DBus.Error.Timeout"
00143 #define DBUS_ERROR_NO_NETWORK                 "org.freedesktop.DBus.Error.NoNetwork"
00144 #define DBUS_ERROR_ADDRESS_IN_USE             "org.freedesktop.DBus.Error.AddressInUse"
00145 #define DBUS_ERROR_DISCONNECTED               "org.freedesktop.DBus.Error.Disconnected"
00146 #define DBUS_ERROR_INVALID_ARGS               "org.freedesktop.DBus.Error.InvalidArgs"
00147 #define DBUS_ERROR_FILE_NOT_FOUND             "org.freedesktop.DBus.Error.FileNotFound"
00148 #define DBUS_ERROR_UNKNOWN_METHOD             "org.freedesktop.DBus.Error.UnknownMethod"
00149 #define DBUS_ERROR_TIMED_OUT                  "org.freedesktop.DBus.Error.TimedOut"
00150 #define DBUS_ERROR_MATCH_RULE_NOT_FOUND       "org.freedesktop.DBus.Error.MatchRuleNotFound"
00151 #define DBUS_ERROR_MATCH_RULE_INVALID         "org.freedesktop.DBus.Error.MatchRuleInvalid"
00152 #define DBUS_ERROR_SPAWN_EXEC_FAILED          "org.freedesktop.DBus.Error.Spawn.ExecFailed"
00153 #define DBUS_ERROR_SPAWN_FORK_FAILED          "org.freedesktop.DBus.Error.Spawn.ForkFailed"
00154 #define DBUS_ERROR_SPAWN_CHILD_EXITED         "org.freedesktop.DBus.Error.Spawn.ChildExited"
00155 #define DBUS_ERROR_SPAWN_CHILD_SIGNALED       "org.freedesktop.DBus.Error.Spawn.ChildSignaled"
00156 #define DBUS_ERROR_SPAWN_FAILED               "org.freedesktop.DBus.Error.Spawn.Failed"
00157 #define DBUS_ERROR_UNIX_PROCESS_ID_UNKNOWN    "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
00158 
00159 #ifdef __cplusplus
00160 }
00161 #endif
00162 
00163 #endif /* DBUS_PROTOCOL_H */

Generated on Sat Sep 25 19:17:12 2004 for D-BUS by  doxygen 1.3.8-20040913