aboutsummaryrefslogtreecommitdiff
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/QXmppVCardIq.cpp28
-rw-r--r--src/base/QXmppVCardIq.h3
2 files changed, 31 insertions, 0 deletions
diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp
index 8733256b..4a237200 100644
--- a/src/base/QXmppVCardIq.cpp
+++ b/src/base/QXmppVCardIq.cpp
@@ -678,6 +678,34 @@ QXmppVCardIq& QXmppVCardIq::operator=(const QXmppVCardIq &other)
return *this;
}
+/// \brief Checks if two VCard objects represent the same VCard.
+
+bool operator==(const QXmppVCardIq &left, const QXmppVCardIq &right)
+{
+ return left.birthday() == right.birthday() &&
+ left.description() == right.description() &&
+ left.email() == right.email() &&
+ left.firstName() == right.firstName() &&
+ left.fullName() == right.fullName() &&
+ left.lastName() == right.lastName() &&
+ left.middleName() == right.middleName() &&
+ left.nickName() == right.nickName() &&
+ left.photo() == right.photo() &&
+ left.photoType() == right.photoType() &&
+ left.url() == right.url() &&
+ left.addresses() == right.addresses() &&
+ left.emails() == right.emails() &&
+ left.phones() == right.phones() &&
+ left.organization() == right.organization();
+}
+
+/// \brief Checks if two VCard objects represent different VCards.
+
+bool operator!=(const QXmppVCardIq &left, const QXmppVCardIq &right)
+{
+ return !(left == right);
+}
+
/// Returns the date of birth of the individual associated with the vCard.
///
diff --git a/src/base/QXmppVCardIq.h b/src/base/QXmppVCardIq.h
index dc3a1f78..966ff632 100644
--- a/src/base/QXmppVCardIq.h
+++ b/src/base/QXmppVCardIq.h
@@ -291,4 +291,7 @@ private:
QSharedDataPointer<QXmppVCardIqPrivate> d;
};
+QXMPP_EXPORT bool operator==(const QXmppVCardIq&, const QXmppVCardIq&);
+QXMPP_EXPORT bool operator!=(const QXmppVCardIq&, const QXmppVCardIq&);
+
#endif // QXMPPVCARDIQ_H