diff options
Diffstat (limited to 'Swiften/IDN/IDNConverter.h')
-rw-r--r-- | Swiften/IDN/IDNConverter.h | 40 |
1 files changed, 21 insertions, 19 deletions
diff --git a/Swiften/IDN/IDNConverter.h b/Swiften/IDN/IDNConverter.h index ed3fafb..27ddd78 100644 --- a/Swiften/IDN/IDNConverter.h +++ b/Swiften/IDN/IDNConverter.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2013 Isode Limited. + * Copyright (c) 2013-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ @@ -7,26 +7,28 @@ #pragma once #include <string> + +#include <boost/optional.hpp> + #include <Swiften/Base/API.h> #include <Swiften/Base/SafeByteArray.h> -#include <boost/optional.hpp> namespace Swift { - class SWIFTEN_API IDNConverter { - public: - virtual ~IDNConverter(); - - enum StringPrepProfile { - NamePrep, - XMPPNodePrep, - XMPPResourcePrep, - SASLPrep - }; - - virtual std::string getStringPrepared(const std::string& s, StringPrepProfile profile) = 0; - virtual SafeByteArray getStringPrepared(const SafeByteArray& s, StringPrepProfile profile) = 0; - - // Thread-safe - virtual boost::optional<std::string> getIDNAEncoded(const std::string& s) = 0; - }; + class SWIFTEN_API IDNConverter { + public: + virtual ~IDNConverter(); + + enum StringPrepProfile { + NamePrep, + XMPPNodePrep, + XMPPResourcePrep, + SASLPrep + }; + + virtual std::string getStringPrepared(const std::string& s, StringPrepProfile profile) = 0; + virtual SafeByteArray getStringPrepared(const SafeByteArray& s, StringPrepProfile profile) = 0; + + // Thread-safe + virtual boost::optional<std::string> getIDNAEncoded(const std::string& s) = 0; + }; } |