diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-07-13 19:01:20 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-07-13 19:01:20 (GMT) |
commit | 92614cf44bc98c3aae240a8089452fb950af5c7e (patch) | |
tree | 20b25f0bfcc96ddde992eaa8b0640ca68dfd0280 /Swiften/SASL/PLAINMessage.h | |
parent | 6ca206b0d0645e50a8a2c59ebd134f9c0f164b9b (diff) | |
download | swift-contrib-92614cf44bc98c3aae240a8089452fb950af5c7e.zip swift-contrib-92614cf44bc98c3aae240a8089452fb950af5c7e.tar.bz2 |
Added PLAIN SASL message parsing.
Diffstat (limited to 'Swiften/SASL/PLAINMessage.h')
-rw-r--r-- | Swiften/SASL/PLAINMessage.h | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/Swiften/SASL/PLAINMessage.h b/Swiften/SASL/PLAINMessage.h index 14a51f2..76de4f5 100644 --- a/Swiften/SASL/PLAINMessage.h +++ b/Swiften/SASL/PLAINMessage.h @@ -1,22 +1,31 @@ -#ifndef SASL_PLAINMESSAGE_H -#define SASL_PLAINMESSAGE_H +#pragma once #include "Swiften/Base/String.h" #include "Swiften/Base/ByteArray.h" namespace Swift { - class PLAINMessage - { + class PLAINMessage { public: PLAINMessage(const String& authcid, const String& password, const String& authzid = ""); + PLAINMessage(const ByteArray& value); - const ByteArray& getValue() { - return value_; + ByteArray getValue() const; + + const String& getAuthenticationID() const { + return authcid; + } + + const String& getPassword() const { + return password; + } + + const String& getAuthorizationID() const { + return authzid; } private: - ByteArray value_; + String authcid; + String authzid; + String password; }; } - -#endif |