D-Bus  1.8.2
dbus-shared.h
1 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
2 /* dbus-shared.h Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs
3  *
4  * Copyright (C) 2004 Red Hat, Inc.
5  *
6  * Licensed under the Academic Free License version 2.1
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  *
22  */
23 
24 #ifndef DBUS_SHARED_H
25 #define DBUS_SHARED_H
26 
27 /* Don't include anything in here from anywhere else. It's
28  * intended for use by any random library.
29  */
30 
31 #ifdef __cplusplus
32 extern "C" {
33 #if 0
34 } /* avoids confusing emacs indentation */
35 #endif
36 #endif
37 
38 /* Normally docs are in .c files, but there isn't a .c file for this. */
56 typedef enum
57 {
61 } DBusBusType;
62 
66 typedef enum
67 {
73 
74 /* Bus names */
75 
77 #define DBUS_SERVICE_DBUS "org.freedesktop.DBus"
78 
79 /* Paths */
81 #define DBUS_PATH_DBUS "/org/freedesktop/DBus"
82 
83 #define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local"
84 
85 /* Interfaces, these #define don't do much other than
86  * catch typos at compile time
87  */
89 #define DBUS_INTERFACE_DBUS "org.freedesktop.DBus"
90 
91 #define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable"
92 
93 #define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties"
94 
95 #define DBUS_INTERFACE_PEER "org.freedesktop.DBus.Peer"
96 
101 #define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local"
102 
103 /* Owner flags */
104 #define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1
105 #define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2
106 #define DBUS_NAME_FLAG_DO_NOT_QUEUE 0x4
108 /* Replies to request for a name */
109 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1
110 #define DBUS_REQUEST_NAME_REPLY_IN_QUEUE 2
111 #define DBUS_REQUEST_NAME_REPLY_EXISTS 3
112 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4
114 /* Replies to releasing a name */
115 #define DBUS_RELEASE_NAME_REPLY_RELEASED 1
116 #define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT 2
117 #define DBUS_RELEASE_NAME_REPLY_NOT_OWNER 3
119 /* Replies to service starts */
120 #define DBUS_START_REPLY_SUCCESS 1
121 #define DBUS_START_REPLY_ALREADY_RUNNING 2
125 #ifdef __cplusplus
126 #if 0
127 { /* avoids confusing emacs indentation */
128 #endif
129 }
130 #endif
131 
132 #endif /* DBUS_SHARED_H */