diff options
-rw-r--r-- | Slimber/FileVCardCollection.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
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(); } } |