14namespace QXmpp::Private {
18class QXmppVCardAddressPrivate;
19class QXmppVCardEmailPrivate;
20class QXmppVCardPhonePrivate;
21class QXmppVCardOrganizationPrivate;
22class QXmppVCardIqPrivate;
37 Q_DECLARE_FLAGS(Type, TypeFlag)
66 static constexpr std::tuple XmlTag = { u
"ADR", QXmpp::Private::ns_vcard };
67 void parse(
const QDomElement &element);
68 void toXml(QXmlStreamWriter *stream)
const;
72 QSharedDataPointer<QXmppVCardAddressPrivate> d;
92 Q_DECLARE_FLAGS(Type, TypeFlag)
107 static constexpr std::tuple XmlTag = { u
"EMAIL", QXmpp::Private::ns_vcard };
108 void parse(
const QDomElement &element);
109 void toXml(QXmlStreamWriter *stream)
const;
113 QSharedDataPointer<QXmppVCardEmailPrivate> d;
141 Q_DECLARE_FLAGS(Type, TypeFlag)
156 static constexpr std::tuple XmlTag = { u
"TEL", QXmpp::Private::ns_vcard };
157 void parse(
const QDomElement &element);
158 void toXml(QXmlStreamWriter *stream)
const;
162 QSharedDataPointer<QXmppVCardPhonePrivate> d;
185 QString
unit()
const;
188 QString
title()
const;
191 QString
role()
const;
195 void parse(
const QDomElement &element);
196 void toXml(QXmlStreamWriter *stream)
const;
200 QSharedDataPointer<QXmppVCardOrganizationPrivate> d;
231 QString
email()
const;
249 QByteArray
photo()
const;
256 void setUrl(
const QString &);
258 QList<QXmppVCardAddress>
addresses()
const;
261 QList<QXmppVCardEmail>
emails()
const;
264 QList<QXmppVCardPhone>
phones()
const;
271 static constexpr std::tuple PayloadXmlTag = { u
"vCard", QXmpp::Private::ns_vcard };
272 [[deprecated(
"Use QXmpp::isIqElement()")]]
273 static bool isVCard(
const QDomElement &element);
275 static bool checkIqType(
const QString &tagName,
const QString &xmlNamespace);
279 friend struct QXmpp::Private::VCardData;
282 void parseElementFromChild(
const QDomElement &)
override;
283 void toXmlElementFromChild(QXmlStreamWriter *writer)
const override;
287 QSharedDataPointer<QXmppVCardIqPrivate> d;
QXmppIq(QXmppIq::Type type=QXmppIq::Get)
Definition QXmppIq.cpp:39
QXmppIq::Type type() const
Definition QXmppIq.cpp:60
Represent a vCard address.
Definition QXmppVCardIq.h:27
TypeFlag
Describes e-mail address types.
Definition QXmppVCardIq.h:30
void setPostcode(const QString &postcode)
Sets the postcode.
Definition QXmppVCardIq.cpp:141
QXmppVCardAddress(const QXmppVCardAddress &other)
Copy-constructor.
void setRegion(const QString ®ion)
Sets the region.
Definition QXmppVCardIq.cpp:153
void setType(Type type)
Sets the address type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:177
QXmppVCardAddress(QXmppVCardAddress &&)
Move-constructor.
Type type() const
Returns the address type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:171
QString region() const
Returns the region.
Definition QXmppVCardIq.cpp:147
QXmppVCardAddress & operator=(const QXmppVCardAddress &other)
Assignment operator.
void setLocality(const QString &locality)
Sets the locality.
Definition QXmppVCardIq.cpp:128
QString street() const
Returns the street address.
Definition QXmppVCardIq.cpp:159
void setStreet(const QString &street)
Sets the street address.
Definition QXmppVCardIq.cpp:165
QXmppVCardAddress()
Constructs an empty address.
Definition QXmppVCardIq.cpp:77
QString postcode() const
Returns the postcode.
Definition QXmppVCardIq.cpp:135
QString country() const
Returns the country.
Definition QXmppVCardIq.cpp:110
QString locality() const
Returns the locality.
Definition QXmppVCardIq.cpp:122
QXmppVCardAddress & operator=(QXmppVCardAddress &&)
Move-assignment operator.
void setCountry(const QString &country)
Sets the country.
Definition QXmppVCardIq.cpp:116
Represents a vCard e-mail address.
Definition QXmppVCardIq.h:81
TypeFlag
Describes e-mail address types.
Definition QXmppVCardIq.h:84
void setAddress(const QString &address)
Sets the e-mail address.
Definition QXmppVCardIq.cpp:264
QXmppVCardEmail(const QXmppVCardEmail &other)
Copy-constructor.
QString address() const
Returns the e-mail address.
Definition QXmppVCardIq.cpp:258
QXmppVCardEmail & operator=(const QXmppVCardEmail &other)
Copy-assignment operator.
QXmppVCardEmail()
Constructs an empty e-mail address.
Definition QXmppVCardIq.cpp:231
void setType(Type type)
Sets the e-mail type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:276
Type type() const
Returns the e-mail type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:270
Represents the XMPP vCard.
Definition QXmppVCardIq.h:217
void setPhoto(const QByteArray &)
Sets the photo's binary contents.
Definition QXmppVCardIq.cpp:778
QXmppVCardIq & operator=(const QXmppVCardIq &other)
Assigns other to this vCard IQ.
Definition QXmppVCardIq.cpp:604
QByteArray photo() const
Definition QXmppVCardIq.cpp:772
QString lastName() const
Returns the last name.
Definition QXmppVCardIq.cpp:704
QString nickName() const
Returns the nickname.
Definition QXmppVCardIq.cpp:728
QDate birthday() const
Returns the date of birth of the individual associated with the vCard.
Definition QXmppVCardIq.cpp:637
QString email() const
Returns the email address.
Definition QXmppVCardIq.cpp:661
QString photoType() const
Returns the photo's MIME type.
Definition QXmppVCardIq.cpp:784
void setOrganization(const QXmppVCardOrganization &)
Sets the organization info.
Definition QXmppVCardIq.cpp:838
void setFullName(const QString &)
Sets the full name.
Definition QXmppVCardIq.cpp:698
QString fullName() const
Returns the full name.
Definition QXmppVCardIq.cpp:692
QString firstName() const
Returns the first name.
Definition QXmppVCardIq.cpp:680
QString middleName() const
Returns the middle name.
Definition QXmppVCardIq.cpp:716
void setUrl(const QString &)
Definition QXmppVCardIq.cpp:754
QXmppVCardOrganization organization() const
Returns the organization info.
Definition QXmppVCardIq.cpp:832
QXmppVCardIq(const QString &bareJid=QString())
Constructs a QXmppVCardIq for the specified recipient.
Definition QXmppVCardIq.cpp:586
QList< QXmppVCardEmail > emails() const
Returns the e-mail addresses.
Definition QXmppVCardIq.cpp:808
QString url() const
Definition QXmppVCardIq.cpp:744
void setFirstName(const QString &)
Sets the first name.
Definition QXmppVCardIq.cpp:686
void setDescription(const QString &description)
Sets the free-form descriptive text.
Definition QXmppVCardIq.cpp:655
void setNickName(const QString &)
Sets the nickname.
Definition QXmppVCardIq.cpp:734
void setMiddleName(const QString &)
Sets the middle name.
Definition QXmppVCardIq.cpp:722
void setEmail(const QString &)
Sets the email address.
Definition QXmppVCardIq.cpp:671
QList< QXmppVCardPhone > phones() const
Returns the phone numbers.
Definition QXmppVCardIq.cpp:820
void setBirthday(const QDate &birthday)
Sets the date of birth of the individual associated with the vCard.
Definition QXmppVCardIq.cpp:643
void setPhotoType(const QString &type)
Sets the photo's MIME type.
Definition QXmppVCardIq.cpp:790
QString description() const
Returns the free-form descriptive text.
Definition QXmppVCardIq.cpp:649
void setAddresses(const QList< QXmppVCardAddress > &addresses)
Sets the addresses.
Definition QXmppVCardIq.cpp:802
void setLastName(const QString &)
Sets the last name.
Definition QXmppVCardIq.cpp:710
QList< QXmppVCardAddress > addresses() const
Returns the addresses.
Definition QXmppVCardIq.cpp:796
void setEmails(const QList< QXmppVCardEmail > &emails)
Sets the e-mail addresses.
Definition QXmppVCardIq.cpp:814
void setPhones(const QList< QXmppVCardPhone > &phones)
Sets the phone numbers.
Definition QXmppVCardIq.cpp:826
Represents organization information in XMPP vCards.
Definition QXmppVCardIq.h:174
QString title() const
Returns the job title within the organization.
Definition QXmppVCardIq.cpp:524
QString role() const
Returns the job role within the organization.
Definition QXmppVCardIq.cpp:512
QString unit() const
Returns the organization unit (also known as department).
Definition QXmppVCardIq.cpp:500
void setRole(const QString &)
Sets the job role within the organization.
Definition QXmppVCardIq.cpp:518
void setTitle(const QString &)
Sets the job title within the organization.
Definition QXmppVCardIq.cpp:530
void setUnit(const QString &)
Sets the unit within the organization.
Definition QXmppVCardIq.cpp:506
QString organization() const
Returns the name of the organization.
Definition QXmppVCardIq.cpp:488
void setOrganization(const QString &)
Sets the organization name.
Definition QXmppVCardIq.cpp:494
QXmppVCardOrganization & operator=(const QXmppVCardOrganization &other)
Assigns other to this organization info.
Definition QXmppVCardIq.cpp:466
QXmppVCardOrganization()
Constructs an empty organization information.
Definition QXmppVCardIq.cpp:452
Represents a vCard phone number.
Definition QXmppVCardIq.h:122
void setNumber(const QString &number)
Sets the phone number.
Definition QXmppVCardIq.cpp:358
TypeFlag
Describes phone number types.
Definition QXmppVCardIq.h:125
Type type() const
Returns the phone number type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:364
QXmppVCardPhone & operator=(const QXmppVCardPhone &other)
Copy-assignment operator.
QString number() const
Returns the phone number.
Definition QXmppVCardIq.cpp:339
QXmppVCardPhone()
Constructs an empty phone number.
Definition QXmppVCardIq.cpp:325
QXmppVCardPhone(const QXmppVCardPhone &other)
Copy-constructor.
void setType(Type type)
Sets the phone number type, which is a combination of TypeFlag.
Definition QXmppVCardIq.cpp:370