diff options
Diffstat (limited to 'Swiften/SASL/DIGESTMD5Properties.h')
-rw-r--r-- | Swiften/SASL/DIGESTMD5Properties.h | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/Swiften/SASL/DIGESTMD5Properties.h b/Swiften/SASL/DIGESTMD5Properties.h new file mode 100644 index 0000000..a92f99b --- /dev/null +++ b/Swiften/SASL/DIGESTMD5Properties.h @@ -0,0 +1,32 @@ +/* + * Copyright (c) 2010 Remko Tronçon + * Licensed under the GNU General Public License v3. + * See Documentation/Licenses/GPLv3.txt for more information. + */ + +#pragma once + +#include <map> + +#include "Swiften/Base/String.h" +#include "Swiften/Base/ByteArray.h" + +namespace Swift { + class DIGESTMD5Properties { + public: + DIGESTMD5Properties(); + + void setValue(const String& key, const String& value); + + ByteArray serialize() const; + + static DIGESTMD5Properties parse(const ByteArray&); + + private: + static bool isQuoted(const String& property); + + private: + typedef std::multimap<String, ByteArray> DIGESTMD5PropertiesMap; + DIGESTMD5PropertiesMap properties; + }; +} |