aboutsummaryrefslogtreecommitdiffstats
path: root/src/fs/Charset.hxx
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/fs/Charset.hxx28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/fs/Charset.hxx b/src/fs/Charset.hxx
index 0a71d7c58..49ad07820 100644
--- a/src/fs/Charset.hxx
+++ b/src/fs/Charset.hxx
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2003-2014 The Music Player Daemon Project
+ * Copyright (C) 2003-2015 The Music Player Daemon Project
* http://www.musicpd.org
*
* This program is free software; you can redistribute it and/or modify
@@ -22,8 +22,13 @@
#include "check.h"
#include "Compiler.h"
+#include "Traits.hxx"
-#include <string>
+#if defined(HAVE_ICU) || defined(HAVE_GLIB)
+#define HAVE_FS_CHARSET
+#endif
+
+class Error;
/**
* Gets file system character set name.
@@ -32,19 +37,26 @@ gcc_const
const char *
GetFSCharset();
+bool
+SetFSCharset(const char *charset, Error &error);
+
void
-SetFSCharset(const char *charset);
+DeinitFSCharset();
/**
* Convert the path to UTF-8.
* Returns empty string on error.
*/
gcc_pure gcc_nonnull_all
-std::string
-PathToUTF8(const char *path_fs);
+PathTraitsUTF8::string
+PathToUTF8(PathTraitsFS::const_pointer path_fs);
-gcc_malloc gcc_nonnull_all
-char *
-PathFromUTF8(const char *path_utf8);
+/**
+ * Convert the path from UTF-8.
+ * Returns empty string on error.
+ */
+gcc_pure gcc_nonnull_all
+PathTraitsFS::string
+PathFromUTF8(PathTraitsUTF8::const_pointer path_utf8);
#endif