D-Bus
1.10.12
|
00001 /* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */ 00002 /* dbus-shared.h Stuff used by both dbus/dbus.h low-level and C/C++ binding APIs 00003 * 00004 * Copyright (C) 2004 Red Hat, Inc. 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 00021 * 00022 */ 00023 00024 #ifndef DBUS_SHARED_H 00025 #define DBUS_SHARED_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 #if 0 00034 } /* avoids confusing emacs indentation */ 00035 #endif 00036 #endif 00037 00038 /* Normally docs are in .c files, but there isn't a .c file for this. */ 00056 typedef enum 00057 { 00058 DBUS_BUS_SESSION, 00059 DBUS_BUS_SYSTEM, 00060 DBUS_BUS_STARTER 00061 } DBusBusType; 00062 00066 typedef enum 00067 { 00068 DBUS_HANDLER_RESULT_HANDLED, 00069 DBUS_HANDLER_RESULT_NOT_YET_HANDLED, 00070 DBUS_HANDLER_RESULT_NEED_MEMORY 00071 } DBusHandlerResult; 00072 00073 /* Bus names */ 00074 00076 #define DBUS_SERVICE_DBUS "org.freedesktop.DBus" 00077 00078 /* Paths */ 00080 #define DBUS_PATH_DBUS "/org/freedesktop/DBus" 00081 00082 #define DBUS_PATH_LOCAL "/org/freedesktop/DBus/Local" 00083 00084 /* Interfaces, these #define don't do much other than 00085 * catch typos at compile time 00086 */ 00088 #define DBUS_INTERFACE_DBUS "org.freedesktop.DBus" 00089 00090 #define DBUS_INTERFACE_MONITORING "org.freedesktop.DBus.Monitoring" 00091 00093 #define DBUS_INTERFACE_VERBOSE "org.freedesktop.DBus.Verbose" 00094 00095 #define DBUS_INTERFACE_INTROSPECTABLE "org.freedesktop.DBus.Introspectable" 00096 00097 #define DBUS_INTERFACE_PROPERTIES "org.freedesktop.DBus.Properties" 00098 00099 #define DBUS_INTERFACE_PEER "org.freedesktop.DBus.Peer" 00100 00105 #define DBUS_INTERFACE_LOCAL "org.freedesktop.DBus.Local" 00106 00107 /* Owner flags */ 00108 #define DBUS_NAME_FLAG_ALLOW_REPLACEMENT 0x1 00109 #define DBUS_NAME_FLAG_REPLACE_EXISTING 0x2 00110 #define DBUS_NAME_FLAG_DO_NOT_QUEUE 0x4 00112 /* Replies to request for a name */ 00113 #define DBUS_REQUEST_NAME_REPLY_PRIMARY_OWNER 1 00114 #define DBUS_REQUEST_NAME_REPLY_IN_QUEUE 2 00115 #define DBUS_REQUEST_NAME_REPLY_EXISTS 3 00116 #define DBUS_REQUEST_NAME_REPLY_ALREADY_OWNER 4 00118 /* Replies to releasing a name */ 00119 #define DBUS_RELEASE_NAME_REPLY_RELEASED 1 00120 #define DBUS_RELEASE_NAME_REPLY_NON_EXISTENT 2 00121 #define DBUS_RELEASE_NAME_REPLY_NOT_OWNER 3 00123 /* Replies to service starts */ 00124 #define DBUS_START_REPLY_SUCCESS 1 00125 #define DBUS_START_REPLY_ALREADY_RUNNING 2 00129 #ifdef __cplusplus 00130 #if 0 00131 { /* avoids confusing emacs indentation */ 00132 #endif 00133 } 00134 #endif 00135 00136 #endif /* DBUS_SHARED_H */