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       0
00044 #define DBUS_TYPE_NIL           1
00045 #define DBUS_TYPE_BYTE          2
00046 #define DBUS_TYPE_BOOLEAN       3
00047 #define DBUS_TYPE_INT32         4
00048 #define DBUS_TYPE_UINT32        5
00049 #define DBUS_TYPE_INT64         6
00050 #define DBUS_TYPE_UINT64        7
00051 #define DBUS_TYPE_DOUBLE        8
00052 #define DBUS_TYPE_STRING        9
00053 #define DBUS_TYPE_NAMED         10
00054 #define DBUS_TYPE_ARRAY         11
00055 #define DBUS_TYPE_DICT          12
00056 
00057 #define DBUS_TYPE_LAST DBUS_TYPE_DICT
00058 
00059 /* Max length in bytes of a service or message name */
00060 #define DBUS_MAXIMUM_NAME_LENGTH 256
00061 
00062 /* Header flags */
00063 #define DBUS_HEADER_FLAG_ERROR 0x1
00064   
00065 /* Header fields */
00066 #define DBUS_HEADER_FIELD_NAME    "name"
00067 #define DBUS_HEADER_FIELD_SERVICE "srvc"
00068 #define DBUS_HEADER_FIELD_REPLY   "rply"
00069 #define DBUS_HEADER_FIELD_SENDER  "sndr"
00070 
00071 /* Services */
00072 #define DBUS_SERVICE_DBUS      "org.freedesktop.DBus"
00073 #define DBUS_SERVICE_BROADCAST "org.freedesktop.DBus.Broadcast"
00074 
00075 /* Service owner flags */
00076 #define DBUS_SERVICE_FLAG_PROHIBIT_REPLACEMENT 0x1
00077 #define DBUS_SERVICE_FLAG_REPLACE_EXISTING     0x2
00078 
00079 /* Service replies */
00080 #define DBUS_SERVICE_REPLY_PRIMARY_OWNER  0x1
00081 #define DBUS_SERVICE_REPLY_IN_QUEUE       0x2
00082 #define DBUS_SERVICE_REPLY_SERVICE_EXISTS 0x4
00083 #define DBUS_SERVICE_REPLY_ALREADY_OWNER  0x8
00084 
00085 /* Activation replies */
00086 #define DBUS_ACTIVATION_REPLY_ACTIVATED      0x0
00087 #define DBUS_ACTIVATION_REPLY_ALREADY_ACTIVE 0x1
00088   
00089 /* Messages */
00090 #define DBUS_MESSAGE_ACTIVATE_SERVICE      "org.freedesktop.DBus.ActivateService"  
00091 #define DBUS_MESSAGE_SERVICE_EXISTS        "org.freedesktop.DBus.ServiceExists"
00092 #define DBUS_MESSAGE_HELLO                 "org.freedesktop.DBus.Hello"
00093 #define DBUS_MESSAGE_LIST_SERVICES         "org.freedesktop.DBus.ListServices"
00094 #define DBUS_MESSAGE_ACQUIRE_SERVICE       "org.freedesktop.DBus.AcquireService"
00095 #define DBUS_MESSAGE_SERVICE_ACQUIRED      "org.freedesktop.DBus.ServiceAcquired"
00096 #define DBUS_MESSAGE_SERVICE_CREATED       "org.freedesktop.DBus.ServiceCreated"
00097 #define DBUS_MESSAGE_SERVICE_DELETED       "org.freedesktop.DBus.ServiceDeleted"
00098 #define DBUS_MESSAGE_SERVICE_LOST          "org.freedesktop.DBus.ServiceLost"
00099 
00100 
00101 /* This namespace is reserved for locally-synthesized messages, you can't
00102  * send messages that have this namespace.
00103  */
00104 #define DBUS_NAMESPACE_LOCAL_MESSAGE       "org.freedesktop.Local."
00105 #define DBUS_MESSAGE_LOCAL_DISCONNECT      DBUS_NAMESPACE_LOCAL_MESSAGE"Disconnect"
00106   
00107 #ifdef __cplusplus
00108 }
00109 #endif
00110 
00111 #endif /* DBUS_PROTOCOL_H */

Generated on Wed Oct 22 14:05:03 2003 for D-BUS by doxygen1.3-rc3