2
* xmpp_vcard.cpp - classes for handling vCards
3
* Copyright (C) 2003 Michail Pishchagin
5
* This library is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU Lesser General Public
7
* License as published by the Free Software Foundation; either
8
* version 2.1 of the License, or (at your option) any later version.
10
* This library is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13
* Lesser General Public License for more details.
15
* You should have received a copy of the GNU Lesser General Public
16
* License along with this library; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
#include "xmpp_vcard.h"
24
#include <qdatetime.h>
26
#include <qimage.h> // needed for image format recognition
28
#include <QImageReader>
29
#include <QImageWriter>
33
#include "xmpp_xmlcommon.h"
36
using namespace XMLHelper;
38
//----------------------------------------------------------------------------
40
//----------------------------------------------------------------------------
41
QString image2type(const QByteArray &ba)
45
buf.open(QIODevice::ReadOnly);
46
QString format = QImageReader::imageFormat( &buf );
48
// TODO: add more formats
49
if ( format.toUpper() == "PNG" || format == "PsiPNG" )
51
if ( format.toUpper() == "MNG" )
53
if ( format.toUpper() == "GIF" )
55
if ( format.toUpper() == "BMP" )
57
if ( format.toUpper() == "XPM" )
59
if ( format.toUpper() == "SVG" )
60
return "image/svg+xml";
61
if ( format.toUpper() == "JPEG" )
64
qWarning() << QString("WARNING! VCard::image2type: unknown format = '%1'").arg(format.isNull() ? QString("UNKNOWN") : format);
66
return "image/unknown";
69
// Long lines of encoded binary data SHOULD BE folded to 75 characters using the folding method defined in [MIME-DIR].
70
static QString foldString(const QString &s)
74
for (int i = 0; i < (int)s.length(); i++) {
91
QString familyName, givenName, middleName, prefixName, suffixName;
98
AddressList addressList;
116
QStringList categories;
123
QString soundURI, soundPhonetic;
128
PrivacyClass privacyClass;
134
VCard::Private::Private()
136
privacyClass = pcNone;
140
VCard::Private::~Private()
145
bool VCard::Private::isEmpty()
147
if ( !version.isEmpty() ||
148
!fullName.isEmpty() ||
149
!familyName.isEmpty() || !givenName.isEmpty() || !middleName.isEmpty() || !prefixName.isEmpty() || !suffixName.isEmpty() ||
150
!nickName.isEmpty() ||
151
!photo.isEmpty() || !photoURI.isEmpty() ||
153
!addressList.isEmpty() ||
154
!labelList.isEmpty() ||
155
!phoneList.isEmpty() ||
156
!emailList.isEmpty() ||
159
!timezone.isEmpty() ||
160
!geo.lat.isEmpty() || !geo.lon.isEmpty() ||
163
!logo.isEmpty() || !logoURI.isEmpty() ||
164
(agent && !agent->isEmpty()) || !agentURI.isEmpty() ||
165
!org.name.isEmpty() || !org.unit.isEmpty() ||
166
!categories.isEmpty() ||
170
!sortString.isEmpty() ||
171
!sound.isEmpty() || !soundURI.isEmpty() || !soundPhonetic.isEmpty() ||
175
(privacyClass != pcNone) ||
188
VCard::VCard(const VCard &from)
194
VCard & VCard::operator=(const VCard &from)
205
d->agent = new VCard(*from.d->agent);
216
QDomElement VCard::toXml(QDomDocument *doc) const
218
QDomElement v = doc->createElement("vCard");
219
v.setAttribute("version", "2.0");
220
v.setAttribute("prodid", "-//HandGen//NONSGML vGen v1.0//EN");
221
v.setAttribute("xmlns", "vcard-temp");
223
if ( !d->version.isEmpty() )
224
v.appendChild( textTag(doc, "VERSION", d->version) );
225
if ( !d->fullName.isEmpty() )
226
v.appendChild( textTag(doc, "FN", d->fullName) );
228
if ( !d->familyName.isEmpty() || !d->givenName.isEmpty() || !d->middleName.isEmpty() ||
229
!d->prefixName.isEmpty() || !d->suffixName.isEmpty() ) {
230
QDomElement w = doc->createElement("N");
232
if ( !d->familyName.isEmpty() )
233
w.appendChild( textTag(doc, "FAMILY", d->familyName) );
234
if ( !d->givenName.isEmpty() )
235
w.appendChild( textTag(doc, "GIVEN", d->givenName) );
236
if ( !d->middleName.isEmpty() )
237
w.appendChild( textTag(doc, "MIDDLE", d->middleName) );
238
if ( !d->prefixName.isEmpty() )
239
w.appendChild( textTag(doc, "PREFIX", d->prefixName) );
240
if ( !d->suffixName.isEmpty() )
241
w.appendChild( textTag(doc, "SUFFIX", d->suffixName) );
246
if ( !d->nickName.isEmpty() )
247
v.appendChild( textTag(doc, "NICKNAME", d->nickName) );
249
if ( !d->photo.isEmpty() || !d->photoURI.isEmpty() ) {
250
QDomElement w = doc->createElement("PHOTO");
252
if ( !d->photo.isEmpty() ) {
253
w.appendChild( textTag(doc, "TYPE", image2type(d->photo)) );
254
w.appendChild( textTag(doc, "BINVAL", foldString( QCA::Base64().arrayToString(d->photo)) ) );
256
else if ( !d->photoURI.isEmpty() )
257
w.appendChild( textTag(doc, "EXTVAL", d->photoURI) );
262
if ( !d->bday.isEmpty() )
263
v.appendChild( textTag(doc, "BDAY", d->bday) );
265
if ( !d->addressList.isEmpty() ) {
266
AddressList::Iterator it = d->addressList.begin();
267
for ( ; it != d->addressList.end(); ++it ) {
268
QDomElement w = doc->createElement("ADR");
272
w.appendChild( emptyTag(doc, "HOME") );
274
w.appendChild( emptyTag(doc, "WORK") );
276
w.appendChild( emptyTag(doc, "POSTAL") );
278
w.appendChild( emptyTag(doc, "PARCEL") );
280
w.appendChild( emptyTag(doc, "DOM") );
282
w.appendChild( emptyTag(doc, "INTL") );
284
w.appendChild( emptyTag(doc, "PREF") );
286
if ( !a.pobox.isEmpty() )
287
w.appendChild( textTag(doc, "POBOX", a.pobox) );
288
if ( !a.extaddr.isEmpty() )
289
w.appendChild( textTag(doc, "EXTADR", a.extaddr) );
290
if ( !a.street.isEmpty() )
291
w.appendChild( textTag(doc, "STREET", a.street) );
292
if ( !a.locality.isEmpty() )
293
w.appendChild( textTag(doc, "LOCALITY", a.locality) );
294
if ( !a.region.isEmpty() )
295
w.appendChild( textTag(doc, "REGION", a.region) );
296
if ( !a.pcode.isEmpty() )
297
w.appendChild( textTag(doc, "PCODE", a.pcode) );
298
if ( !a.country.isEmpty() )
299
w.appendChild( textTag(doc, "CTRY", a.country) );
305
if ( !d->labelList.isEmpty() ) {
306
LabelList::Iterator it = d->labelList.begin();
307
for ( ; it != d->labelList.end(); ++it ) {
308
QDomElement w = doc->createElement("LABEL");
312
w.appendChild( emptyTag(doc, "HOME") );
314
w.appendChild( emptyTag(doc, "WORK") );
316
w.appendChild( emptyTag(doc, "POSTAL") );
318
w.appendChild( emptyTag(doc, "PARCEL") );
320
w.appendChild( emptyTag(doc, "DOM") );
322
w.appendChild( emptyTag(doc, "INTL") );
324
w.appendChild( emptyTag(doc, "PREF") );
326
if ( !l.lines.isEmpty() ) {
327
QStringList::Iterator it = l.lines.begin();
328
for ( ; it != l.lines.end(); ++it )
329
w.appendChild( textTag(doc, "LINE", *it) );
336
if ( !d->phoneList.isEmpty() ) {
337
PhoneList::Iterator it = d->phoneList.begin();
338
for ( ; it != d->phoneList.end(); ++it ) {
339
QDomElement w = doc->createElement("TEL");
343
w.appendChild( emptyTag(doc, "HOME") );
345
w.appendChild( emptyTag(doc, "WORK") );
347
w.appendChild( emptyTag(doc, "VOICE") );
349
w.appendChild( emptyTag(doc, "FAX") );
351
w.appendChild( emptyTag(doc, "PAGER") );
353
w.appendChild( emptyTag(doc, "MSG") );
355
w.appendChild( emptyTag(doc, "CELL") );
357
w.appendChild( emptyTag(doc, "VIDEO") );
359
w.appendChild( emptyTag(doc, "BBS") );
361
w.appendChild( emptyTag(doc, "MODEM") );
363
w.appendChild( emptyTag(doc, "ISDN") );
365
w.appendChild( emptyTag(doc, "PCS") );
367
w.appendChild( emptyTag(doc, "PREF") );
369
if ( !p.number.isEmpty() )
370
w.appendChild( textTag(doc, "NUMBER", p.number) );
376
if ( !d->emailList.isEmpty() ) {
377
EmailList::Iterator it = d->emailList.begin();
378
for ( ; it != d->emailList.end(); ++it ) {
379
QDomElement w = doc->createElement("EMAIL");
383
w.appendChild( emptyTag(doc, "HOME") );
385
w.appendChild( emptyTag(doc, "WORK") );
387
w.appendChild( emptyTag(doc, "INTERNET") );
389
w.appendChild( emptyTag(doc, "X400") );
391
if ( !e.userid.isEmpty() )
392
w.appendChild( textTag(doc, "USERID", e.userid) );
398
if ( !d->jid.isEmpty() )
399
v.appendChild( textTag(doc, "JABBERID", d->jid) );
400
if ( !d->mailer.isEmpty() )
401
v.appendChild( textTag(doc, "MAILER", d->mailer) );
402
if ( !d->timezone.isEmpty() )
403
v.appendChild( textTag(doc, "TZ", d->timezone) );
405
if ( !d->geo.lat.isEmpty() || !d->geo.lon.isEmpty() ) {
406
QDomElement w = doc->createElement("GEO");
408
if ( !d->geo.lat.isEmpty() )
409
w.appendChild( textTag(doc, "LAT", d->geo.lat) );
410
if ( !d->geo.lon.isEmpty() )
411
w.appendChild( textTag(doc, "LON", d->geo.lon));
416
if ( !d->title.isEmpty() )
417
v.appendChild( textTag(doc, "TITLE", d->title) );
418
if ( !d->role.isEmpty() )
419
v.appendChild( textTag(doc, "ROLE", d->role) );
421
if ( !d->logo.isEmpty() || !d->logoURI.isEmpty() ) {
422
QDomElement w = doc->createElement("LOGO");
424
if ( !d->logo.isEmpty() ) {
425
w.appendChild( textTag(doc, "TYPE", image2type(d->logo)) );
426
w.appendChild( textTag(doc, "BINVAL", foldString( QCA::Base64().arrayToString(d->logo)) ) );
428
else if ( !d->logoURI.isEmpty() )
429
w.appendChild( textTag(doc, "EXTVAL", d->logoURI) );
434
if ( !d->agentURI.isEmpty() || (d->agent && d->agent->isEmpty()) ) {
435
QDomElement w = doc->createElement("AGENT");
437
if ( d->agent && !d->agent->isEmpty() )
438
w.appendChild( d->agent->toXml(doc) );
439
else if ( !d->agentURI.isEmpty() )
440
w.appendChild( textTag(doc, "EXTVAL", d->agentURI) );
445
if ( !d->org.name.isEmpty() || !d->org.unit.isEmpty() ) {
446
QDomElement w = doc->createElement("ORG");
448
if ( !d->org.name.isEmpty() )
449
w.appendChild( textTag(doc, "ORGNAME", d->org.name) );
451
if ( !d->org.unit.isEmpty() ) {
452
QStringList::Iterator it = d->org.unit.begin();
453
for ( ; it != d->org.unit.end(); ++it )
454
w.appendChild( textTag(doc, "ORGUNIT", *it) );
460
if ( !d->categories.isEmpty() ) {
461
QDomElement w = doc->createElement("CATEGORIES");
463
QStringList::Iterator it = d->categories.begin();
464
for ( ; it != d->categories.end(); ++it )
465
w.appendChild( textTag(doc, "KEYWORD", *it) );
470
if ( !d->note.isEmpty() )
471
v.appendChild( textTag(doc, "NOTE", d->note) );
472
if ( !d->prodId.isEmpty() )
473
v.appendChild( textTag(doc, "PRODID", d->prodId) );
474
if ( !d->rev.isEmpty() )
475
v.appendChild( textTag(doc, "REV", d->rev) );
476
if ( !d->sortString.isEmpty() )
477
v.appendChild( textTag(doc, "SORT-STRING", d->sortString) );
479
if ( !d->sound.isEmpty() || !d->soundURI.isEmpty() || !d->soundPhonetic.isEmpty() ) {
480
QDomElement w = doc->createElement("SOUND");
482
if ( !d->sound.isEmpty() )
483
w.appendChild( textTag(doc, "BINVAL", foldString( QCA::Base64().arrayToString(d->sound)) ) );
484
else if ( !d->soundURI.isEmpty() )
485
w.appendChild( textTag(doc, "EXTVAL", d->soundURI) );
486
else if ( !d->soundPhonetic.isEmpty() )
487
w.appendChild( textTag(doc, "PHONETIC", d->soundPhonetic) );
492
if ( !d->uid.isEmpty() )
493
v.appendChild( textTag(doc, "UID", d->uid) );
494
if ( !d->url.isEmpty() )
495
v.appendChild( textTag(doc, "URL", d->url) );
496
if ( !d->desc.isEmpty() )
497
v.appendChild( textTag(doc, "DESC", d->desc) );
499
if ( d->privacyClass != pcNone ) {
500
QDomElement w = doc->createElement("CLASS");
502
if ( d->privacyClass == pcPublic )
503
w.appendChild( emptyTag(doc, "PUBLIC") );
504
else if ( d->privacyClass == pcPrivate )
505
w.appendChild( emptyTag(doc, "PRIVATE") );
506
else if ( d->privacyClass == pcConfidential )
507
w.appendChild( emptyTag(doc, "CONFIDENTIAL") );
512
if ( !d->key.isEmpty() ) {
513
QDomElement w = doc->createElement("KEY");
515
// TODO: Justin, please check out this code
516
w.appendChild( textTag(doc, "TYPE", "text/plain")); // FIXME
517
w.appendChild( textTag(doc, "CRED", QString::fromUtf8(d->key)) ); // FIXME
525
bool VCard::fromXml(const QDomElement &q)
527
if ( q.tagName().toUpper() != "VCARD" )
530
QDomNode n = q.firstChild();
531
for ( ; !n.isNull(); n = n.nextSibling() ) {
532
QDomElement i = n.toElement();
536
QString tag = i.tagName().toUpper();
541
if ( tag == "VERSION" )
542
d->version = i.text().trimmed();
543
else if ( tag == "FN" )
544
d->fullName = i.text().trimmed();
545
else if ( tag == "N" ) {
546
d->familyName = subTagText(i, "FAMILY");
547
d->givenName = subTagText(i, "GIVEN");
548
d->middleName = subTagText(i, "MIDDLE");
549
d->prefixName = subTagText(i, "PREFIX");
550
d->suffixName = subTagText(i, "SUFFIX");
552
else if ( tag == "NICKNAME" )
553
d->nickName = i.text().trimmed();
554
else if ( tag == "PHOTO" ) {
555
d->photo = QCA::Base64().stringToArray(subTagText(i, "BINVAL").replace("\n","")).toByteArray();
556
d->photoURI = subTagText(i, "EXTVAL");
558
else if ( tag == "BDAY" )
559
d->bday = i.text().trimmed();
560
else if ( tag == "ADR" ) {
563
a.home = hasSubTag(i, "HOME");
564
a.work = hasSubTag(i, "WORK");
565
a.postal = hasSubTag(i, "POSTAL");
566
a.parcel = hasSubTag(i, "PARCEL");
567
a.dom = hasSubTag(i, "DOM");
568
a.intl = hasSubTag(i, "INTL");
569
a.pref = hasSubTag(i, "PREF");
571
a.pobox = subTagText(i, "POBOX");
572
a.extaddr = subTagText(i, "EXTADR");
573
a.street = subTagText(i, "STREET");
574
a.locality = subTagText(i, "LOCALITY");
575
a.region = subTagText(i, "REGION");
576
a.pcode = subTagText(i, "PCODE");
577
a.country = subTagText(i, "CTRY");
579
if ( a.country.isEmpty() ) // FIXME: Workaround for Psi prior to 0.9
580
if ( hasSubTag(i, "COUNTRY") )
581
a.country = subTagText(i, "COUNTRY");
583
if ( a.extaddr.isEmpty() ) // FIXME: Workaround for Psi prior to 0.9
584
if ( hasSubTag(i, "EXTADD") )
585
a.extaddr = subTagText(i, "EXTADD");
587
d->addressList.append ( a );
589
else if ( tag == "LABEL" ) {
592
l.home = hasSubTag(i, "HOME");
593
l.work = hasSubTag(i, "WORK");
594
l.postal = hasSubTag(i, "POSTAL");
595
l.parcel = hasSubTag(i, "PARCEL");
596
l.dom = hasSubTag(i, "DOM");
597
l.intl = hasSubTag(i, "INTL");
598
l.pref = hasSubTag(i, "PREF");
600
QDomNode nn = i.firstChild();
601
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
602
QDomElement ii = nn.toElement();
606
if ( ii.tagName().toUpper() == "LINE" )
607
l.lines.append ( ii.text().trimmed() );
610
d->labelList.append ( l );
612
else if ( tag == "TEL" ) {
615
p.home = hasSubTag(i, "HOME");
616
p.work = hasSubTag(i, "WORK");
617
p.voice = hasSubTag(i, "VOICE");
618
p.fax = hasSubTag(i, "FAX");
619
p.pager = hasSubTag(i, "PAGER");
620
p.msg = hasSubTag(i, "MSG");
621
p.cell = hasSubTag(i, "CELL");
622
p.video = hasSubTag(i, "VIDEO");
623
p.bbs = hasSubTag(i, "BBS");
624
p.modem = hasSubTag(i, "MODEM");
625
p.isdn = hasSubTag(i, "ISDN");
626
p.pcs = hasSubTag(i, "PCS");
627
p.pref = hasSubTag(i, "PREF");
629
p.number = subTagText(i, "NUMBER");
631
if ( p.number.isEmpty() ) // FIXME: Workaround for Psi prior to 0.9
632
if ( hasSubTag(i, "VOICE") )
633
p.number = subTagText(i, "VOICE");
635
d->phoneList.append ( p );
637
else if ( tag == "EMAIL" ) {
640
m.home = hasSubTag(i, "HOME");
641
m.work = hasSubTag(i, "WORK");
642
m.internet = hasSubTag(i, "INTERNET");
643
m.x400 = hasSubTag(i, "X400");
645
m.userid = subTagText(i, "USERID");
647
if ( m.userid.isEmpty() ) // FIXME: Workaround for Psi prior to 0.9
648
if ( !i.text().isEmpty() )
649
m.userid = i.text().trimmed();
651
d->emailList.append ( m );
653
else if ( tag == "JABBERID" )
654
d->jid = i.text().trimmed();
655
else if ( tag == "MAILER" )
656
d->mailer = i.text().trimmed();
657
else if ( tag == "TZ" )
658
d->timezone = i.text().trimmed();
659
else if ( tag == "GEO" ) {
660
d->geo.lat = subTagText(i, "LAT");
661
d->geo.lon = subTagText(i, "LON");
663
else if ( tag == "TITLE" )
664
d->title = i.text().trimmed();
665
else if ( tag == "ROLE" )
666
d->role = i.text().trimmed();
667
else if ( tag == "LOGO" ) {
668
d->logo = QCA::Base64().stringToArray( subTagText(i, "BINVAL").replace("\n","") ).toByteArray();
669
d->logoURI = subTagText(i, "EXTVAL");
671
else if ( tag == "AGENT" ) {
672
e = findSubTag(i, "VCARD", &found);
675
if ( a.fromXml(e) ) {
677
d->agent = new VCard;
682
d->agentURI = subTagText(i, "EXTVAL");
684
else if ( tag == "ORG" ) {
685
d->org.name = subTagText(i, "ORGNAME");
687
QDomNode nn = i.firstChild();
688
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
689
QDomElement ii = nn.toElement();
693
if ( ii.tagName().toUpper() == "ORGUNIT" )
694
d->org.unit.append( ii.text().trimmed() );
697
else if ( tag == "CATEGORIES") {
698
QDomNode nn = i.firstChild();
699
for ( ; !nn.isNull(); nn = nn.nextSibling() ) {
700
QDomElement ee = nn.toElement();
704
if ( ee.tagName().toUpper() == "KEYWORD" )
705
d->categories << ee.text().trimmed();
708
else if ( tag == "NOTE" )
709
d->note = i.text().trimmed();
710
else if ( tag == "PRODID" )
711
d->prodId = i.text().trimmed();
712
else if ( tag == "REV" )
713
d->rev = i.text().trimmed();
714
else if ( tag == "SORT-STRING" )
715
d->sortString = i.text().trimmed();
716
else if ( tag == "SOUND" ) {
717
d->sound = QCA::Base64().stringToArray( subTagText(i, "BINVAL").replace("\n","") ).toByteArray();
718
d->soundURI = subTagText(i, "EXTVAL");
719
d->soundPhonetic = subTagText(i, "PHONETIC");
721
else if ( tag == "UID" )
722
d->uid = i.text().trimmed();
723
else if ( tag == "URL")
724
d->url = i.text().trimmed();
725
else if ( tag == "DESC" )
726
d->desc = i.text().trimmed();
727
else if ( tag == "CLASS" ) {
728
if ( hasSubTag(i, "PUBLIC") )
729
d->privacyClass = pcPublic;
730
else if ( hasSubTag(i, "PRIVATE") )
731
d->privacyClass = pcPrivate;
732
else if ( hasSubTag(i, "CONFIDENTIAL") )
733
d->privacyClass = pcConfidential;
735
else if ( tag == "KEY" ) {
736
// TODO: Justin, please check out this code
737
e = findSubTag(i, "TYPE", &found);
738
QString type = "text/plain";
740
type = e.text().trimmed();
742
e = findSubTag(i, "CRED", &found );
744
e = findSubTag(i, "BINVAL", &found); // case for very clever clients ;-)
747
d->key = e.text().toUtf8(); // FIXME
754
bool VCard::isEmpty() const
761
VCard::Address::Address()
763
home = work = postal = parcel = dom = intl = pref = false;
766
VCard::Label::Label()
768
home = work = postal = parcel = dom = intl = pref = false;
771
VCard::Phone::Phone()
773
home = work = voice = fax = pager = msg = cell = video = bbs = modem = isdn = pcs = pref = false;
776
VCard::Email::Email()
778
home = work = internet = x400 = false;
789
// vCard properties...
791
const QString &VCard::version() const
796
void VCard::setVersion(const QString &v)
801
const QString &VCard::fullName() const
806
void VCard::setFullName(const QString &n)
811
const QString &VCard::familyName() const
813
return d->familyName;
816
void VCard::setFamilyName(const QString &n)
821
const QString &VCard::givenName() const
826
void VCard::setGivenName(const QString &n)
831
const QString &VCard::middleName() const
833
return d->middleName;
836
void VCard::setMiddleName(const QString &n)
841
const QString &VCard::prefixName() const
843
return d->prefixName;
846
void VCard::setPrefixName(const QString &p)
851
const QString &VCard::suffixName() const
853
return d->suffixName;
856
void VCard::setSuffixName(const QString &s)
861
const QString &VCard::nickName() const
866
void VCard::setNickName(const QString &n)
871
const QByteArray &VCard::photo() const
876
void VCard::setPhoto(const QByteArray &i)
881
const QString &VCard::photoURI() const
886
void VCard::setPhotoURI(const QString &p)
891
const QDate VCard::bday() const
893
return QDate::fromString(d->bday);
896
void VCard::setBday(const QDate &date)
898
d->bday = date.toString();
901
const QString &VCard::bdayStr() const
906
void VCard::setBdayStr(const QString &date)
911
const VCard::AddressList &VCard::addressList() const
913
return d->addressList;
916
void VCard::setAddressList(const VCard::AddressList &a)
921
const VCard::LabelList &VCard::labelList() const
926
void VCard::setLabelList(const VCard::LabelList &l)
931
const VCard::PhoneList &VCard::phoneList() const
936
void VCard::setPhoneList(const VCard::PhoneList &p)
941
const VCard::EmailList &VCard::emailList() const
946
void VCard::setEmailList(const VCard::EmailList &e)
951
const QString &VCard::jid() const
956
void VCard::setJid(const QString &j)
961
const QString &VCard::mailer() const
966
void VCard::setMailer(const QString &m)
971
const QString &VCard::timezone() const
976
void VCard::setTimezone(const QString &t)
981
const VCard::Geo &VCard::geo() const
986
void VCard::setGeo(const VCard::Geo &g)
991
const QString &VCard::title() const
996
void VCard::setTitle(const QString &t)
1001
const QString &VCard::role() const
1006
void VCard::setRole(const QString &r)
1011
const QByteArray &VCard::logo() const
1016
void VCard::setLogo(const QByteArray &i)
1021
const QString &VCard::logoURI() const
1026
void VCard::setLogoURI(const QString &l)
1031
const VCard *VCard::agent() const
1036
void VCard::setAgent(const VCard &v)
1039
d->agent = new VCard;
1043
const QString VCard::agentURI() const
1048
void VCard::setAgentURI(const QString &a)
1053
const VCard::Org &VCard::org() const
1058
void VCard::setOrg(const VCard::Org &o)
1063
const QStringList &VCard::categories() const
1065
return d->categories;
1068
void VCard::setCategories(const QStringList &c)
1073
const QString &VCard::note() const
1078
void VCard::setNote(const QString &n)
1083
const QString &VCard::prodId() const
1088
void VCard::setProdId(const QString &p)
1093
const QString &VCard::rev() const
1098
void VCard::setRev(const QString &r)
1103
const QString &VCard::sortString() const
1105
return d->sortString;
1108
void VCard::setSortString(const QString &s)
1113
const QByteArray &VCard::sound() const
1118
void VCard::setSound(const QByteArray &s)
1123
const QString &VCard::soundURI() const
1128
void VCard::setSoundURI(const QString &s)
1133
const QString &VCard::soundPhonetic() const
1135
return d->soundPhonetic;
1138
void VCard::setSoundPhonetic(const QString &s)
1140
d->soundPhonetic = s;
1143
const QString &VCard::uid() const
1148
void VCard::setUid(const QString &u)
1153
const QString &VCard::url() const
1158
void VCard::setUrl(const QString &u)
1163
const QString &VCard::desc() const
1168
void VCard::setDesc(const QString &desc)
1173
const VCard::PrivacyClass &VCard::privacyClass() const
1175
return d->privacyClass;
1178
void VCard::setPrivacyClass(const VCard::PrivacyClass &c)
1180
d->privacyClass = c;
1183
const QByteArray &VCard::key() const
1188
void VCard::setKey(const QByteArray &k)