diff options
| author | 0xd34df00d <0xd34df00d@gmail.com> | 2014-03-22 22:51:00 +0400 |
|---|---|---|
| committer | 0xd34df00d <0xd34df00d@gmail.com> | 2014-03-22 22:51:00 +0400 |
| commit | 23d73cbe97ecf10f8b45787447b9971a068e61c8 (patch) | |
| tree | b77254e5c646995cccd15c09aafeaaecc77bceda /src/base/QXmppVCardIq.h | |
| parent | a4c3f19e874cace34af4476a06cc4b530b46c516 (diff) | |
| download | qxmpp-23d73cbe97ecf10f8b45787447b9971a068e61c8.tar.gz | |
Added QXmppVCardOrganization API.
Diffstat (limited to 'src/base/QXmppVCardIq.h')
| -rw-r--r-- | src/base/QXmppVCardIq.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/base/QXmppVCardIq.h b/src/base/QXmppVCardIq.h index e1de81b6..1a2ebe06 100644 --- a/src/base/QXmppVCardIq.h +++ b/src/base/QXmppVCardIq.h @@ -33,6 +33,7 @@ class QXmppVCardAddressPrivate; class QXmppVCardEmailPrivate; class QXmppVCardPhonePrivate; +class QXmppVCardOrganizationPrivate; class QXmppVCardIqPrivate; /// \brief Represent a vCard address. @@ -165,6 +166,41 @@ private: QSharedDataPointer<QXmppVCardPhonePrivate> d; }; +/// \brief Represents organization information in XMPP vCards. +/// +/// This contains both information about organization itself and +/// information about job position in the organization. + +class QXMPP_EXPORT QXmppVCardOrganization +{ +public: + QXmppVCardOrganization(); + QXmppVCardOrganization(const QXmppVCardOrganization &other); + ~QXmppVCardOrganization(); + + QXmppVCardOrganization& operator=(const QXmppVCardOrganization &other); + + QString organization() const; + void setOrganization(const QString&); + + QString unit() const; + void setUnit(const QString&); + + QString title() const; + void setTitle(const QString&); + + QString role() const; + void setRole(const QString&); + + /// \cond + void parse(const QDomElement &element); + void toXml(QXmlStreamWriter *stream) const; + /// \endcond + +private: + QSharedDataPointer<QXmppVCardOrganizationPrivate> d; +}; + /// \brief Represents the XMPP vCard. /// /// The functions names are self explanatory. @@ -226,6 +262,9 @@ public: QList<QXmppVCardPhone> phones() const; void setPhones(const QList<QXmppVCardPhone> &phones); + QXmppVCardOrganization organization() const; + void setOrganization(const QXmppVCardOrganization&); + /// \cond static bool isVCard(const QDomElement &element); /// \endcond |
