00001
00002
00003
00004
00005
00006
00007 #pragma once
00008
00009 #include <vector>
00010 #include <string>
00011 #include <boost/optional.hpp>
00012
00013 #include <Swiften/Elements/Element.h>
00014 #include <Swiften/Base/SafeByteArray.h>
00015
00016 namespace Swift {
00017 class AuthRequest : public Element {
00018 public:
00019 AuthRequest(const std::string& mechanism = "") : mechanism_(mechanism) {
00020 }
00021
00022 AuthRequest(const std::string& mechanism, const SafeByteArray& message) :
00023 mechanism_(mechanism), message_(message) {
00024 }
00025
00026 AuthRequest(const std::string& mechanism, const boost::optional<SafeByteArray>& message) :
00027 mechanism_(mechanism), message_(message) {
00028 }
00029
00030 const boost::optional<SafeByteArray>& getMessage() const {
00031 return message_;
00032 }
00033
00034 void setMessage(const SafeByteArray& message) {
00035 message_ = boost::optional<SafeByteArray>(message);
00036 }
00037
00038 const std::string& getMechanism() const {
00039 return mechanism_;
00040 }
00041
00042 void setMechanism(const std::string& mechanism) {
00043 mechanism_ = mechanism;
00044 }
00045
00046 private:
00047 std::string mechanism_;
00048 boost::optional<SafeByteArray> message_;
00049 };
00050 }