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