]> git.ipfire.org Git - thirdparty/systemd.git/blob - src/systemd/sd-path.h
tree-wide: drop 'This file is part of systemd' blurb
[thirdparty/systemd.git] / src / systemd / sd-path.h
1 /* SPDX-License-Identifier: LGPL-2.1+ */
2 #ifndef foosdpathhfoo
3 #define foosdpathhfoo
4
5 /***
6 Copyright 2014 Lennart Poettering
7
8 systemd is free software; you can redistribute it and/or modify it
9 under the terms of the GNU Lesser General Public License as published by
10 the Free Software Foundation; either version 2.1 of the License, or
11 (at your option) any later version.
12
13 systemd is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 Lesser General Public License for more details.
17
18 You should have received a copy of the GNU Lesser General Public License
19 along with systemd; If not, see <http://www.gnu.org/licenses/>.
20 ***/
21
22 #include <inttypes.h>
23
24 #include "_sd-common.h"
25
26 _SD_BEGIN_DECLARATIONS;
27
28 enum {
29 /* Temporary files */
30 SD_PATH_TEMPORARY = 0x0ULL,
31 SD_PATH_TEMPORARY_LARGE,
32
33 /* Vendor supplied data */
34 SD_PATH_SYSTEM_BINARIES,
35 SD_PATH_SYSTEM_INCLUDE,
36 SD_PATH_SYSTEM_LIBRARY_PRIVATE,
37 SD_PATH_SYSTEM_LIBRARY_ARCH,
38 SD_PATH_SYSTEM_SHARED,
39 SD_PATH_SYSTEM_CONFIGURATION_FACTORY,
40 SD_PATH_SYSTEM_STATE_FACTORY,
41
42 /* System configuration, runtime, state, ... */
43 SD_PATH_SYSTEM_CONFIGURATION,
44 SD_PATH_SYSTEM_RUNTIME,
45 SD_PATH_SYSTEM_RUNTIME_LOGS,
46 SD_PATH_SYSTEM_STATE_PRIVATE,
47 SD_PATH_SYSTEM_STATE_LOGS,
48 SD_PATH_SYSTEM_STATE_CACHE,
49 SD_PATH_SYSTEM_STATE_SPOOL,
50
51 /* Vendor supplied data */
52 SD_PATH_USER_BINARIES,
53 SD_PATH_USER_LIBRARY_PRIVATE,
54 SD_PATH_USER_LIBRARY_ARCH,
55 SD_PATH_USER_SHARED,
56
57 /* User configuration, state, runtime ... */
58 SD_PATH_USER_CONFIGURATION, /* takes both actual configuration (like /etc) and state (like /var/lib) */
59 SD_PATH_USER_RUNTIME,
60 SD_PATH_USER_STATE_CACHE,
61
62 /* User resources */
63 SD_PATH_USER, /* $HOME itself */
64 SD_PATH_USER_DOCUMENTS,
65 SD_PATH_USER_MUSIC,
66 SD_PATH_USER_PICTURES,
67 SD_PATH_USER_VIDEOS,
68 SD_PATH_USER_DOWNLOAD,
69 SD_PATH_USER_PUBLIC,
70 SD_PATH_USER_TEMPLATES,
71 SD_PATH_USER_DESKTOP,
72
73 /* Search paths */
74 SD_PATH_SEARCH_BINARIES,
75 SD_PATH_SEARCH_BINARIES_DEFAULT,
76 SD_PATH_SEARCH_LIBRARY_PRIVATE,
77 SD_PATH_SEARCH_LIBRARY_ARCH,
78 SD_PATH_SEARCH_SHARED,
79 SD_PATH_SEARCH_CONFIGURATION_FACTORY,
80 SD_PATH_SEARCH_STATE_FACTORY,
81 SD_PATH_SEARCH_CONFIGURATION,
82
83 _SD_PATH_MAX,
84 };
85
86 int sd_path_home(uint64_t type, const char *suffix, char **path);
87 int sd_path_search(uint64_t type, const char *suffix, char ***paths);
88
89 _SD_END_DECLARATIONS;
90
91 #endif