summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h')
-rw-r--r--Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h65
1 files changed, 33 insertions, 32 deletions
diff --git a/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h b/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
index 1eb9cb1..8e3fd32 100644
--- a/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
+++ b/Swift/Controllers/XMPPEvents/SubscriptionRequestEvent.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 Isode Limited.
+ * Copyright (c) 2010-2016 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -7,40 +7,41 @@
#pragma once
#include <cassert>
+#include <memory>
+#include <string>
-#include "Swiften/Base/boost_bsignals.h"
-#include <boost/shared_ptr.hpp>
+#include <boost/signals2.hpp>
-#include "Swift/Controllers/XMPPEvents/StanzaEvent.h"
-#include <string>
-#include "Swiften/JID/JID.h"
+#include <Swiften/JID/JID.h>
+
+#include <Swift/Controllers/XMPPEvents/StanzaEvent.h>
namespace Swift {
- class SubscriptionRequestEvent : public StanzaEvent {
- public:
- SubscriptionRequestEvent(const JID& jid, const std::string& reason) : jid_(jid), reason_(reason){}
- virtual ~SubscriptionRequestEvent(){}
- const JID& getJID() const {return jid_;}
- const std::string& getReason() const {return reason_;}
- boost::signal<void()> onAccept;
- boost::signal<void()> onDecline;
- void accept() {
- onAccept();
- conclude();
- }
-
- void decline() {
- onDecline();
- conclude();
- }
-
- void defer() {
- conclude();
- }
-
- private:
- JID jid_;
- std::string reason_;
- };
+ class SubscriptionRequestEvent : public StanzaEvent {
+ public:
+ SubscriptionRequestEvent(const JID& jid, const std::string& reason) : jid_(jid), reason_(reason){}
+ virtual ~SubscriptionRequestEvent(){}
+ const JID& getJID() const {return jid_;}
+ const std::string& getReason() const {return reason_;}
+ boost::signals2::signal<void()> onAccept;
+ boost::signals2::signal<void()> onDecline;
+ void accept() {
+ onAccept();
+ conclude();
+ }
+
+ void decline() {
+ onDecline();
+ conclude();
+ }
+
+ void defer() {
+ conclude();
+ }
+
+ private:
+ JID jid_;
+ std::string reason_;
+ };
}