diff options
Diffstat (limited to 'Swift/Controllers/XMPPEvents/MessageEvent.h')
-rw-r--r-- | Swift/Controllers/XMPPEvents/MessageEvent.h | 49 |
1 files changed, 24 insertions, 25 deletions
diff --git a/Swift/Controllers/XMPPEvents/MessageEvent.h b/Swift/Controllers/XMPPEvents/MessageEvent.h index b5b1215..7af2be6 100644 --- a/Swift/Controllers/XMPPEvents/MessageEvent.h +++ b/Swift/Controllers/XMPPEvents/MessageEvent.h @@ -4,45 +4,44 @@ * See the COPYING file for more information. */ -#pragma once +#pragma once #include <cassert> - -#include <boost/shared_ptr.hpp> +#include <memory> #include <Swiften/Elements/Message.h> #include <Swift/Controllers/XMPPEvents/StanzaEvent.h> namespace Swift { - class MessageEvent : public StanzaEvent { - public: - typedef boost::shared_ptr<MessageEvent> ref; + class MessageEvent : public StanzaEvent { + public: + typedef std::shared_ptr<MessageEvent> ref; - MessageEvent(boost::shared_ptr<Message> stanza) : stanza_(stanza), targetsMe_(true) {} + MessageEvent(std::shared_ptr<Message> stanza) : stanza_(stanza), targetsMe_(true) {} - boost::shared_ptr<Message> getStanza() {return stanza_;} + std::shared_ptr<Message> getStanza() {return stanza_;} - bool isReadable() { - return getStanza()->isError() || !getStanza()->getBody().get_value_or("").empty(); - } + bool isReadable() { + return getStanza()->isError() || !getStanza()->getBody().get_value_or("").empty(); + } - void read() { - assert (isReadable()); - conclude(); - } + void read() { + assert (isReadable()); + conclude(); + } - void setTargetsMe(bool targetsMe) { - targetsMe_ = targetsMe; - } + void setTargetsMe(bool targetsMe) { + targetsMe_ = targetsMe; + } - bool targetsMe() const { - return targetsMe_; - } + bool targetsMe() const { + return targetsMe_; + } - private: - boost::shared_ptr<Message> stanza_; - bool targetsMe_; - }; + private: + std::shared_ptr<Message> stanza_; + bool targetsMe_; + }; } |