diff options
Diffstat (limited to 'Swiften/Client/DummyStanzaChannel.h')
-rw-r--r-- | Swiften/Client/DummyStanzaChannel.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Swiften/Client/DummyStanzaChannel.h b/Swiften/Client/DummyStanzaChannel.h index d43d68a..05066a8 100644 --- a/Swiften/Client/DummyStanzaChannel.h +++ b/Swiften/Client/DummyStanzaChannel.h @@ -13,12 +13,17 @@ namespace Swift { class DummyStanzaChannel : public StanzaChannel { public: - DummyStanzaChannel() {} + DummyStanzaChannel() : available_(true) {} virtual void sendStanza(boost::shared_ptr<Stanza> stanza) { sentStanzas.push_back(stanza); } + void setAvailable(bool available) { + available_ = available; + onAvailableChanged(available); + } + virtual void sendIQ(boost::shared_ptr<IQ> iq) { sentStanzas.push_back(iq); } @@ -36,7 +41,7 @@ namespace Swift { } virtual bool isAvailable() { - return true; + return available_; } virtual bool getStreamManagementEnabled() const { @@ -49,5 +54,6 @@ namespace Swift { } std::vector<boost::shared_ptr<Stanza> > sentStanzas; + bool available_; }; } |