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