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