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 1.2
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   
00076 /* Header fields */
00077 #define DBUS_HEADER_FIELD_INVALID        0
00078 #define DBUS_HEADER_FIELD_PATH           1
00079 #define DBUS_HEADER_FIELD_INTERFACE      2
00080 #define DBUS_HEADER_FIELD_MEMBER         3
00081 #define DBUS_HEADER_FIELD_ERROR_NAME     4
00082 #define DBUS_HEADER_FIELD_REPLY_SERIAL   5
00083 #define DBUS_HEADER_FIELD_SERVICE        6
00084 #define DBUS_HEADER_FIELD_SENDER_SERVICE 7
00085 
00086 #define DBUS_HEADER_FIELD_LAST DBUS_HEADER_FIELD_SENDER_SERVICE
00087   
00088 /* Services */
00089 #define DBUS_SERVICE_ORG_FREEDESKTOP_DBUS      "org.freedesktop.DBus"
00090 
00091 /* Paths */
00092 #define DBUS_PATH_ORG_FREEDESKTOP_DBUS  "/org/freedesktop/DBus"
00093 #define DBUS_PATH_ORG_FREEDESKTOP_LOCAL "/org/freedesktop/Local"
00094   
00095 /* Interfaces, these #define don't do much other than
00096  * catch typos at compile time
00097  */
00098 #define DBUS_INTERFACE_ORG_FREEDESKTOP_DBUS  "org.freedesktop.DBus"
00099 #define DBUS_INTERFACE_ORG_FREEDESKTOP_INTROSPECTABLE "org.freedesktop.Introspectable"
00100   
00101 /* This is a special interface whose methods can only be invoked
00102  * by the local implementation (messages from remote apps aren't
00103  * allowed to specify this interface).
00104  */
00105 #define DBUS_INTERFACE_ORG_FREEDESKTOP_LOCAL "org.freedesktop.Local"
00106   
00107 /* Service owner flags */
00108 #define DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT 0x1
00109 #define DBUS_SERVICE_FLAG_REPLACE_EXISTING     0x2
00110 
00111 /* Service replies */
00112 #define DBUS_SERVICE_REPLY_PRIMARY_OWNER  0x1
00113 #define DBUS_SERVICE_REPLY_IN_QUEUE       0x2
00114 #define DBUS_SERVICE_REPLY_SERVICE_EXISTS 0x4
00115 #define DBUS_SERVICE_REPLY_ALREADY_OWNER  0x8
00116 
00117 /* Activation replies */
00118 #define DBUS_ACTIVATION_REPLY_ACTIVATED      0x0
00119 #define DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE 0x1
00120   
00121 #ifdef __cplusplus
00122 }
00123 #endif
00124 
00125 #endif /* DBUS_PROTOCOL_H */

Generated on Tue Feb 10 18:14:06 2004 for D-BUS by doxygen 1.3.5