summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Controllers/XMPPRosterController.cpp')
-rw-r--r--Swiften/Controllers/XMPPRosterController.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/Swiften/Controllers/XMPPRosterController.cpp b/Swiften/Controllers/XMPPRosterController.cpp
index b6c36d7..d1e6f80 100644
--- a/Swiften/Controllers/XMPPRosterController.cpp
+++ b/Swiften/Controllers/XMPPRosterController.cpp
@@ -22,16 +22,19 @@ namespace Swift {
* The controller does not gain ownership of these parameters.
*/
XMPPRosterController::XMPPRosterController(IQRouter* iqRouter, boost::shared_ptr<XMPPRoster> xmppRoster)
- : IQHandler(iqRouter), xmppRoster_(xmppRoster) {
- GetRosterRequest* rosterRequest = new GetRosterRequest(iqRouter, Request::AutoDeleteAfterResponse);
- rosterRequest->onResponse.connect(boost::bind(&XMPPRosterController::handleRosterReceived, this, _1));
- rosterRequest->send();
+ : IQHandler(iqRouter), iqRouter_(iqRouter), xmppRoster_(xmppRoster) {
}
XMPPRosterController::~XMPPRosterController() {
}
+void XMPPRosterController::requestRoster() {
+ GetRosterRequest* rosterRequest = new GetRosterRequest(iqRouter_, Request::AutoDeleteAfterResponse);
+ rosterRequest->onResponse.connect(boost::bind(&XMPPRosterController::handleRosterReceived, this, _1));
+ rosterRequest->send();
+}
+
void XMPPRosterController::handleRosterReceived(boost::shared_ptr<RosterPayload> rosterPayload) {
foreach(const RosterItemPayload& item, rosterPayload->getItems()) {
if (item.getSubscription() == RosterItemPayload::Remove) {