summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2010-03-22 17:40:13 (GMT)
committerKevin Smith <git@kismith.co.uk>2010-03-22 17:40:13 (GMT)
commit1ebd045cadb3585c846ea38c63d508e5aa6ec1e7 (patch)
tree304f2b9e8b92e7ff44aa790a298b1d2592d3f083 /Swiften/Events
parent6581ec0c0881263bea671c6122b546483ad6f2e8 (diff)
downloadswift-contrib-1ebd045cadb3585c846ea38c63d508e5aa6ec1e7.zip
swift-contrib-1ebd045cadb3585c846ea38c63d508e5aa6ec1e7.tar.bz2
Sucky UI for subscription requests
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_;