]>
Commit | Line | Data |
---|---|---|
db9ecf05 | 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
9a00f57a LP |
2 | #ifndef foosdpathhfoo |
3 | #define foosdpathhfoo | |
4 | ||
5 | /*** | |
9a00f57a LP |
6 | systemd is free software; you can redistribute it and/or modify it |
7 | under the terms of the GNU Lesser General Public License as published by | |
8 | the Free Software Foundation; either version 2.1 of the License, or | |
9 | (at your option) any later version. | |
10 | ||
11 | systemd is distributed in the hope that it will be useful, but | |
12 | WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 | Lesser General Public License for more details. | |
15 | ||
16 | You should have received a copy of the GNU Lesser General Public License | |
85fce6f4 | 17 | along with systemd; If not, see <https://www.gnu.org/licenses/>. |
9a00f57a LP |
18 | ***/ |
19 | ||
04c01369 LP |
20 | #include "_sd-common.h" |
21 | ||
22 | _SD_BEGIN_DECLARATIONS; | |
23 | ||
9a00f57a LP |
24 | enum { |
25 | /* Temporary files */ | |
067e995c | 26 | SD_PATH_TEMPORARY, |
9a00f57a LP |
27 | SD_PATH_TEMPORARY_LARGE, |
28 | ||
29 | /* Vendor supplied data */ | |
30 | SD_PATH_SYSTEM_BINARIES, | |
31 | SD_PATH_SYSTEM_INCLUDE, | |
32 | SD_PATH_SYSTEM_LIBRARY_PRIVATE, | |
33 | SD_PATH_SYSTEM_LIBRARY_ARCH, | |
34 | SD_PATH_SYSTEM_SHARED, | |
35 | SD_PATH_SYSTEM_CONFIGURATION_FACTORY, | |
36 | SD_PATH_SYSTEM_STATE_FACTORY, | |
37 | ||
38 | /* System configuration, runtime, state, ... */ | |
39 | SD_PATH_SYSTEM_CONFIGURATION, | |
40 | SD_PATH_SYSTEM_RUNTIME, | |
41 | SD_PATH_SYSTEM_RUNTIME_LOGS, | |
42 | SD_PATH_SYSTEM_STATE_PRIVATE, | |
43 | SD_PATH_SYSTEM_STATE_LOGS, | |
44 | SD_PATH_SYSTEM_STATE_CACHE, | |
45 | SD_PATH_SYSTEM_STATE_SPOOL, | |
46 | ||
47 | /* Vendor supplied data */ | |
48 | SD_PATH_USER_BINARIES, | |
49 | SD_PATH_USER_LIBRARY_PRIVATE, | |
50 | SD_PATH_USER_LIBRARY_ARCH, | |
51 | SD_PATH_USER_SHARED, | |
52 | ||
53 | /* User configuration, state, runtime ... */ | |
9a653235 | 54 | SD_PATH_USER_CONFIGURATION, |
9a00f57a LP |
55 | SD_PATH_USER_RUNTIME, |
56 | SD_PATH_USER_STATE_CACHE, | |
9a653235 | 57 | /* → SD_PATH_USER_STATE_PRIVATE is added at the bottom */ |
9a00f57a LP |
58 | |
59 | /* User resources */ | |
60 | SD_PATH_USER, /* $HOME itself */ | |
61 | SD_PATH_USER_DOCUMENTS, | |
62 | SD_PATH_USER_MUSIC, | |
63 | SD_PATH_USER_PICTURES, | |
64 | SD_PATH_USER_VIDEOS, | |
65 | SD_PATH_USER_DOWNLOAD, | |
66 | SD_PATH_USER_PUBLIC, | |
67 | SD_PATH_USER_TEMPLATES, | |
68 | SD_PATH_USER_DESKTOP, | |
69 | ||
70 | /* Search paths */ | |
71 | SD_PATH_SEARCH_BINARIES, | |
e12d446b | 72 | SD_PATH_SEARCH_BINARIES_DEFAULT, |
9a00f57a LP |
73 | SD_PATH_SEARCH_LIBRARY_PRIVATE, |
74 | SD_PATH_SEARCH_LIBRARY_ARCH, | |
75 | SD_PATH_SEARCH_SHARED, | |
76 | SD_PATH_SEARCH_CONFIGURATION_FACTORY, | |
77 | SD_PATH_SEARCH_STATE_FACTORY, | |
78 | SD_PATH_SEARCH_CONFIGURATION, | |
79 | ||
ccdf03b9 LP |
80 | /* Various systemd paths, generally mirroring systemd.pc — Except we drop the "dir" suffix (and |
81 | * replaces "path" by "search"), since this API is about dirs/paths anyway, and contains "path" | |
82 | * already in the prefix */ | |
83 | SD_PATH_SYSTEMD_UTIL, | |
4bbfc9ea | 84 | |
ccdf03b9 LP |
85 | SD_PATH_SYSTEMD_SYSTEM_UNIT, |
86 | SD_PATH_SYSTEMD_SYSTEM_PRESET, | |
87 | SD_PATH_SYSTEMD_SYSTEM_CONF, | |
88 | SD_PATH_SYSTEMD_USER_UNIT, | |
89 | SD_PATH_SYSTEMD_USER_PRESET, | |
90 | SD_PATH_SYSTEMD_USER_CONF, | |
4a8c3951 | 91 | SD_PATH_SYSTEMD_INITRD_PRESET, |
ccdf03b9 LP |
92 | |
93 | SD_PATH_SYSTEMD_SEARCH_SYSTEM_UNIT, | |
94 | SD_PATH_SYSTEMD_SEARCH_USER_UNIT, | |
95 | ||
96 | SD_PATH_SYSTEMD_SYSTEM_GENERATOR, | |
97 | SD_PATH_SYSTEMD_USER_GENERATOR, | |
98 | SD_PATH_SYSTEMD_SEARCH_SYSTEM_GENERATOR, | |
99 | SD_PATH_SYSTEMD_SEARCH_USER_GENERATOR, | |
100 | ||
101 | SD_PATH_SYSTEMD_SLEEP, | |
102 | SD_PATH_SYSTEMD_SHUTDOWN, | |
103 | ||
104 | SD_PATH_TMPFILES, | |
105 | SD_PATH_SYSUSERS, | |
106 | SD_PATH_SYSCTL, | |
107 | SD_PATH_BINFMT, | |
108 | SD_PATH_MODULES_LOAD, | |
109 | SD_PATH_CATALOG, | |
9c5bb203 | 110 | |
f1bb691a | 111 | /* systemd-networkd search paths */ |
ccdf03b9 | 112 | SD_PATH_SYSTEMD_SEARCH_NETWORK, |
f1bb691a | 113 | |
71006538 DT |
114 | /* systemd environment generators */ |
115 | SD_PATH_SYSTEMD_SYSTEM_ENVIRONMENT_GENERATOR, | |
116 | SD_PATH_SYSTEMD_USER_ENVIRONMENT_GENERATOR, | |
117 | SD_PATH_SYSTEMD_SEARCH_SYSTEM_ENVIRONMENT_GENERATOR, | |
118 | SD_PATH_SYSTEMD_SEARCH_USER_ENVIRONMENT_GENERATOR, | |
119 | ||
9a653235 LP |
120 | SD_PATH_USER_STATE_PRIVATE, |
121 | ||
d2cd1893 LP |
122 | /* credential store */ |
123 | SD_PATH_SYSTEM_CREDENTIAL_STORE, | |
124 | SD_PATH_SYSTEM_SEARCH_CREDENTIAL_STORE, | |
125 | SD_PATH_SYSTEM_CREDENTIAL_STORE_ENCRYPTED, | |
126 | SD_PATH_SYSTEM_SEARCH_CREDENTIAL_STORE_ENCRYPTED, | |
127 | SD_PATH_USER_CREDENTIAL_STORE, | |
128 | SD_PATH_USER_SEARCH_CREDENTIAL_STORE, | |
129 | SD_PATH_USER_CREDENTIAL_STORE_ENCRYPTED, | |
130 | SD_PATH_USER_SEARCH_CREDENTIAL_STORE_ENCRYPTED, | |
131 | ||
5476cb98 | 132 | _SD_PATH_MAX |
9a00f57a LP |
133 | }; |
134 | ||
2b19bed7 MY |
135 | int sd_path_lookup(uint64_t type, const char *suffix, char **ret); |
136 | int sd_path_lookup_strv(uint64_t type, const char *suffix, char ***ret); | |
9a00f57a | 137 | |
04c01369 LP |
138 | _SD_END_DECLARATIONS; |
139 | ||
9a00f57a | 140 | #endif |