summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Client/Client.cpp')
-rw-r--r--Swiften/Client/Client.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 5c64506..e3e8a45 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -7,15 +7,23 @@
#include "Swiften/Client/Client.h"
#include "Swiften/Queries/Responders/SoftwareVersionResponder.h"
+#include "Swiften/Roster/XMPPRoster.h"
+#include "Swiften/Roster/XMPPRosterController.h"
namespace Swift {
Client::Client(const JID& jid, const String& password) : CoreClient(jid, password) {
softwareVersionResponder = new SoftwareVersionResponder(getIQRouter());
softwareVersionResponder->start();
+
+ roster = new XMPPRoster();
+ rosterController = new XMPPRosterController(getIQRouter(), roster);
}
Client::~Client() {
+ delete rosterController;
+ delete roster;
+
softwareVersionResponder->stop();
delete softwareVersionResponder;
}
@@ -24,4 +32,9 @@ void Client::setSoftwareVersion(const String& name, const String& version) {
softwareVersionResponder->setVersion(name, version);
}
+void Client::requestRoster() {
+ rosterController->requestRoster();
+}
+
+
}