summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Slimber/Cocoa')
-rw-r--r--Slimber/Cocoa/Slimber.h2
-rw-r--r--Slimber/Cocoa/Slimber.mm9
2 files changed, 9 insertions, 2 deletions
diff --git a/Slimber/Cocoa/Slimber.h b/Slimber/Cocoa/Slimber.h
index 7964581..c2c0e2d 100644
--- a/Slimber/Cocoa/Slimber.h
+++ b/Slimber/Cocoa/Slimber.h
@@ -10,6 +10,7 @@
@class Menulet;
namespace Swift {
class Server;
+ class VCardCollection;
}
class Slimber {
@@ -24,6 +25,7 @@ class Slimber {
private:
boost::shared_ptr<Swift::DNSSDService> dnsSDService;
boost::shared_ptr<Swift::LinkLocalRoster>linkLocalRoster;
+ Swift::VCardCollection* vCardCollection;
Swift::Server* server;
Menulet* menulet;
};
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) {