chiark / gitweb /
bootctl: add sd-boot support
[elogind.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 enum {
28         /* Temporary files */
29         SD_PATH_TEMPORARY = 0x0ULL,
30         SD_PATH_TEMPORARY_LARGE,
31
32         /* Vendor supplied data */
33         SD_PATH_SYSTEM_BINARIES,
34         SD_PATH_SYSTEM_INCLUDE,
35         SD_PATH_SYSTEM_LIBRARY_PRIVATE,
36         SD_PATH_SYSTEM_LIBRARY_ARCH,
37         SD_PATH_SYSTEM_SHARED,
38         SD_PATH_SYSTEM_CONFIGURATION_FACTORY,
39         SD_PATH_SYSTEM_STATE_FACTORY,
40
41         /* System configuration, runtime, state, ... */
42         SD_PATH_SYSTEM_CONFIGURATION,
43         SD_PATH_SYSTEM_RUNTIME,
44         SD_PATH_SYSTEM_RUNTIME_LOGS,
45         SD_PATH_SYSTEM_STATE_PRIVATE,
46         SD_PATH_SYSTEM_STATE_LOGS,
47         SD_PATH_SYSTEM_STATE_CACHE,
48         SD_PATH_SYSTEM_STATE_SPOOL,
49
50         /* Vendor supplied data */
51         SD_PATH_USER_BINARIES,
52         SD_PATH_USER_LIBRARY_PRIVATE,
53         SD_PATH_USER_LIBRARY_ARCH,
54         SD_PATH_USER_SHARED,
55
56         /* User configuration, state, runtime ... */
57         SD_PATH_USER_CONFIGURATION, /* takes both actual configuration (like /etc) and state (like /var/lib) */
58         SD_PATH_USER_RUNTIME,
59         SD_PATH_USER_STATE_CACHE,
60
61         /* User resources */
62         SD_PATH_USER, /* $HOME itself */
63         SD_PATH_USER_DOCUMENTS,
64         SD_PATH_USER_MUSIC,
65         SD_PATH_USER_PICTURES,
66         SD_PATH_USER_VIDEOS,
67         SD_PATH_USER_DOWNLOAD,
68         SD_PATH_USER_PUBLIC,
69         SD_PATH_USER_TEMPLATES,
70         SD_PATH_USER_DESKTOP,
71
72         /* Search paths */
73         SD_PATH_SEARCH_BINARIES,
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
87 #endif