From f4f175051b0c95edad200d66fa12f1b9511e2c6b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Remko=20Tron=C3=A7on?= <git@el-tramo.be>
Date: Tue, 21 Jul 2009 16:28:10 +0200
Subject: Serialize link local vcard to disk.


diff --git a/Slimber/FileVCardCollection.cpp b/Slimber/FileVCardCollection.cpp
index 1568b33..16c53c4 100644
--- a/Slimber/FileVCardCollection.cpp
+++ b/Slimber/FileVCardCollection.cpp
@@ -1,5 +1,9 @@
 #include "Slimber/FileVCardCollection.h"
+
+#include <boost/filesystem/fstream.hpp>
+
 #include "Swiften/Elements/VCard.h"
+#include "Swiften/Serializer/PayloadSerializers/VCardSerializer.h"
 
 namespace Swift {
 
@@ -12,7 +16,9 @@ boost::shared_ptr<VCard> FileVCardCollection::getOwnVCard() const {
 }
 
 void FileVCardCollection::setOwnVCard(boost::shared_ptr<VCard> v) {
-	vcard = v;
+	boost::filesystem::ofstream file(vcardsPath / std::string("vcard.xml"));
+	file << VCardSerializer().serializePayload(v);
+	file.close();
 }
 
 }
-- 
cgit v0.10.2-6-g49f6