[folks] Revert "Port folks to libgee 0.8."
- From: Jeremy Whiting <jpwhiting src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Revert "Port folks to libgee 0.8."
- Date: Tue, 24 Jul 2012 19:22:39 +0000 (UTC)
commit 80f317be05e60d94fea4a691506760a8b35f314e
Author: Jeremy Whiting <jpwhiting kde org>
Date: Tue Jul 24 12:44:25 2012 -0600
Revert "Port folks to libgee 0.8."
This reverts commit e069bbe59dc54eb3595d8ee5c96aea4a36cff9aa.
backends/eds/lib/edsf-persona.vala | 60 ++++++++++----------
backends/key-file/kf-persona.vala | 15 ++---
backends/libsocialweb/lib/swf-persona.vala | 11 ++--
.../telepathy/lib/tpf-persona-store-cache.vala | 12 ++--
backends/telepathy/lib/tpf-persona.vala | 28 +++++-----
backends/tracker/lib/trf-persona-store.vala | 4 +-
backends/tracker/lib/trf-persona.vala | 52 +++++++++---------
folks/abstract-field-details.vala | 48 ----------------
folks/backend-store.vala | 9 ++-
folks/debug.vala | 2 +-
folks/individual-aggregator.vala | 8 +-
folks/individual.vala | 47 ++++++++--------
folks/potential-match.vala | 2 +-
tests/eds/add-persona.vala | 20 +++---
tests/eds/email-details.vala | 3 +-
tests/eds/individual-retrieval.vala | 3 +-
tests/eds/link-personas.vala | 20 +++---
tests/eds/phone-details.vala | 3 +-
tests/eds/set-emails.vala | 4 +-
tests/eds/set-im-addresses.vala | 4 +-
tests/eds/set-phones.vala | 4 +-
tests/eds/set-roles.vala | 4 +-
tests/folks/aggregation.vala | 2 +-
tests/folks/backend-loading.vala | 12 ++--
tests/key-file/individual-retrieval.vala | 3 +-
tests/telepathy/individual-properties.vala | 12 ++--
tests/telepathy/individual-retrieval.vala | 7 +-
tests/tracker/add-persona.vala | 28 +++++-----
tests/tracker/duplicated-emails.vala | 8 +-
tests/tracker/duplicated-phones.vala | 8 +-
tests/tracker/link-personas.vala | 8 +-
tests/tracker/match-email-addresses.vala | 8 +-
tests/tracker/match-im-addresses.vala | 8 +-
tests/tracker/match-known-emails.vala | 8 +-
tests/tracker/match-phone-number.vala | 8 +-
tests/tracker/remove-persona.vala | 4 +-
tests/tracker/set-duplicate-email.vala | 8 +-
tests/tracker/set-emails.vala | 4 +-
tests/tracker/set-im-addresses.vala | 4 +-
tests/tracker/set-notes.vala | 4 +-
tests/tracker/set-phones.vala | 4 +-
tests/tracker/set-postal-addresses.vala | 4 +-
tests/tracker/set-roles.vala | 4 +-
tests/tracker/set-urls.vala | 4 +-
tools/inspect/inspect.vala | 2 +-
45 files changed, 240 insertions(+), 285 deletions(-)
---
diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
index 85c82c4..71804c3 100644
--- a/backends/eds/lib/edsf-persona.vala
+++ b/backends/eds/lib/edsf-persona.vala
@@ -491,8 +491,8 @@ public class Edsf.Persona : Folks.Persona,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
/**
* { inheritDoc}
@@ -785,37 +785,37 @@ public class Edsf.Persona : Folks.Persona,
this._gender = Gender.UNSPECIFIED;
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
this._email_addresses = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
this._email_addresses_ro = this._email_addresses.read_only_view;
this._notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
this._notes_ro = this._notes.read_only_view;
this._urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
this._urls_ro = this._urls.read_only_view;
this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
this._postal_addresses_ro = this._postal_addresses.read_only_view;
this._local_ids = new HashSet<string> ();
this._local_ids_ro = this._local_ids.read_only_view;
this._web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
this._groups = new HashSet<string> ();
this._groups_ro = this._groups.read_only_view;
this._roles = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
this._roles_ro = this._roles.read_only_view;
this._anti_links = new HashSet<string> ();
this._anti_links_ro = this._anti_links.read_only_view;
@@ -1002,8 +1002,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_roles ()
{
var new_roles = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
var default_role_fd = this._get_default_role ();
if (default_role_fd != null)
@@ -1123,8 +1123,8 @@ public class Edsf.Persona : Folks.Persona,
{
var new_services = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
var services = this.contact.get_attribute ("X-FOLKS-WEB-SERVICES-IDS");
if (services != null)
@@ -1156,8 +1156,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_emails ()
{
var new_email_addresses = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var attrs = this.contact.get_attributes (E.ContactField.EMAIL);
foreach (var attr in attrs)
@@ -1185,8 +1185,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_notes ()
{
var new_notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
var n = this._get_property<string> ("note");
if (n != null && n != "")
@@ -1393,8 +1393,8 @@ public class Edsf.Persona : Folks.Persona,
{
var im_eds_map = this._get_im_eds_map ();
var new_im_addresses = new HashMultiMap<string, ImFieldDetails> (null,
- null, AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ null, (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
foreach (var im_proto in im_eds_map.get_keys ())
{
@@ -1635,8 +1635,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_phones ()
{
var new_phone_numbers = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var attrs = this.contact.get_attributes (E.ContactField.TEL);
foreach (var attr in attrs)
@@ -1724,8 +1724,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_addresses ()
{
var new_postal_addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var attrs = this.contact.get_attributes (E.ContactField.ADDRESS);
foreach (unowned E.VCardAttribute attr in attrs)
diff --git a/backends/key-file/kf-persona.vala b/backends/key-file/kf-persona.vala
index 05b471d..3977040 100644
--- a/backends/key-file/kf-persona.vala
+++ b/backends/key-file/kf-persona.vala
@@ -146,8 +146,8 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
* table of them to set as the new property value */
var new_im_addresses = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
foreach (var protocol2 in im_addresses.get_keys ())
{
@@ -233,8 +233,8 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
var new_web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
foreach (var web_service2 in web_service_addresses.get_keys ())
{
@@ -327,13 +327,12 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
this.iid, this.display_id);
this._im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null, AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ null, null, ImFieldDetails.hash, (EqualFunc) ImFieldDetails.equal);
this._web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
this._anti_links = new HashSet<string> ();
this._anti_links_ro = this._anti_links.read_only_view;
diff --git a/backends/libsocialweb/lib/swf-persona.vala b/backends/libsocialweb/lib/swf-persona.vala
index 14bbcd2..cce3616 100644
--- a/backends/libsocialweb/lib/swf-persona.vala
+++ b/backends/libsocialweb/lib/swf-persona.vala
@@ -148,14 +148,13 @@ public class Swf.Persona : Folks.Persona,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ ImFieldDetails.hash, (EqualFunc) ImFieldDetails.equal);
private HashMultiMap<string, WebServiceFieldDetails> _web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
/**
* { inheritDoc}
@@ -389,8 +388,8 @@ public class Swf.Persona : Folks.Persona,
}
var urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
var website = contact.get_value ("url");
if (website != null)
diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala
index 6db2ac9..bd3321b 100644
--- a/backends/telepathy/lib/tpf-persona-store-cache.vala
+++ b/backends/telepathy/lib/tpf-persona-store-cache.vala
@@ -320,14 +320,14 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
}
var email_address_set = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var phone_number_set = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var url_set = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
if (object_version == 2)
{
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index 84a94a2..6390778 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -348,8 +348,8 @@ public class Tpf.Persona : Folks.Persona,
private HashSet<EmailFieldDetails> _email_addresses =
new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
private Set<EmailFieldDetails> _email_addresses_ro;
/**
@@ -378,8 +378,8 @@ public class Tpf.Persona : Folks.Persona,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
/**
* A mapping of IM protocol to an (unordered) set of IM addresses.
@@ -598,8 +598,8 @@ public class Tpf.Persona : Folks.Persona,
private HashSet<PhoneFieldDetails> _phone_numbers =
new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
private Set<PhoneFieldDetails> _phone_numbers_ro;
/**
@@ -627,8 +627,8 @@ public class Tpf.Persona : Folks.Persona,
}
private HashSet<UrlFieldDetails> _urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
private Set<UrlFieldDetails> _urls_ro;
/**
@@ -855,14 +855,14 @@ public class Tpf.Persona : Folks.Persona,
var new_birthday_str = "";
var new_full_name = "";
var new_email_addresses = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var new_phone_numbers = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var new_urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
var contact_info = this.contact.get_contact_info ();
foreach (var info in contact_info)
diff --git a/backends/tracker/lib/trf-persona-store.vala b/backends/tracker/lib/trf-persona-store.vala
index a95d8ab..ea4564e 100644
--- a/backends/tracker/lib/trf-persona-store.vala
+++ b/backends/tracker/lib/trf-persona-store.vala
@@ -823,8 +823,8 @@ public class Trf.PersonaStore : Folks.PersonaStore
{
var ret = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
var services = ws_addrs.split (";");
foreach (var service_line in services)
diff --git a/backends/tracker/lib/trf-persona.vala b/backends/tracker/lib/trf-persona.vala
index 868a3e5..e9cbfc4 100644
--- a/backends/tracker/lib/trf-persona.vala
+++ b/backends/tracker/lib/trf-persona.vala
@@ -378,8 +378,8 @@ public class Trf.Persona : Folks.Persona,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
/**
* { inheritDoc}
@@ -468,8 +468,8 @@ public class Trf.Persona : Folks.Persona,
private HashMultiMap<string, WebServiceFieldDetails> _web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
/**
* { inheritDoc}
@@ -558,28 +558,28 @@ public class Trf.Persona : Folks.Persona,
this._full_name = "";
this._structured_name = null;
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
this._email_addresses = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
this._email_addresses_ro = this._email_addresses.read_only_view;
this._roles = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
this._roles_ro = this._roles.read_only_view;
this._notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
this._notes_ro = this._notes.read_only_view;
this._urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
this._urls_ro = this._urls.read_only_view;
this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
this._postal_addresses_ro = this._postal_addresses.read_only_view;
this._local_ids = new HashSet<string> ();
this._local_ids_ro = this._local_ids.read_only_view;
@@ -804,8 +804,8 @@ public class Trf.Persona : Folks.Persona,
}
var postal_addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
string[] addresses_a = postal_field.split ("\n");
@@ -984,8 +984,8 @@ public class Trf.Persona : Folks.Persona,
}
HashSet<RoleFieldDetails> role_fds = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
string[] roles_a = roles_field.split ("\n");
@@ -1221,8 +1221,8 @@ public class Trf.Persona : Folks.Persona,
}
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
string[] phones_a = phones_field.split ("\n");
foreach (var p in phones_a)
@@ -1347,8 +1347,8 @@ public class Trf.Persona : Folks.Persona,
}
var email_addresses = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
string[] emails_a = emails_field.split (",");
foreach (var e in emails_a)
@@ -1372,8 +1372,8 @@ public class Trf.Persona : Folks.Persona,
private void _update_urls ()
{
var url_fds = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
var _urls_field = this._cursor.get_string (Trf.Fields.URLS).dup ();
if (_urls_field == null)
diff --git a/folks/abstract-field-details.vala b/folks/abstract-field-details.vala
index d1630f2..91281e4 100644
--- a/folks/abstract-field-details.vala
+++ b/folks/abstract-field-details.vala
@@ -276,32 +276,6 @@ public abstract class Folks.AbstractFieldDetails<T> : Object
}
/**
- * Same as { link AbstractFieldDetails.equal}, but static,
- * so we can use libgee 0.8 without an api break.
- *
- * See [[https://bugzilla.gnome.org/show_bug.cgi?id=673918|673918]]"
- * This can and should be removed next time we break the api.
- * Note: This uses Gee.EqualDataFunc signature, to avoid having to cast.
- *
- * @param left one { link AbstractFieldDetails} to compare
- * @param right another { link AbstractFieldDetails} to compare
- *
- * @return whether the elemants are equal
- *
- * @since UNRELEASED
- */
- public static bool equal_static (void* left,
- void* right)
- {
- GLib.return_val_if_fail (left != null, false);
- GLib.return_val_if_fail (right != null, false);
-
- AbstractFieldDetails left_details = (AbstractFieldDetails) left;
- AbstractFieldDetails right_details = (AbstractFieldDetails) right;
- return left_details.equal (right_details);
- }
-
- /**
* An equality function which only considers parameters.
*
* This function compares:
@@ -431,26 +405,4 @@ public abstract class Folks.AbstractFieldDetails<T> : Object
return hash_func (this.value);
}
-
- /**
- * Same as { link AbstractFieldDetails.hash}, but static,
- * so we can use libgee 0.8 without an api break.
- *
- * See [[https://bugzilla.gnome.org/show_bug.cgi?id=673918|673918]]
- * This can and should be removed next time we break the api.
- * Note: This uses Gee.HashDataFunc signature, to avoit having to cast.
- *
- * @param value the value to hash
- *
- * @return the hash value
- *
- * @since UNRELEASED
- */
- public static uint hash_static (void* value)
- {
- GLib.return_val_if_fail (value != null, 0);
-
- AbstractFieldDetails details = (AbstractFieldDetails) value;
- return details.hash ();
- }
}
diff --git a/folks/backend-store.vala b/folks/backend-store.vala
index 9817422..965b3d3 100644
--- a/folks/backend-store.vala
+++ b/folks/backend-store.vala
@@ -146,9 +146,10 @@ public class Folks.BackendStore : Object {
this._debug.print_status.connect (this._debug_print_status);
- this._modules = new HashMap<string,unowned Module> ();
- this._backend_hash = new HashMap<string,Backend> ();
- this._prepared_backends = new HashMap<string,Backend> ();
+ this._modules = new HashMap<string,unowned Module> (str_hash, str_equal);
+ this._backend_hash = new HashMap<string,Backend> (str_hash, str_equal);
+ this._prepared_backends = new HashMap<string,Backend> (str_hash,
+ str_equal);
this._prepared_backends_ro = this._prepared_backends.read_only_view;
}
@@ -593,7 +594,7 @@ public class Folks.BackendStore : Object {
return null;
}
- var modules_final = new HashMap<string, File> ();
+ var modules_final = new HashMap<string, File> (str_hash, str_equal);
foreach (var info in infos)
{
diff --git a/folks/debug.vala b/folks/debug.vala
index 62b4a1f..233af2f 100644
--- a/folks/debug.vala
+++ b/folks/debug.vala
@@ -236,7 +236,7 @@ public class Folks.Debug : Object
lock (retval._domains)
{
retval._all = false;
- retval._domains = new HashSet<string> ();
+ retval._domains = new HashSet<string> (str_hash, str_equal);
if (debug_flags != null && debug_flags != "")
{
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 1694eb7..d938f5f 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -1903,13 +1903,13 @@ public class Folks.IndividualAggregator : Object
/* `protocols_addrs_set` will be passed to the new Kf.Persona */
var protocols_addrs_set = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
var web_service_addrs_set =
new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
/* List of local_ids */
var local_ids = new Gee.HashSet<string> ();
diff --git a/folks/individual.vala b/folks/individual.vala
index 881bfc1..50ea70e 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -102,7 +102,7 @@ public class Folks.Individual : Object,
{
/* Stores the Personas contained in this Individual. */
private HashSet<Persona> _persona_set =
- new HashSet<Persona> ();
+ new HashSet<Persona> (direct_hash, direct_equal);
/* Read-only view of the above set */
private Set<Persona> _persona_set_ro;
/* Mapping from PersonaStore -> number of Personas from that store contained
@@ -470,8 +470,8 @@ public class Folks.Individual : Object,
}
private HashSet<UrlFieldDetails> _urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
private Set<UrlFieldDetails> _urls_ro;
/**
@@ -486,8 +486,8 @@ public class Folks.Individual : Object,
private HashSet<PhoneFieldDetails> _phone_numbers =
new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
private Set<PhoneFieldDetails> _phone_numbers_ro;
/**
@@ -502,8 +502,8 @@ public class Folks.Individual : Object,
private HashSet<EmailFieldDetails> _email_addresses =
new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
private Set<EmailFieldDetails> _email_addresses_ro;
/**
@@ -517,8 +517,8 @@ public class Folks.Individual : Object,
}
private HashSet<RoleFieldDetails> _roles = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
private Set<RoleFieldDetails> _roles_ro;
/**
@@ -569,8 +569,8 @@ public class Folks.Individual : Object,
}
private HashSet<NoteFieldDetails> _notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
private Set<NoteFieldDetails> _notes_ro;
/**
@@ -585,8 +585,8 @@ public class Folks.Individual : Object,
private HashSet<PostalAddressFieldDetails> _postal_addresses =
new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
private Set<PostalAddressFieldDetails> _postal_addresses_ro;
/**
@@ -748,8 +748,7 @@ public class Folks.Individual : Object,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (
- null, null, AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ null, null, ImFieldDetails.hash, (EqualFunc) ImFieldDetails.equal);
/**
* { inheritDoc}
@@ -763,8 +762,8 @@ public class Folks.Individual : Object,
private HashMultiMap<string, WebServiceFieldDetails> _web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
/**
* { inheritDoc}
@@ -805,7 +804,7 @@ public class Folks.Individual : Object,
public DateTime? last_im_interaction_datetime
{
- get
+ get
{
if (this._last_im_interaction_datetime == null)
{
@@ -834,7 +833,7 @@ public class Folks.Individual : Object,
*/
public uint call_interaction_count
{
- get
+ get
{
uint counter = 0;
/* Iterate over all personas and sum up their call interaction counts*/
@@ -1622,7 +1621,7 @@ public class Folks.Individual : Object,
}
/* Subscribe to the interactions signal for the persona */
var p_interaction_details = persona as InteractionDetails;
- if (p_interaction_details != null)
+ if (p_interaction_details != null)
{
persona.notify["im-interaction-count"].connect (this._notify_im_interaction_count_cb);
persona.notify["call-interaction-count"].connect (this._notify_call_interaction_count_cb);
@@ -1763,7 +1762,7 @@ public class Folks.Individual : Object,
/* Unsubscribe from the interactions signal for the persona */
var p_interaction_details = persona as InteractionDetails;
- if (p_interaction_details != null)
+ if (p_interaction_details != null)
{
persona.notify["im-interaction-count"].disconnect (this._notify_im_interaction_count_cb);
persona.notify["call-interaction-count"].disconnect (this._notify_call_interaction_count_cb);
@@ -1830,7 +1829,7 @@ public class Folks.Individual : Object,
/* Populate the URLs as the union of our Personas' URLs.
* If the same URL exists multiple times we merge the parameters. */
var urls_set = new HashMap<unowned string, unowned UrlFieldDetails> (
- null, null, AbstractFieldDetails<string>.equal_static);
+ null, null, (GLib.EqualFunc) UrlFieldDetails.equal);
this._urls.clear ();
@@ -1864,7 +1863,7 @@ public class Folks.Individual : Object,
* If the same number exists multiple times we merge the parameters. */
var phone_numbers_set =
new HashMap<unowned string, unowned PhoneFieldDetails> (
- null, null, AbstractFieldDetails<string>.equal_static);
+ null, null, (GLib.EqualFunc) PhoneFieldDetails.equal);
this._phone_numbers.clear ();
@@ -1897,7 +1896,7 @@ public class Folks.Individual : Object,
/* Populate the email addresses as the union of our Personas' addresses.
* If the same address exists multiple times we merge the parameters. */
var emails_set = new HashMap<unowned string, unowned EmailFieldDetails> (
- null, null, AbstractFieldDetails<string>.equal_static);
+ null, null, (GLib.EqualFunc) EmailFieldDetails.equal);
this._email_addresses.clear ();
diff --git a/folks/potential-match.vala b/folks/potential-match.vala
index ca998cd..aea8423 100644
--- a/folks/potential-match.vala
+++ b/folks/potential-match.vala
@@ -95,7 +95,7 @@ public class Folks.PotentialMatch : Object
* @since 0.5.1
*/
public static Set<string> known_email_aliases =
- new Gee.HashSet<string> ();
+ new Gee.HashSet<string> (str_hash, str_equal);
private static double _DIST_THRESHOLD = 0.70;
private const string _SEPARATORS = "._-+";
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 6c53095..b6b8c08 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -169,8 +169,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v2 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
email_1.set_parameter (email_1.PARAM_TYPE, email_1.PARAM_TYPE_HOME);
emails.add (email_1);
@@ -195,8 +195,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v5 = Value (typeof (Set));
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_1 = new PhoneFieldDetails (this._phone_1);
phone_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
@@ -213,8 +213,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v6 = Value (typeof (Set));
var pa_fds = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
PostalAddress pa_a = new PostalAddress (this._po_box,
this._extension, this._street, this._locality, this._region,
@@ -237,8 +237,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v8 = Value (typeof (Set));
var notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
var note = new NoteFieldDetails (this._note);
notes.add (note);
v8.set_object (notes);
@@ -254,8 +254,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v10 = Value (typeof (Set));
var role_fds = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
var r1 = new Role ("Dr.", "The Nut House Ltd");
r1.role = "The Manager";
var role_fd1 = new RoleFieldDetails (r1);
diff --git a/tests/eds/email-details.vala b/tests/eds/email-details.vala
index 3a56092..10dd688 100644
--- a/tests/eds/email-details.vala
+++ b/tests/eds/email-details.vala
@@ -58,7 +58,8 @@ public class EmailDetailsTests : Folks.TestCase
public void test_email_details ()
{
this._email_count = 0;
- this._email_types = new HashSet<string> ();
+ this._email_types = new HashSet<string> (str_hash,
+ str_equal);
this._c1 = new Gee.HashMap<string, Value?> ();
this._c2 = new Gee.HashMap<string, Value?> ();
this._c3 = new Gee.HashMap<string, Value?> ();
diff --git a/tests/eds/individual-retrieval.vala b/tests/eds/individual-retrieval.vala
index be3aec5..b3d8e4e 100644
--- a/tests/eds/individual-retrieval.vala
+++ b/tests/eds/individual-retrieval.vala
@@ -55,7 +55,8 @@ public class IndividualRetrievalTests : Folks.TestCase
{
Gee.HashMap<string, Value?> c1 = new Gee.HashMap<string, Value?> ();
Gee.HashMap<string, Value?> c2 = new Gee.HashMap<string, Value?> ();
- this._found_individuals = new HashSet<string> ();
+ this._found_individuals = new HashSet<string> (str_hash,
+ str_equal);
this._main_loop = new GLib.MainLoop (null, false);
Value? v;
diff --git a/tests/eds/link-personas.vala b/tests/eds/link-personas.vala
index 1d17cf4..745de8a 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -219,8 +219,8 @@ public class LinkPersonasTests : Folks.TestCase
v1 = Value (typeof (MultiMap));
var im_addrs1 = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
if (this._linking_method == LinkingMethod.EMAIL_AS_IM_ADDRESS)
im_addrs1.set ("jabber",
new ImFieldDetails (this._auto_linkable_email));
@@ -234,8 +234,8 @@ public class LinkPersonasTests : Folks.TestCase
v1 = Value (typeof (MultiMap));
var wsa1 = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
wsa1.set ("twitter", new WebServiceFieldDetails (this._im_address_1));
v1.set_object (wsa1);
details1.insert (wsk, (owned) v1);
@@ -254,8 +254,8 @@ public class LinkPersonasTests : Folks.TestCase
v3 = Value (typeof (MultiMap));
var im_addrs2 = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs2.set ("yahoo", new ImFieldDetails (this._im_address_2));
v3.set_object (im_addrs2);
details2.insert ("im-addresses", (owned) v3);
@@ -265,8 +265,8 @@ public class LinkPersonasTests : Folks.TestCase
v3 = Value (typeof (MultiMap));
var wsa2 = new HashMultiMap<string, WebServiceFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) WebServiceFieldDetails.hash,
+ (GLib.EqualFunc) WebServiceFieldDetails.equal);
wsa2.set ("lastfm", new WebServiceFieldDetails (this._im_address_2));
v3.set_object (wsa2);
details2.insert (wsk, (owned) v3);
@@ -275,8 +275,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v3 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._auto_linkable_email);
emails.add (email_1);
v3.set_object (emails);
diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala
index 7b7e39e..047ed00 100644
--- a/tests/eds/phone-details.vala
+++ b/tests/eds/phone-details.vala
@@ -57,7 +57,8 @@ public class PhoneDetailsTests : Folks.TestCase
public void test_phone_numbers ()
{
this._phones_count = 0;
- this._phone_types = new HashSet<string> ();
+ this._phone_types = new HashSet<string> (str_hash,
+ str_equal);
this._c1 = new Gee.HashMap<string, Value?> ();
this._c2 = new Gee.HashMap<string, Value?> ();
this._main_loop = new GLib.MainLoop (null, false);
diff --git a/tests/eds/set-emails.vala b/tests/eds/set-emails.vala
index 0e5e4d0..a22dd65 100644
--- a/tests/eds/set-emails.vala
+++ b/tests/eds/set-emails.vala
@@ -120,8 +120,8 @@ public class SetEmailsTests : Folks.TestCase
foreach (var p in i.personas)
{
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails ("bernie example org");
email_1.set_parameter (email_1.PARAM_TYPE,
email_1.PARAM_TYPE_OTHER);
diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala
index 056fe40..cfa9379 100644
--- a/tests/eds/set-im-addresses.vala
+++ b/tests/eds/set-im-addresses.vala
@@ -127,8 +127,8 @@ public class SetIMAddressesTests : Folks.TestCase
{
var im_addrs = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs.set ("jabber",
new ImFieldDetails ("bernie example org"));
((ImDetails) p).im_addresses = im_addrs;
diff --git a/tests/eds/set-phones.vala b/tests/eds/set-phones.vala
index 81d2157..1635cae 100644
--- a/tests/eds/set-phones.vala
+++ b/tests/eds/set-phones.vala
@@ -120,8 +120,8 @@ public class SetPhonesTests : Folks.TestCase
foreach (var p in i.personas)
{
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_1 = new PhoneFieldDetails ("1234");
phone_1.set_parameter (phone_1.PARAM_TYPE,
phone_1.PARAM_TYPE_HOME);
diff --git a/tests/eds/set-roles.vala b/tests/eds/set-roles.vala
index 78dfcea..db234eb 100644
--- a/tests/eds/set-roles.vala
+++ b/tests/eds/set-roles.vala
@@ -119,8 +119,8 @@ public class SetRolesTests : Folks.TestCase
foreach (var p in i.personas)
{
var role_fds = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
var r1 = new Role ("Dr.", "The Nut House Ltd");
r1.role = "The Manager";
var role_fd1 = new RoleFieldDetails (r1);
diff --git a/tests/folks/aggregation.vala b/tests/folks/aggregation.vala
index 39b7d2d..e555998 100644
--- a/tests/folks/aggregation.vala
+++ b/tests/folks/aggregation.vala
@@ -36,7 +36,7 @@ public class AggregationTests : Folks.TestCase
this._tp_backend = new TpTests.Backend ();
/* Create a set of the individuals we expect to see */
- this._default_personas = new HashSet<string> ();
+ this._default_personas = new HashSet<string> (str_hash, str_equal);
this._default_personas.add ("travis example com");
this._default_personas.add ("olivier example com");
diff --git a/tests/folks/backend-loading.vala b/tests/folks/backend-loading.vala
index 30d4363..ebe679f 100644
--- a/tests/folks/backend-loading.vala
+++ b/tests/folks/backend-loading.vala
@@ -85,7 +85,7 @@ public class BackendLoadingTests : Folks.TestCase
public void test_load_and_prep ()
{
var main_loop = new GLib.MainLoop (null, false);
- var backends_expected = new HashSet<string> ();
+ var backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("key-file");
backends_expected.add ("telepathy");
@@ -135,7 +135,7 @@ public class BackendLoadingTests : Folks.TestCase
private async void test_disabling_async (BackendStore store)
{
- var backends_expected = new HashSet<string> ();
+ var backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("key-file");
/* Disable some backends */
@@ -181,7 +181,7 @@ public class BackendLoadingTests : Folks.TestCase
/*
* First loading
*/
- backends_expected = new HashSet<string> ();
+ backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("key-file");
backends_expected.add ("telepathy");
@@ -205,7 +205,7 @@ public class BackendLoadingTests : Folks.TestCase
/*
* Second loading: late disabling
*/
- backends_expected = new HashSet<string> ();
+ backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("telepathy");
/* Disable some backends */
@@ -232,7 +232,7 @@ public class BackendLoadingTests : Folks.TestCase
/*
* Third loading: late enabling
*/
- backends_expected = new HashSet<string> ();
+ backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("key-file");
backends_expected.add ("telepathy");
@@ -261,7 +261,7 @@ public class BackendLoadingTests : Folks.TestCase
* Fourth loading: idempotency
*/
- backends_expected = new HashSet<string> ();
+ backends_expected = new HashSet<string> (str_hash, str_equal);
backends_expected.add ("key-file");
backends_expected.add ("telepathy");
diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala
index 0ecdceb..744e71e 100644
--- a/tests/key-file/individual-retrieval.vala
+++ b/tests/key-file/individual-retrieval.vala
@@ -58,7 +58,8 @@ public class IndividualRetrievalTests : Folks.TestCase
"jabber=bar jabber org\n");
/* Create a set of the individuals we expect to see */
- HashSet<string> expected_individuals = new HashSet<string> ();
+ HashSet<string> expected_individuals = new HashSet<string> (str_hash,
+ str_equal);
expected_individuals.add ("0");
expected_individuals.add ("1");
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index 0e23da9..09fabb3 100644
--- a/tests/telepathy/individual-properties.vala
+++ b/tests/telepathy/individual-properties.vala
@@ -489,16 +489,16 @@ public class IndividualPropertiesTests : Folks.TestCase
assert (persona is Tpf.Persona);
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
emails.add (new_email_fd);
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
phones.add (new_phone_fd);
var urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
urls.add (new_url_fd);
/* set the extended info through Telepathy's ContactInfo interface and
diff --git a/tests/telepathy/individual-retrieval.vala b/tests/telepathy/individual-retrieval.vala
index a8b6642..50ffb98 100644
--- a/tests/telepathy/individual-retrieval.vala
+++ b/tests/telepathy/individual-retrieval.vala
@@ -44,7 +44,7 @@ public class IndividualRetrievalTests : Folks.TestCase
* e.g.
* telepathy:/org/freedesktop/Telepathy/Account/cm/protocol/account:me example com
* only in each Individual. */
- this.default_individuals = new HashSet<string> ();
+ this.default_individuals = new HashSet<string> (str_hash, str_equal);
/* me example com */
default_individuals.add ("48fa372a81026063187255e3f5c184665d2ed7ce");
@@ -276,7 +276,7 @@ public class IndividualRetrievalTests : Folks.TestCase
* add_persona_from_details can temporarily fail with
* PersonaStoreError.STORE_OFFLINE (in which case, we just need to try
* again later) */
- var ids_remaining = new HashSet<string> ();
+ var ids_remaining = new HashSet<string> (str_hash, str_equal);
foreach (var contact_id in ids_add)
ids_remaining.add (contact_id);
@@ -286,7 +286,8 @@ public class IndividualRetrievalTests : Folks.TestCase
foreach (var id in ids_remaining)
{
- var details = new HashTable<string, GLib.Value?> (str_hash, str_equal);
+ var details = new HashTable<string, GLib.Value?> (str_hash,
+ str_equal);
details.insert ("contact", id);
/* we can end up adding the same ID twice, since this async
diff --git a/tests/tracker/add-persona.vala b/tests/tracker/add-persona.vala
index dec6cfe..7d97441 100644
--- a/tests/tracker/add-persona.vala
+++ b/tests/tracker/add-persona.vala
@@ -225,8 +225,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v8 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails.add (email_1);
var email_2 = new EmailFieldDetails (this._email_2);
@@ -238,8 +238,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v9 = Value (typeof (MultiMap));
var im_addrs = new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs.set ("jabber", new ImFieldDetails (this._im_addr_1));
im_addrs.set ("yahoo", new ImFieldDetails (this._im_addr_2));
v9.set_object (im_addrs);
@@ -248,8 +248,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v10 = Value (typeof (Set));
var notes = new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
NoteFieldDetails note_fd_1 = new NoteFieldDetails (this._note_1);
notes.add (note_fd_1);
v10.set_object (notes);
@@ -258,8 +258,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v11 = Value (typeof (Set));
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_1 = new PhoneFieldDetails (this._phone_1);
phones.add (phone_1);
@@ -272,8 +272,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v12 = Value (typeof (Set));
var role_fds = new HashSet<RoleFieldDetails> (
- AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ (GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
var r1 = new Role (this._title_1, this._organisation_1);
r1.role = this._role_1;
var role_fd1 = new RoleFieldDetails (r1);
@@ -284,8 +284,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v13 = Value (typeof (Set));
var postal_addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
var postal_a = new PostalAddress (this._po_box,
@@ -300,8 +300,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v14 = Value (typeof (Set));
var urls = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
var url_1 = new UrlFieldDetails (this._url_1);
urls.add (url_1);
var url_2 = new UrlFieldDetails (this._url_2);
diff --git a/tests/tracker/duplicated-emails.vala b/tests/tracker/duplicated-emails.vala
index 1c1534c..c9ea3c7 100644
--- a/tests/tracker/duplicated-emails.vala
+++ b/tests/tracker/duplicated-emails.vala
@@ -170,8 +170,8 @@ public class DuplicatedEmailsTests : Folks.TestCase
val = Value (typeof (Set));
var emails1 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails1.add (email_1);
val.set_object (emails1);
@@ -186,8 +186,8 @@ public class DuplicatedEmailsTests : Folks.TestCase
val = Value (typeof (Set));
var emails2 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_2 = new EmailFieldDetails (this._email_1);
emails2.add (email_2);
val.set_object (emails2);
diff --git a/tests/tracker/duplicated-phones.vala b/tests/tracker/duplicated-phones.vala
index 873b575..ba4a0cf 100644
--- a/tests/tracker/duplicated-phones.vala
+++ b/tests/tracker/duplicated-phones.vala
@@ -170,8 +170,8 @@ public class DuplicatedPhonesTests : Folks.TestCase
val = Value (typeof (Set));
var phones1 = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_1 = new PhoneFieldDetails (this._phone_1);
phones1.add (phone_1);
val.set_object (phones1);
@@ -186,8 +186,8 @@ public class DuplicatedPhonesTests : Folks.TestCase
val = Value (typeof (Set));
var phones2 = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_2 = new PhoneFieldDetails (this._phone_1);
phones2.add (phone_2);
val.set_object (phones2);
diff --git a/tests/tracker/link-personas.vala b/tests/tracker/link-personas.vala
index 501ccf7..eecc8a1 100644
--- a/tests/tracker/link-personas.vala
+++ b/tests/tracker/link-personas.vala
@@ -148,8 +148,8 @@ public class LinkPersonasTests : Folks.TestCase
(str_hash, str_equal);
Value? v1 = Value (typeof (MultiMap));
var im_addrs1 = new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs1.set (this._proto, new ImFieldDetails (this._im_address_1));
v1.set_object (im_addrs1);
details1.insert ("im-addresses", (owned) v1);
@@ -162,8 +162,8 @@ public class LinkPersonasTests : Folks.TestCase
(str_hash, str_equal);
Value? v3 = Value (typeof (MultiMap));
var im_addrs2 = new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs2.set (this._proto, new ImFieldDetails (this._im_address_2));
v3.set_object (im_addrs2);
details2.insert ("im-addresses", (owned) v3);
diff --git a/tests/tracker/match-email-addresses.vala b/tests/tracker/match-email-addresses.vala
index 4baaf1c..d2b4521 100644
--- a/tests/tracker/match-email-addresses.vala
+++ b/tests/tracker/match-email-addresses.vala
@@ -175,8 +175,8 @@ public class MatchEmailAddressesTests : Folks.TestCase
val = Value (typeof (Set));
var emails1 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails1.add (email_1);
val.set_object (emails1);
@@ -191,8 +191,8 @@ public class MatchEmailAddressesTests : Folks.TestCase
val = Value (typeof (Set));
var emails2 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_2 = new EmailFieldDetails (this._email_1);
emails2.add (email_2);
val.set_object (emails2);
diff --git a/tests/tracker/match-im-addresses.vala b/tests/tracker/match-im-addresses.vala
index 8359390..31d7471 100644
--- a/tests/tracker/match-im-addresses.vala
+++ b/tests/tracker/match-im-addresses.vala
@@ -176,8 +176,8 @@ public class MatchIMAddressesTests : Folks.TestCase
val = Value (typeof (MultiMap));
im_addrs = new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs.set ("jabber", new ImFieldDetails (this._im_addr_1));
im_addrs.set ("yahoo", new ImFieldDetails (this._im_addr_2));
val.set_object (im_addrs);
@@ -192,8 +192,8 @@ public class MatchIMAddressesTests : Folks.TestCase
val = Value (typeof (MultiMap));
im_addrs = new HashMultiMap<string, ImFieldDetails> (null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addrs.set ("jabber", new ImFieldDetails (this._im_addr_2));
val.set_object (im_addrs);
details2.insert (
diff --git a/tests/tracker/match-known-emails.vala b/tests/tracker/match-known-emails.vala
index 2d93fe0..da5681a 100644
--- a/tests/tracker/match-known-emails.vala
+++ b/tests/tracker/match-known-emails.vala
@@ -183,8 +183,8 @@ public class MatchKnownEmailsTests : Folks.TestCase
val = Value (typeof (Set));
var emails1 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails1.add (email_1);
val.set_object (emails1);
@@ -199,8 +199,8 @@ public class MatchKnownEmailsTests : Folks.TestCase
val = Value (typeof (Set));
var emails2 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_2 = new EmailFieldDetails (this._email_1);
emails2.add (email_2);
val.set_object (emails2);
diff --git a/tests/tracker/match-phone-number.vala b/tests/tracker/match-phone-number.vala
index cd9384b..96ccce7 100644
--- a/tests/tracker/match-phone-number.vala
+++ b/tests/tracker/match-phone-number.vala
@@ -177,8 +177,8 @@ public class MatchPhoneNumberTests : Folks.TestCase
val = Value (typeof (Set));
var phone_numbers1 = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_number_1 = new PhoneFieldDetails (this._phone_1);
phone_numbers1.add (phone_number_1);
val.set_object (phone_numbers1);
@@ -193,8 +193,8 @@ public class MatchPhoneNumberTests : Folks.TestCase
val = Value (typeof (Set));
var phone_numbers2 = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var phone_number_2 = new PhoneFieldDetails (this._phone_2);
phone_numbers2.add (phone_number_2);
val.set_object (phone_numbers2);
diff --git a/tests/tracker/remove-persona.vala b/tests/tracker/remove-persona.vala
index 0fc0114..6c87e92 100644
--- a/tests/tracker/remove-persona.vala
+++ b/tests/tracker/remove-persona.vala
@@ -133,8 +133,8 @@ public class RemovePersonaTests : Folks.TestCase
Value? v2 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails ("test-1 example org");
emails.add (email_1);
var email_2 = new EmailFieldDetails ("test-2 example org");
diff --git a/tests/tracker/set-duplicate-email.vala b/tests/tracker/set-duplicate-email.vala
index 6902ba7..e0394ca 100644
--- a/tests/tracker/set-duplicate-email.vala
+++ b/tests/tracker/set-duplicate-email.vala
@@ -132,8 +132,8 @@ public class SetDuplicateEmailTests : Folks.TestCase
if (this._has_email ((Trf.Persona) p, this._email_1))
{
var emails1 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails1.add (email_1);
((EmailDetails) p).email_addresses = emails1;
@@ -200,8 +200,8 @@ public class SetDuplicateEmailTests : Folks.TestCase
val = Value (typeof (Set));
var emails1 = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var email_1 = new EmailFieldDetails (this._email_1);
emails1.add (email_1);
val.set_object (emails1);
diff --git a/tests/tracker/set-emails.vala b/tests/tracker/set-emails.vala
index 1d38cca..c7e5720 100644
--- a/tests/tracker/set-emails.vala
+++ b/tests/tracker/set-emails.vala
@@ -115,8 +115,8 @@ public class SetEmailsTests : Folks.TestCase
i.notify["email-addresses"].connect (this._notify_emails_cb);
var emails = new HashSet<EmailFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) EmailFieldDetails.hash,
+ (GLib.EqualFunc) EmailFieldDetails.equal);
var p1 = new EmailFieldDetails (this._email_1);
emails.add (p1);
var p2 = new EmailFieldDetails (this._email_2);
diff --git a/tests/tracker/set-im-addresses.vala b/tests/tracker/set-im-addresses.vala
index fe92142..a58b24b 100644
--- a/tests/tracker/set-im-addresses.vala
+++ b/tests/tracker/set-im-addresses.vala
@@ -120,8 +120,8 @@ public class SetIMAddressesTests : Folks.TestCase
var im_addresses = new HashMultiMap<string, ImFieldDetails> (
null, null,
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc)ImFieldDetails.hash,
+ (GLib.EqualFunc) ImFieldDetails.equal);
im_addresses.set ("aim", new ImFieldDetails ("one example org"));
im_addresses.set ("aim", new ImFieldDetails ("two example org"));
diff --git a/tests/tracker/set-notes.vala b/tests/tracker/set-notes.vala
index 189d38b..7db267b 100644
--- a/tests/tracker/set-notes.vala
+++ b/tests/tracker/set-notes.vala
@@ -113,8 +113,8 @@ public class SetNotesTests : Folks.TestCase
Gee.HashSet<NoteFieldDetails> notes =
new HashSet<NoteFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) NoteFieldDetails.hash,
+ (GLib.EqualFunc) NoteFieldDetails.equal);
var n = new NoteFieldDetails ("some note");
notes.add ((owned) n);
diff --git a/tests/tracker/set-phones.vala b/tests/tracker/set-phones.vala
index d8dfd20..8f3ccb1 100644
--- a/tests/tracker/set-phones.vala
+++ b/tests/tracker/set-phones.vala
@@ -115,8 +115,8 @@ public class SetPhonesTests : Folks.TestCase
i.notify["phone-numbers"].connect (this._notify_phones_cb);
var phones = new HashSet<PhoneFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) PhoneFieldDetails.hash,
+ (GLib.EqualFunc) PhoneFieldDetails.equal);
var p1 = new PhoneFieldDetails (this._phone_1);
phones.add (p1);
diff --git a/tests/tracker/set-postal-addresses.vala b/tests/tracker/set-postal-addresses.vala
index 0a6b954..32f0678 100644
--- a/tests/tracker/set-postal-addresses.vala
+++ b/tests/tracker/set-postal-addresses.vala
@@ -121,8 +121,8 @@ public class SetPostalAddressesTests : Folks.TestCase
i.notify["postal-addresses"].connect (this._notify_postal_cb);
var addresses = new HashSet<PostalAddressFieldDetails> (
- AbstractFieldDetails<PostalAddress>.hash_static,
- AbstractFieldDetails<PostalAddress>.equal_static);
+ (GLib.HashFunc) PostalAddressFieldDetails.hash,
+ (GLib.EqualFunc) PostalAddressFieldDetails.equal);
var pa = new PostalAddress (null, null, null, null, null,
null, null, null, null);
pa.po_box = this._postal_address_fd.value.po_box;
diff --git a/tests/tracker/set-roles.vala b/tests/tracker/set-roles.vala
index c44ecdf..8d1de90 100644
--- a/tests/tracker/set-roles.vala
+++ b/tests/tracker/set-roles.vala
@@ -115,8 +115,8 @@ public class SetRolesTests : Folks.TestCase
Gee.HashSet<RoleFieldDetails> role_fds =
new HashSet<RoleFieldDetails>
- ( AbstractFieldDetails<Role>.hash_static,
- AbstractFieldDetails<Role>.equal_static);
+ ((GLib.HashFunc) RoleFieldDetails.hash,
+ (GLib.EqualFunc) RoleFieldDetails.equal);
var role = new Role ("some title", "some organisation");
role.role = "some role";
var role_fd = new RoleFieldDetails (role);
diff --git a/tests/tracker/set-urls.vala b/tests/tracker/set-urls.vala
index fbd9c0b..1ca7369 100644
--- a/tests/tracker/set-urls.vala
+++ b/tests/tracker/set-urls.vala
@@ -113,8 +113,8 @@ public class SetURLsTests : Folks.TestCase
i.notify["urls"].connect (this._notify_urls_cb);
var url_fds = new HashSet<UrlFieldDetails> (
- AbstractFieldDetails<string>.hash_static,
- AbstractFieldDetails<string>.equal_static);
+ (GLib.HashFunc) UrlFieldDetails.hash,
+ (GLib.EqualFunc) UrlFieldDetails.equal);
var p1 = new UrlFieldDetails (
this._urls.get (UrlFieldDetails.PARAM_TYPE_BLOG));
p1.set_parameter (p1.PARAM_TYPE, p1.PARAM_TYPE_BLOG);
diff --git a/tools/inspect/inspect.vala b/tools/inspect/inspect.vala
index c3fe2a2..da9f86c 100644
--- a/tools/inspect/inspect.vala
+++ b/tools/inspect/inspect.vala
@@ -122,7 +122,7 @@ public class Folks.Inspect.Client : Object
{
Utils.init ();
- this.commands = new HashMap<string, Command> ();
+ this.commands = new HashMap<string, Command> (str_hash, str_equal);
/* Register the commands we support */
/* FIXME: This should be automatic */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]