summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-24 12:10:44 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-24 12:15:24 (GMT)
commitb107bdd08df9ae3a978ad8f966a26eb8d551bd13 (patch)
treead1c4d6550f323a19dffd699c98513aa68acddaf /Swiften/Client
parentcfa314bd0b6f6ed9285c7167948899184f6a8c12 (diff)
downloadswift-b107bdd08df9ae3a978ad8f966a26eb8d551bd13.zip
swift-b107bdd08df9ae3a978ad8f966a26eb8d551bd13.tar.bz2
Creating abstract XMPPRoster base class.
Diffstat (limited to 'Swiften/Client')
-rw-r--r--Swiften/Client/Client.cpp8
-rw-r--r--Swiften/Client/Client.h7
2 files changed, 9 insertions, 6 deletions
diff --git a/Swiften/Client/Client.cpp b/Swiften/Client/Client.cpp
index 20a0c47..f1ca207 100644
--- a/Swiften/Client/Client.cpp
+++ b/Swiften/Client/Client.cpp
@@ -7,7 +7,7 @@
#include "Swiften/Client/Client.h"
#include "Swiften/Queries/Responders/SoftwareVersionResponder.h"
-#include "Swiften/Roster/XMPPRoster.h"
+#include "Swiften/Roster/XMPPRosterImpl.h"
#include "Swiften/Roster/XMPPRosterController.h"
#include "Swiften/Presence/PresenceOracle.h"
@@ -17,7 +17,7 @@ Client::Client(const JID& jid, const String& password) : CoreClient(jid, passwor
softwareVersionResponder = new SoftwareVersionResponder(getIQRouter());
softwareVersionResponder->start();
- roster = new XMPPRoster();
+ roster = new XMPPRosterImpl();
rosterController = new XMPPRosterController(getIQRouter(), roster);
presenceOracle = new PresenceOracle(getStanzaChannel());
@@ -35,6 +35,10 @@ Client::~Client() {
delete softwareVersionResponder;
}
+XMPPRoster* Client::getRoster() const {
+ return roster;
+}
+
void Client::setSoftwareVersion(const String& name, const String& version) {
softwareVersionResponder->setVersion(name, version);
}
diff --git a/Swiften/Client/Client.h b/Swiften/Client/Client.h
index bf19f2f..4de630c 100644
--- a/Swiften/Client/Client.h
+++ b/Swiften/Client/Client.h
@@ -11,6 +11,7 @@
namespace Swift {
class SoftwareVersionResponder;
class XMPPRoster;
+ class XMPPRosterImpl;
class XMPPRosterController;
class PresenceOracle;
@@ -46,9 +47,7 @@ namespace Swift {
*
* \see requestRoster()
*/
- XMPPRoster* getRoster() const {
- return roster;
- }
+ XMPPRoster* getRoster() const;
/**
* Requests the roster from the server.
@@ -84,7 +83,7 @@ namespace Swift {
private:
SoftwareVersionResponder* softwareVersionResponder;
- XMPPRoster* roster;
+ XMPPRosterImpl* roster;
XMPPRosterController* rosterController;
PresenceOracle* presenceOracle;
};