]>
Commit | Line | Data |
---|---|---|
52ad194e | 1 | /* SPDX-License-Identifier: LGPL-2.1+ */ |
e842803a MB |
2 | #ifndef foosdpathhfoo |
3 | #define foosdpathhfoo | |
4 | ||
5 | /*** | |
e842803a MB |
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 | |
17 | along with systemd; If not, see <http://www.gnu.org/licenses/>. | |
18 | ***/ | |
19 | ||
20 | #include <inttypes.h> | |
21 | ||
db2df898 MP |
22 | #include "_sd-common.h" |
23 | ||
24 | _SD_BEGIN_DECLARATIONS; | |
25 | ||
e842803a MB |
26 | enum { |
27 | /* Temporary files */ | |
6e866b33 | 28 | SD_PATH_TEMPORARY, |
e842803a MB |
29 | SD_PATH_TEMPORARY_LARGE, |
30 | ||
31 | /* Vendor supplied data */ | |
32 | SD_PATH_SYSTEM_BINARIES, | |
33 | SD_PATH_SYSTEM_INCLUDE, | |
34 | SD_PATH_SYSTEM_LIBRARY_PRIVATE, | |
35 | SD_PATH_SYSTEM_LIBRARY_ARCH, | |
36 | SD_PATH_SYSTEM_SHARED, | |
37 | SD_PATH_SYSTEM_CONFIGURATION_FACTORY, | |
38 | SD_PATH_SYSTEM_STATE_FACTORY, | |
39 | ||
40 | /* System configuration, runtime, state, ... */ | |
41 | SD_PATH_SYSTEM_CONFIGURATION, | |
42 | SD_PATH_SYSTEM_RUNTIME, | |
43 | SD_PATH_SYSTEM_RUNTIME_LOGS, | |
44 | SD_PATH_SYSTEM_STATE_PRIVATE, | |
45 | SD_PATH_SYSTEM_STATE_LOGS, | |
46 | SD_PATH_SYSTEM_STATE_CACHE, | |
47 | SD_PATH_SYSTEM_STATE_SPOOL, | |
48 | ||
49 | /* Vendor supplied data */ | |
50 | SD_PATH_USER_BINARIES, | |
51 | SD_PATH_USER_LIBRARY_PRIVATE, | |
52 | SD_PATH_USER_LIBRARY_ARCH, | |
53 | SD_PATH_USER_SHARED, | |
54 | ||
55 | /* User configuration, state, runtime ... */ | |
56 | SD_PATH_USER_CONFIGURATION, /* takes both actual configuration (like /etc) and state (like /var/lib) */ | |
57 | SD_PATH_USER_RUNTIME, | |
58 | SD_PATH_USER_STATE_CACHE, | |
59 | ||
60 | /* User resources */ | |
61 | SD_PATH_USER, /* $HOME itself */ | |
62 | SD_PATH_USER_DOCUMENTS, | |
63 | SD_PATH_USER_MUSIC, | |
64 | SD_PATH_USER_PICTURES, | |
65 | SD_PATH_USER_VIDEOS, | |
66 | SD_PATH_USER_DOWNLOAD, | |
67 | SD_PATH_USER_PUBLIC, | |
68 | SD_PATH_USER_TEMPLATES, | |
69 | SD_PATH_USER_DESKTOP, | |
70 | ||
71 | /* Search paths */ | |
72 | SD_PATH_SEARCH_BINARIES, | |
b012e921 | 73 | SD_PATH_SEARCH_BINARIES_DEFAULT, |
e842803a MB |
74 | SD_PATH_SEARCH_LIBRARY_PRIVATE, |
75 | SD_PATH_SEARCH_LIBRARY_ARCH, | |
76 | SD_PATH_SEARCH_SHARED, | |
77 | SD_PATH_SEARCH_CONFIGURATION_FACTORY, | |
78 | SD_PATH_SEARCH_STATE_FACTORY, | |
79 | SD_PATH_SEARCH_CONFIGURATION, | |
80 | ||
81 | _SD_PATH_MAX, | |
82 | }; | |
83 | ||
84 | int sd_path_home(uint64_t type, const char *suffix, char **path); | |
85 | int sd_path_search(uint64_t type, const char *suffix, char ***paths); | |
86 | ||
db2df898 MP |
87 | _SD_END_DECLARATIONS; |
88 | ||
e842803a | 89 | #endif |