summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-05-03 20:39:27 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-05-05 19:43:14 (GMT)
commit772b2ec0243d7b55d91e4027d828881d18093ed0 (patch)
tree83a58b2b97f3992165ee20c05e0630452eb50457 /Swiften/Serializer/PayloadSerializers
parent0b3db8fd68abee7269d5a38aabd8a816e099eae5 (diff)
downloadswift-772b2ec0243d7b55d91e4027d828881d18093ed0.zip
swift-772b2ec0243d7b55d91e4027d828881d18093ed0.tar.bz2
Replace ByteArray by typedef.
Diffstat (limited to 'Swiften/Serializer/PayloadSerializers')
-rw-r--r--Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp2
-rw-r--r--Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
index 5122d22..3ac1d77 100644
--- a/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
+++ b/Swiften/Serializer/PayloadSerializers/UnitTest/VCardSerializerTest.cpp
@@ -29,7 +29,7 @@ class VCardSerializerTest : public CppUnit::TestFixture
vcard->setFamilyName("Wonderland");
vcard->setSuffix("PhD");
vcard->setNickname("DreamGirl");
- vcard->setPhoto("abcdef");
+ vcard->setPhoto(createByteArray("abcdef"));
vcard->setPhotoType("image/png");
vcard->addUnknownContent("<BDAY>1234</BDAY><MAILER>mutt</MAILER>");
diff --git a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
index ab6aa1e..17a6b49 100644
--- a/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
+++ b/Swiften/Serializer/PayloadSerializers/VCardSerializer.cpp
@@ -87,14 +87,14 @@ std::string VCardSerializer::serializePayload(boost::shared_ptr<VCard> vcard) c
nickElement->addNode(boost::shared_ptr<XMLTextNode>(new XMLTextNode(vcard->getNickname())));
queryElement.addNode(nickElement);
}
- if (!vcard->getPhoto().isEmpty() || !vcard->getPhotoType().empty()) {
+ if (!vcard->getPhoto().empty() || !vcard->getPhotoType().empty()) {
XMLElement::ref photoElement(new XMLElement("PHOTO"));
if (!vcard->getPhotoType().empty()) {
XMLElement::ref typeElement(new XMLElement("TYPE"));
typeElement->addNode(XMLTextNode::ref(new XMLTextNode(vcard->getPhotoType())));
photoElement->addNode(typeElement);
}
- if (!vcard->getPhoto().isEmpty()) {
+ if (!vcard->getPhoto().empty()) {
XMLElement::ref binvalElement(new XMLElement("BINVAL"));
binvalElement->addNode(XMLTextNode::ref(new XMLTextNode(Base64::encode(vcard->getPhoto()))));
photoElement->addNode(binvalElement);