summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Smith <git@kismith.co.uk>2009-09-15 10:17:58 (GMT)
committerKevin Smith <git@kismith.co.uk>2009-09-15 10:17:58 (GMT)
commite2045ebccf86d16eeb9dbf710c64dd2b4a4d6f94 (patch)
tree078eec96735f3fdf09cda7b0a39a2f45c8ecf775 /Swiften/Client
parent13c1ef651158d8bdbd459ebea461c23c89699abd (diff)
downloadswift-e2045ebccf86d16eeb9dbf710c64dd2b4a4d6f94.zip
swift-e2045ebccf86d16eeb9dbf710c64dd2b4a4d6f94.tar.bz2
Reconnect seems to mostly work now.
It doesn't always re-enable the chat windows, though, so it's not perfect yet.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp4
-rw-r--r--Swiften/Client/Client.h2
2 files changed, 6 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 5d04a92..60dfade 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -24,6 +24,10 @@ Client::~Client() {
delete connectionFactory_;
}
+bool Client::isAvailable() {
+ return session_;
+}
+
void Client::connect() {
DomainNameResolver resolver;
try {
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index 516bee2..59e1c05 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -30,6 +30,8 @@ namespace Swift {
void connect();
void disconnect();
+
+ bool isAvailable();
virtual void sendIQ(boost::shared_ptr<IQ>);
virtual void sendMessage(boost::shared_ptr<Message>);