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