libXDGdirs v1.1.1-2-g54a653b
An implementation of XDG Base Directory Specification
Loading...
Searching...
No Matches
xdgdirs.h
Go to the documentation of this file.
1#ifndef XDGDIRS_H_
2#define XDGDIRS_H_
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stddef.h>
9
15#define XDGDIRS_VER "1.1.1"
16
18#define XDGBDS_VER "0.8"
19
22 const char* raw;
23 const char** list;
24 size_t size;
25};
26
27typedef const struct xdgDirsList_t xdgDirsList;
28
31
41int xdgDirs_init(void);
42
49void xdgDirs_clear(void);
50
55void xdgDirs_refresh(void);
56
58
61
65
71const char* xdgDataHome(void);
72
78const char* xdgStateHome(void);
79
85const char* xdgConfigHome(void);
86
92const char* xdgCacheHome(void);
93
100const char* xdgRuntimeDir(void);
101
103
107
117
125
127
135const char* xdgCustomVar(const char* custom);
136
138
139#ifdef __cplusplus
140} // extern "C"
141#endif
142
143#endif // XDGDIRS_H_
void xdgDirs_refresh(void)
Read environment variables again.
void xdgDirs_clear(void)
Clear cached data.
int xdgDirs_init(void)
Explicitly read variables before first use.
xdgDirsList * xdgConfigDirs(void)
Value of $XDG_CONFIG_DIRS.
xdgDirsList * xdgDataDirs(void)
Value of $XDG_DATA_DIRS.
const char * xdgRuntimeDir(void)
Value of $XDG_RUNTIME_DIR.
const char * xdgCacheHome(void)
Value of $XDG_CACHE_HOME.
const char * xdgConfigHome(void)
Value of $XDG_CONFIG_HOME.
const char * xdgStateHome(void)
Value of $XDG_STATE_HOME.
const char * xdgDataHome(void)
Value of $XDG_DATA_HOME.
const char * xdgCustomVar(const char *custom)
User definied custom XDG variables.
Container for environment variables which are colon separated lists.
Definition xdgdirs.h:21
const char ** list
Null terminated array containing entries from environment variable.
Definition xdgdirs.h:23
size_t size
Number of entries in environment variable.
Definition xdgdirs.h:24
const char * raw
Raw value of environment variable.
Definition xdgdirs.h:22