summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Events')
-rw-r--r--Swiften/Events/MessageEvent.h2
-rw-r--r--Swiften/Events/StanzaEvent.h7
-rw-r--r--Swiften/Events/SubscriptionRequestEvent.h8
3 files changed, 11 insertions, 6 deletions
diff --git a/Swiften/Events/MessageEvent.h b/Swiften/Events/MessageEvent.h
index 1f71493..43174a1 100644
--- a/Swiften/Events/MessageEvent.h
+++ b/Swiften/Events/MessageEvent.h
@@ -22,7 +22,7 @@ namespace Swift {
void read() {
assert (isReadable());
- onConclusion();
+ conclude();
}
private:
diff --git a/Swiften/Events/StanzaEvent.h b/Swiften/Events/StanzaEvent.h
index adef112..b1dc537 100644
--- a/Swiften/Events/StanzaEvent.h
+++ b/Swiften/Events/StanzaEvent.h
@@ -6,8 +6,13 @@
namespace Swift {
class StanzaEvent {
public:
- StanzaEvent(){};
+ StanzaEvent(){concluded_ = false;};
virtual ~StanzaEvent() {};
+ void conclude() {concluded_ = true; onConclusion();};
+ /** Do not call this directly from outside the class */
boost::signal<void()> onConclusion;
+ bool getConcluded() {return concluded_;};
+ private:
+ bool concluded_;
};
}
diff --git a/Swiften/Events/SubscriptionRequestEvent.h b/Swiften/Events/SubscriptionRequestEvent.h
index fe41df7..ed063d7 100644
--- a/Swiften/Events/SubscriptionRequestEvent.h
+++ b/Swiften/Events/SubscriptionRequestEvent.h
@@ -20,13 +20,13 @@ namespace Swift {
boost::signal<void()> onDecline;
void accept() {
onAccept();
- onConclusion();
- }
+ conclude();
+ };
void decline() {
onDecline();
- onConclusion();
- }
+ conclude();
+ };
private:
JID jid_;