mpd/src/fs/Charset.hxx

42 lines
708 B
C++
Raw Normal View History

// SPDX-License-Identifier: GPL-2.0-or-later
// Copyright The Music Player Daemon Project
#ifndef MPD_FS_CHARSET_HXX
#define MPD_FS_CHARSET_HXX
#include "Traits.hxx"
2014-11-29 23:35:49 +01:00
/**
* Gets file system character set name.
*/
2021-10-13 11:28:04 +02:00
[[gnu::const]]
const char *
GetFSCharset() noexcept;
/**
* Throws std::runtime_error on error.
*/
void
SetFSCharset(const char *charset);
2014-11-29 23:35:18 +01:00
void
DeinitFSCharset() noexcept;
2014-11-29 23:35:18 +01:00
/**
* Convert the path to UTF-8.
2016-04-12 21:24:16 +02:00
*
* Throws std::runtime_error on error.
*/
PathTraitsUTF8::string
PathToUTF8(PathTraitsFS::string_view path_fs);
/**
* Convert the path from UTF-8.
2016-04-12 21:24:16 +02:00
*
* Throws std::runtime_error on error.
*/
PathTraitsFS::string
PathFromUTF8(PathTraitsUTF8::string_view path_utf8);
#endif