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.0
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 #ifdef __cplusplus
00124 }
00125 #endif
00126 
00127 #endif /* DBUS_PROTOCOL_H */

Generated on Wed Jun 9 05:01:26 2004 for D-BUS by doxygen1.2.15