]> git.ipfire.org Git - thirdparty/systemd.git/blame - src/systemd/sd-bus-protocol.h
Merge pull request #7388 from keszybz/doc-tweak
[thirdparty/systemd.git] / src / systemd / sd-bus-protocol.h
CommitLineData
de1c301e
LP
1#ifndef foosdbusprotocolhfoo
2#define foosdbusprotocolhfoo
3
4/***
5 This file is part of systemd.
6
7 Copyright 2013 Lennart Poettering
8
9 systemd is free software; you can redistribute it and/or modify it
10 under the terms of the GNU Lesser General Public License as published by
11 the Free Software Foundation; either version 2.1 of the License, or
12 (at your option) any later version.
13
14 systemd is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public License
20 along with systemd; If not, see <http://www.gnu.org/licenses/>.
21***/
22
0095c454
LP
23#include "_sd-common.h"
24
25_SD_BEGIN_DECLARATIONS;
b29b8bc2 26
de1c301e
LP
27/* Types of message */
28
de1c301e
LP
29enum {
30 _SD_BUS_MESSAGE_TYPE_INVALID = 0,
40ca29a1
LP
31 SD_BUS_MESSAGE_METHOD_CALL,
32 SD_BUS_MESSAGE_METHOD_RETURN,
33 SD_BUS_MESSAGE_METHOD_ERROR,
34 SD_BUS_MESSAGE_SIGNAL,
de1c301e
LP
35 _SD_BUS_MESSAGE_TYPE_MAX
36};
37
38/* Primitive types */
39
40enum {
41 _SD_BUS_TYPE_INVALID = 0,
42 SD_BUS_TYPE_BYTE = 'y',
43 SD_BUS_TYPE_BOOLEAN = 'b',
44 SD_BUS_TYPE_INT16 = 'n',
45 SD_BUS_TYPE_UINT16 = 'q',
46 SD_BUS_TYPE_INT32 = 'i',
47 SD_BUS_TYPE_UINT32 = 'u',
48 SD_BUS_TYPE_INT64 = 'x',
49 SD_BUS_TYPE_UINT64 = 't',
50 SD_BUS_TYPE_DOUBLE = 'd',
51 SD_BUS_TYPE_STRING = 's',
52 SD_BUS_TYPE_OBJECT_PATH = 'o',
53 SD_BUS_TYPE_SIGNATURE = 'g',
54 SD_BUS_TYPE_UNIX_FD = 'h',
55 SD_BUS_TYPE_ARRAY = 'a',
56 SD_BUS_TYPE_VARIANT = 'v',
57 SD_BUS_TYPE_STRUCT = 'r', /* not actually used in signatures */
58 SD_BUS_TYPE_STRUCT_BEGIN = '(',
59 SD_BUS_TYPE_STRUCT_END = ')',
60 SD_BUS_TYPE_DICT_ENTRY = 'e', /* not actually used in signatures */
61 SD_BUS_TYPE_DICT_ENTRY_BEGIN = '{',
e0c0b07d 62 SD_BUS_TYPE_DICT_ENTRY_END = '}'
de1c301e
LP
63};
64
75297aba
LP
65/* Well-known errors. Note that this is only a sanitized subset of the
66 * errors that the reference implementation generates. */
0461f8cd 67
75297aba
LP
68#define SD_BUS_ERROR_FAILED "org.freedesktop.DBus.Error.Failed"
69#define SD_BUS_ERROR_NO_MEMORY "org.freedesktop.DBus.Error.NoMemory"
70#define SD_BUS_ERROR_SERVICE_UNKNOWN "org.freedesktop.DBus.Error.ServiceUnknown"
71#define SD_BUS_ERROR_NAME_HAS_NO_OWNER "org.freedesktop.DBus.Error.NameHasNoOwner"
72#define SD_BUS_ERROR_NO_REPLY "org.freedesktop.DBus.Error.NoReply"
73#define SD_BUS_ERROR_IO_ERROR "org.freedesktop.DBus.Error.IOError"
74#define SD_BUS_ERROR_BAD_ADDRESS "org.freedesktop.DBus.Error.BadAddress"
75#define SD_BUS_ERROR_NOT_SUPPORTED "org.freedesktop.DBus.Error.NotSupported"
76#define SD_BUS_ERROR_LIMITS_EXCEEDED "org.freedesktop.DBus.Error.LimitsExceeded"
77#define SD_BUS_ERROR_ACCESS_DENIED "org.freedesktop.DBus.Error.AccessDenied"
78#define SD_BUS_ERROR_AUTH_FAILED "org.freedesktop.DBus.Error.AuthFailed"
79#define SD_BUS_ERROR_NO_SERVER "org.freedesktop.DBus.Error.NoServer"
80#define SD_BUS_ERROR_TIMEOUT "org.freedesktop.DBus.Error.Timeout"
81#define SD_BUS_ERROR_NO_NETWORK "org.freedesktop.DBus.Error.NoNetwork"
82#define SD_BUS_ERROR_ADDRESS_IN_USE "org.freedesktop.DBus.Error.AddressInUse"
83#define SD_BUS_ERROR_DISCONNECTED "org.freedesktop.DBus.Error.Disconnected"
84#define SD_BUS_ERROR_INVALID_ARGS "org.freedesktop.DBus.Error.InvalidArgs"
85#define SD_BUS_ERROR_FILE_NOT_FOUND "org.freedesktop.DBus.Error.FileNotFound"
86#define SD_BUS_ERROR_FILE_EXISTS "org.freedesktop.DBus.Error.FileExists"
87#define SD_BUS_ERROR_UNKNOWN_METHOD "org.freedesktop.DBus.Error.UnknownMethod"
88#define SD_BUS_ERROR_UNKNOWN_OBJECT "org.freedesktop.DBus.Error.UnknownObject"
89#define SD_BUS_ERROR_UNKNOWN_INTERFACE "org.freedesktop.DBus.Error.UnknownInterface"
90#define SD_BUS_ERROR_UNKNOWN_PROPERTY "org.freedesktop.DBus.Error.UnknownProperty"
91#define SD_BUS_ERROR_PROPERTY_READ_ONLY "org.freedesktop.DBus.Error.PropertyReadOnly"
92#define SD_BUS_ERROR_UNIX_PROCESS_ID_UNKNOWN "org.freedesktop.DBus.Error.UnixProcessIdUnknown"
93#define SD_BUS_ERROR_INVALID_SIGNATURE "org.freedesktop.DBus.Error.InvalidSignature"
94#define SD_BUS_ERROR_INCONSISTENT_MESSAGE "org.freedesktop.DBus.Error.InconsistentMessage"
53461b74
LP
95#define SD_BUS_ERROR_MATCH_RULE_NOT_FOUND "org.freedesktop.DBus.Error.MatchRuleNotFound"
96#define SD_BUS_ERROR_MATCH_RULE_INVALID "org.freedesktop.DBus.Error.MatchRuleInvalid"
1b3a797f
LP
97#define SD_BUS_ERROR_INTERACTIVE_AUTHORIZATION_REQUIRED \
98 "org.freedesktop.DBus.Error.InteractiveAuthorizationRequired"
75297aba 99
0095c454 100_SD_END_DECLARATIONS;
b29b8bc2 101
de1c301e 102#endif