From e2045ebccf86d16eeb9dbf710c64dd2b4a4d6f94 Mon Sep 17 00:00:00 2001
From: Kevin Smith <git@kismith.co.uk>
Date: Tue, 15 Sep 2009 11:17:58 +0100
Subject: Reconnect seems to mostly work now.

It doesn't always re-enable the chat windows, though, so it's not perfect yet.

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>);
-- 
cgit v0.10.2-6-g49f6