summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/QA/ClientTest')
-rw-r--r--Swiften/QA/ClientTest/ClientTest.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/Swiften/QA/ClientTest/ClientTest.cpp b/Swiften/QA/ClientTest/ClientTest.cpp
index 3b8734e..38f70db 100644
--- a/Swiften/QA/ClientTest/ClientTest.cpp
+++ b/Swiften/QA/ClientTest/ClientTest.cpp
@@ -19,18 +19,18 @@
using namespace Swift;
-SimpleEventLoop eventLoop;
-BoostNetworkFactories networkFactories(&eventLoop);
+static SimpleEventLoop eventLoop;
+static BoostNetworkFactories networkFactories(&eventLoop);
-Client* client = 0;
-bool rosterReceived = false;
+static Client* client = 0;
+static bool rosterReceived = false;
enum TestStage {
FirstConnect,
Reconnect
};
-TestStage stage;
-ClientOptions options;
+static TestStage stage;
+static ClientOptions options;
-void handleDisconnected(boost::optional<ClientError> e) {
- std::cout << "Disconnected: " << e << std::endl;
+static void handleDisconnected(boost::optional<ClientError> e) {
+ std::cout << "Disconnected: " << (e ? e.get().getType() : ClientError::UnknownError) << std::endl;
if (stage == FirstConnect) {
stage = Reconnect;
@@ -42,5 +42,5 @@ void handleDisconnected(boost::optional<ClientError> e) {
}
-void handleRosterReceived(boost::shared_ptr<Payload>) {
+static void handleRosterReceived(boost::shared_ptr<Payload>) {
rosterReceived = true;
std::cout << "Disconnecting" << std::endl;
@@ -48,5 +48,5 @@ void handleRosterReceived(boost::shared_ptr<Payload>) {
}
-void handleConnected() {
+static void handleConnected() {
std::cout << "Connected" << std::endl;
rosterReceived = false;
@@ -78,5 +78,5 @@ int main(int, char**) {
client = new Swift::Client(JID(jid), std::string(pass), &networkFactories);
- ClientXMLTracer* tracer = new ClientXMLTracer(client, !options.boshURL.empty());
+ ClientXMLTracer* tracer = new ClientXMLTracer(client, !options.boshURL.isEmpty());
client->onConnected.connect(&handleConnected);
client->onDisconnected.connect(boost::bind(&handleDisconnected, _1));