summaryrefslogtreecommitdiffstats
path: root/Swift
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2010-10-10 16:07:31 (GMT)
committerRemko Tronçon <git@el-tramo.be>2010-10-10 16:12:37 (GMT)
commit3760140b77f1cf568a7cdf824502ff6568e62fc1 (patch)
treeac1f463a3283310923233582177b15f479a430bf /Swift
parentd1e7e135f41a9c7ad2188c93de911555ad4a3513 (diff)
downloadswift-contrib-3760140b77f1cf568a7cdf824502ff6568e62fc1.zip
swift-contrib-3760140b77f1cf568a7cdf824502ff6568e62fc1.tar.bz2
Client refactoring.
Removing inheritance from StanzaChannel to trim down the public API.
Diffstat (limited to 'Swift')
-rw-r--r--Swift/Controllers/MainController.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp
index 53b9ab0..c219ae9 100644
--- a/Swift/Controllers/MainController.cpp
+++ b/Swift/Controllers/MainController.cpp
@@ -285,7 +285,7 @@ void MainController::handleConnected() {
rosterController_->onChangeStatusRequest.connect(boost::bind(&MainController::handleChangeStatusRequest, this, _1, _2));
rosterController_->onSignOutRequest.connect(boost::bind(&MainController::signOut, this));
- chatsManager_ = new ChatsManager(jid_, client_, client_->getIQRouter(), eventController_, chatWindowFactory_, nickResolver_, presenceOracle_, serverDiscoInfo_, presenceSender_, uiEventStream_, chatListWindowFactory_, useDelayForLatency_, &timerFactory_, mucRegistry_, entityCapsManager_);
+ chatsManager_ = new ChatsManager(jid_, client_->getStanzaChannel(), client_->getIQRouter(), eventController_, chatWindowFactory_, nickResolver_, presenceOracle_, serverDiscoInfo_, presenceSender_, uiEventStream_, chatListWindowFactory_, useDelayForLatency_, &timerFactory_, mucRegistry_, entityCapsManager_);
client_->onMessageReceived.connect(boost::bind(&ChatsManager::handleIncomingMessage, chatsManager_, _1));
chatsManager_->setAvatarManager(avatarManager_);
@@ -420,17 +420,17 @@ void MainController::performLoginFromCachedCredentials() {
}
if (!client_) {
client_ = new Swift::Client(jid_, password_);
- presenceSender_ = new PresenceSender(client_);
- presenceOracle_ = new PresenceOracle(client_);
+ presenceSender_ = new PresenceSender(client_->getStanzaChannel());
+ presenceOracle_ = new PresenceOracle(client_->getStanzaChannel());
mucRegistry_ = new MUCRegistry();
xmppRoster_ = new XMPPRoster();
vcardManager_ = new VCardManager(jid_, client_->getIQRouter(), getVCardStorageForProfile(jid_));
vcardManager_->onVCardChanged.connect(boost::bind(&MainController::handleVCardReceived, this, _1, _2));
nickResolver_ = new NickResolver(this->jid_.toBare(), xmppRoster_, vcardManager_, mucRegistry_);
- avatarManager_ = new AvatarManagerImpl(vcardManager_, client_, avatarStorage_, mucRegistry_);
- capsManager_ = new CapsManager(capsStorage_, client_, client_->getIQRouter());
- entityCapsManager_ = new EntityCapsManager(capsManager_, client_);
- presenceNotifier_ = new PresenceNotifier(client_, notifier_, mucRegistry_, avatarManager_, nickResolver_, presenceOracle_, &timerFactory_);
+ avatarManager_ = new AvatarManagerImpl(vcardManager_, client_->getStanzaChannel(), avatarStorage_, mucRegistry_);
+ capsManager_ = new CapsManager(capsStorage_, client_->getStanzaChannel(), client_->getIQRouter());
+ entityCapsManager_ = new EntityCapsManager(capsManager_, client_->getStanzaChannel());
+ presenceNotifier_ = new PresenceNotifier(client_->getStanzaChannel(), notifier_, mucRegistry_, avatarManager_, nickResolver_, presenceOracle_, &timerFactory_);
presenceNotifier_->onNotificationActivated.connect(boost::bind(&MainController::handleNotificationClicked, this, _1));
eventNotifier_ = new EventNotifier(eventController_, notifier_, avatarManager_, nickResolver_);
eventNotifier_->onNotificationActivated.connect(boost::bind(&MainController::handleNotificationClicked, this, _1));