1 /* SPDX-License-Identifier: LGPL-2.1+ */
6 This file is part of systemd.
8 Copyright 2014 Lennart Poettering
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.
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.
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/>.
26 #include "_sd-common.h"
28 _SD_BEGIN_DECLARATIONS
;
32 SD_PATH_TEMPORARY
= 0x0ULL
,
33 SD_PATH_TEMPORARY_LARGE
,
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
,
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
,
53 /* Vendor supplied data */
54 SD_PATH_USER_BINARIES
,
55 SD_PATH_USER_LIBRARY_PRIVATE
,
56 SD_PATH_USER_LIBRARY_ARCH
,
59 /* User configuration, state, runtime ... */
60 SD_PATH_USER_CONFIGURATION
, /* takes both actual configuration (like /etc) and state (like /var/lib) */
62 SD_PATH_USER_STATE_CACHE
,
65 SD_PATH_USER
, /* $HOME itself */
66 SD_PATH_USER_DOCUMENTS
,
68 SD_PATH_USER_PICTURES
,
70 SD_PATH_USER_DOWNLOAD
,
72 SD_PATH_USER_TEMPLATES
,
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
,
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
);