aboutsummaryrefslogtreecommitdiff
path: root/src/base/QXmppVCardIq.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/QXmppVCardIq.cpp')
-rw-r--r--src/base/QXmppVCardIq.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/base/QXmppVCardIq.cpp b/src/base/QXmppVCardIq.cpp
index 7701b60a..8733256b 100644
--- a/src/base/QXmppVCardIq.cpp
+++ b/src/base/QXmppVCardIq.cpp
@@ -98,6 +98,8 @@ bool operator==(const QXmppVCardAddress &left, const QXmppVCardAddress &right)
left.street() == right.street();
}
+/// \brief Checks if two address objects represent different addresses.
+
bool operator!=(const QXmppVCardAddress &left, const QXmppVCardAddress &right)
{
return !(left == right);
@@ -267,6 +269,21 @@ QXmppVCardEmail& QXmppVCardEmail::operator=(const QXmppVCardEmail &other)
return *this;
}
+/// \brief Checks if two email objects represent the same email address.
+
+bool operator==(const QXmppVCardEmail &left, const QXmppVCardEmail &right)
+{
+ return left.type() == right.type() &&
+ left.address() == right.address();
+}
+
+/// \brief Checks if two email objects represent different email addresses.
+
+bool operator!=(const QXmppVCardEmail &left, const QXmppVCardEmail &right)
+{
+ return !(left == right);
+}
+
/// Returns the e-mail address.
QString QXmppVCardEmail::address() const
@@ -370,6 +387,21 @@ QString QXmppVCardPhone::number() const
return d->number;
}
+/// \brief Checks if two phone objects represent the same phone number.
+
+bool operator==(const QXmppVCardPhone &left, const QXmppVCardPhone &right)
+{
+ return left.type() == right.type() &&
+ left.number() == right.number();
+}
+
+/// \brief Checks if two phone objects represent different phone numbers.
+
+bool operator!=(const QXmppVCardPhone &left, const QXmppVCardPhone &right)
+{
+ return !(left == right);
+}
+
/// Sets the phone \a number.
void QXmppVCardPhone::setNumber(const QString &number)
@@ -492,6 +524,23 @@ QXmppVCardOrganization& QXmppVCardOrganization::operator=(const QXmppVCardOrgani
return *this;
}
+/// \brief Checks if two organization objects represent the same organization.
+
+bool operator==(const QXmppVCardOrganization &left, const QXmppVCardOrganization &right)
+{
+ return left.organization() == right.organization() &&
+ left.unit() == right.unit() &&
+ left.title() == right.title() &&
+ left.role() == right.role();
+}
+
+/// \brief Checks if two organization objects represent different organizations.
+
+bool operator!=(const QXmppVCardOrganization &left, const QXmppVCardOrganization &right)
+{
+ return !(left == right);
+}
+
/// Returns the name of the organization.
QString QXmppVCardOrganization::organization() const