summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2009-07-21 13:07:59 (GMT)
committerRemko Tronçon <git@el-tramo.be>2009-07-21 13:07:59 (GMT)
commit97ccbb55df2af9268f37e0bad7109d958acf6d19 (patch)
treeeb15f961800b4e1753482ec4e944cb9102aa05f0 /Swiften/Parser
parent0c44bb6fa24900acef40dffdc65c8aecd3ee48ca (diff)
downloadswift-contrib-97ccbb55df2af9268f37e0bad7109d958acf6d19.zip
swift-contrib-97ccbb55df2af9268f37e0bad7109d958acf6d19.tar.bz2
Add more fields to the VCard element support.
Extra fields: Fullname, Given/Family name, E-Mail.
Diffstat (limited to 'Swiften/Parser')
-rw-r--r--Swiften/Parser/PayloadParsers/VCardParser.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/Swiften/Parser/PayloadParsers/VCardParser.cpp b/Swiften/Parser/PayloadParsers/VCardParser.cpp
index b7845a7..87416ab 100644
--- a/Swiften/Parser/PayloadParsers/VCardParser.cpp
+++ b/Swiften/Parser/PayloadParsers/VCardParser.cpp
@@ -23,6 +23,18 @@ void VCardParser::handleEndElement(const String&, const String&) {
else if (elementHierarchy == "/vCard/NICKNAME") {
getPayloadInternal()->setNickname(currentText_);
}
+ else if (elementHierarchy == "/vCard/FN") {
+ getPayloadInternal()->setFullName(currentText_);
+ }
+ else if (elementHierarchy == "/vCard/N/FAMILY") {
+ getPayloadInternal()->setFamilyName(currentText_);
+ }
+ else if (elementHierarchy == "/vCard/N/GIVEN") {
+ getPayloadInternal()->setGivenName(currentText_);
+ }
+ else if (elementHierarchy == "/vCard/EMAIL/USERID") {
+ getPayloadInternal()->setEMail(currentText_);
+ }
elementStack_.pop_back();
}