/* * Copyright (c) 2010-2016 Isode Limited. * All rights reserved. * See the COPYING file for more information. */ #include #include #include #include namespace Swift { VCardUpdateSerializer::VCardUpdateSerializer() : GenericPayloadSerializer() { } std::string VCardUpdateSerializer::serializePayload(std::shared_ptr vcardUpdate) const { XMLElement updateElement("x", "vcard-temp:x:update"); std::shared_ptr photoElement(new XMLElement("photo")); photoElement->addNode(std::make_shared(vcardUpdate->getPhotoHash())); updateElement.addNode(photoElement); return updateElement.serialize(); } }