summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften')
-rw-r--r--Swiften/Client/Client.cpp10
-rw-r--r--Swiften/Client/Client.h3
2 files changed, 13 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 13e7a9b..fe9bc60 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -42,10 +42,20 @@ bool Client::isAvailable() {
return session_ && session_->getState() == ClientSession::Initialized;
}
+/** FIXME: implement */
+JID Client::getBoundJID() {
+ return JID();
+}
+
void Client::connect() {
connect(jid_.getDomain());
}
+void Client::connect(const JID& jid) {
+ jid_ = jid;
+ connect();
+}
+
void Client::connect(const String& host) {
assert(!connector_); // Crash on reconnect is here.
connector_ = Connector::create(host, &resolver_, connectionFactory_, timerFactory_);
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index cb07036..ca729a7 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -39,6 +39,7 @@ namespace Swift {
void setCertificate(const String& certificate);
void connect();
+ void connect(const JID& jid);
void connect(const String& host);
void disconnect();
@@ -54,6 +55,8 @@ namespace Swift {
return iqRouter_;
}
+ JID getBoundJID();
+
public:
boost::signal<void (const ClientError&)> onError;
boost::signal<void ()> onConnected;