[folks] Add equal method to StructuredName
- From: Raul Gutierrez Segales <raulgs src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Add equal method to StructuredName
- Date: Thu, 24 Mar 2011 11:10:00 +0000 (UTC)
commit 1c2765353e583dfaba53506fd6776372ef7dc149
Author: Raul Gutierrez Segales <raul gutierrez segales collabora co uk>
Date: Tue Mar 22 21:16:28 2011 +0000
Add equal method to StructuredName
NEWS | 3 +++
folks/name-details.vala | 17 +++++++++++++++++
2 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 817db46..a3be933 100644
--- a/NEWS
+++ b/NEWS
@@ -12,6 +12,9 @@ Bugs fixed:
* Crasher when removing Personas
* Crasher when reconnecting a Telepathy account
+API changes:
+* Add equal () to StructuredName
+
Overview of changes from libfolks 0.3.6 to libfolks 0.4.0
=========================================================
diff --git a/folks/name-details.vala b/folks/name-details.vala
index c685310..d06011b 100644
--- a/folks/name-details.vala
+++ b/folks/name-details.vala
@@ -165,6 +165,23 @@ public class Folks.StructuredName : Object
}
/**
+ * Whether two StructuredNames are the same.
+ *
+ * @return `true` if all the components are the same, `false`
+ * otherwise.
+ *
+ * @since UNRELEASED
+ */
+ public bool equal (StructuredName other)
+ {
+ return this._family_name == other.family_name &&
+ this._given_name == other.given_name &&
+ this._additional_names == other.additional_names &&
+ this._prefixes == other.prefixes &&
+ this._suffixes == other.suffixes;
+ }
+
+ /**
* Formatted version of the structured name.
*
* @since 0.4.0
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]