summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-21 13:30:09 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-21 13:32:06 (GMT)
commit358f741f45ac92d07b923afd51aeb39704277374 (patch)
tree7dd2eb80cab3d76771ffb22f5d8c7bf4aae77887 /Slimber/Cocoa/Slimber.mm
parente6e5c2a9935d5970c9ed570f86cfec06f0ab75fd (diff)
downloadswift-contrib-358f741f45ac92d07b923afd51aeb39704277374.zip
swift-contrib-358f741f45ac92d07b923afd51aeb39704277374.tar.bz2
Add VCardCollection.
Diffstat (limited to 'Slimber/Cocoa/Slimber.mm')
-rw-r--r--Slimber/Cocoa/Slimber.mm9
1 files changed, 7 insertions, 2 deletions
diff --git a/Slimber/Cocoa/Slimber.mm b/Slimber/Cocoa/Slimber.mm
index d64cd58..ae1d9fd 100644
--- a/Slimber/Cocoa/Slimber.mm
+++ b/Slimber/Cocoa/Slimber.mm
@@ -3,8 +3,10 @@
#include "Swiften/Base/foreach.h"
#include "Swiften/Elements/RosterPayload.h"
#include "Swiften/LinkLocal/AppleDNSSDService.h"
+#include "Swiften/Application/Platform/PlatformApplication.h"
#include "Slimber/Cocoa/Menulet.h"
#include "Slimber/Server.h"
+#include "Slimber/FileVCardCollection.h"
using namespace Swift;
@@ -14,7 +16,9 @@ Slimber::Slimber() {
linkLocalRoster = boost::shared_ptr<LinkLocalRoster>(new LinkLocalRoster(dnsSDService));
linkLocalRoster->onRosterChanged.connect(boost::bind(&Slimber::handleRosterChanged, this));
- server = new Server(5222, 5562, linkLocalRoster, dnsSDService);
+ vCardCollection = new FileVCardCollection(PlatformApplication("Slimber").getSettingsDir());
+
+ server = new Server(5222, 5562, linkLocalRoster, dnsSDService, vCardCollection);
server->onSelfConnected.connect(boost::bind(&Slimber::handleSelfConnected, this, _1));
menulet = [[Menulet alloc] init];
@@ -22,8 +26,9 @@ Slimber::Slimber() {
}
Slimber::~Slimber() {
- delete server;
[menulet release];
+ delete server;
+ delete vCardCollection;
}
void Slimber::handleSelfConnected(bool b) {