aboutsummaryrefslogtreecommitdiff
path: root/src/xdg.hpp
diff options
context:
space:
mode:
authorFelix Morgner <felix.morgner@gmail.com>2018-11-30 10:48:44 +0100
committerFelix Morgner <felix.morgner@gmail.com>2018-11-30 10:48:44 +0100
commit5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b (patch)
tree27fe6f0b428a1e02f7fe7c677795bdd989e0498c /src/xdg.hpp
parent543e91dc65d839864b42114b353d0c30db4dcdd1 (diff)
downloadwanda-5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b.tar.xz
wanda-5b2974cd16b5d2841b72c7d0cc4a34469a8ded5b.zip
core: implement basic XDG Base Specification support
Diffstat (limited to 'src/xdg.hpp')
-rw-r--r--src/xdg.hpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/xdg.hpp b/src/xdg.hpp
new file mode 100644
index 0000000..a5dace0
--- /dev/null
+++ b/src/xdg.hpp
@@ -0,0 +1,25 @@
+#ifndef WANDA_XDG_HPP
+#define WANDA_XDG_HPP
+
+#include "environment.hpp"
+
+#include <cstddef>
+#include <filesystem>
+#include <type_traits>
+
+namespace wanda
+{
+enum struct xdg_directory : std::underlying_type_t<std::byte>
+{
+ data_home,
+ config_home,
+ cache_home,
+ runtime_dir,
+};
+
+std::string xdg_variable(xdg_directory directory);
+
+std::filesystem::path xdg_path_for(xdg_directory directory, environment const &environment);
+} // namespace wanda
+
+#endif \ No newline at end of file