summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-06-20 09:00:52 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-06-20 14:37:51 (GMT)
commitfcd2d7cfb5a05be0fd13bfa3582b46c1a1b595aa (patch)
tree17e3eef980584b8f194d68d1d9b9eae967423885 /Swiften/Elements
parent6310bc00ceeb65f0cf6fc0ada9d1b188517d8a76 (diff)
downloadswift-contrib-fcd2d7cfb5a05be0fd13bfa3582b46c1a1b595aa.zip
swift-contrib-fcd2d7cfb5a05be0fd13bfa3582b46c1a1b595aa.tar.bz2
Added beginnings of a vCard parser.
Only implemented PHOTO subtag, because it's the only thing we need right now.
Diffstat (limited to 'Swiften/Elements')
-rw-r--r--Swiften/Elements/VCard.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/Swiften/Elements/VCard.h b/Swiften/Elements/VCard.h
new file mode 100644
index 0000000..53be318
--- /dev/null
+++ b/Swiften/Elements/VCard.h
@@ -0,0 +1,22 @@
+#pragma once
+
+#include "Swiften/Base/String.h"
+#include "Swiften/Base/ByteArray.h"
+#include "Swiften/Elements/Payload.h"
+
+namespace Swift {
+ class VCard : public Payload {
+ public:
+ VCard() {}
+
+ void setPhoto(const ByteArray& photo) { photo_ = photo; }
+ const ByteArray& getPhoto() { return photo_; }
+
+ void setPhotoType(const String& photoType) { photoType_ = photoType; }
+ const String& getPhotoType() { return photoType_; }
+
+ private:
+ ByteArray photo_;
+ String photoType_;
+ };
+}