[folks] Port folks to libgee 0.8.
- From: Travis Reitter <treitter src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Port folks to libgee 0.8.
- Date: Mon, 11 Feb 2013 06:09:56 +0000 (UTC)
commit 01cc61aca9247a43f5132331a155f00d363e5e7d
Author: Travis Reitter <travis reitter collabora co uk>
Date: Wed Feb 6 21:33:24 2013 -0800
Port folks to libgee 0.8.
Added hash_static and equal_static to AbstractFieldDetails.
Use AbstractFieldDetails hash_static and equal_static where needed.
Fixes: https://bugzilla.gnome.org/show_bug.cgi?id=673918
NEWS | 3 +
backends/eds/Makefile.am | 2 +-
backends/eds/lib/Makefile.am | 2 +-
backends/eds/lib/edsf-persona.vala | 93 ++++++++++++-------
backends/eds/lib/folks-eds-uninstalled.pc.in | 2 +-
backends/eds/lib/folks-eds.deps | 2 +-
backends/eds/lib/folks-eds.pc.in | 2 +-
backends/key-file/Makefile.am | 2 +-
backends/key-file/kf-persona.vala | 18 ++--
backends/libsocialweb/Makefile.am | 2 +-
backends/libsocialweb/lib/Makefile.am | 4 +-
.../lib/folks-libsocialweb-uninstalled.pc.in | 2 +-
backends/libsocialweb/lib/folks-libsocialweb.pc.in | 2 +-
backends/libsocialweb/lib/swf-persona.vala | 12 ++--
backends/ofono/Makefile.am | 2 +-
backends/telepathy/Makefile.am | 2 +-
backends/telepathy/lib/Makefile.am | 2 +-
.../lib/folks-telepathy-uninstalled.pc.in | 2 +-
backends/telepathy/lib/folks-telepathy.pc.in | 2 +-
.../telepathy/lib/tpf-persona-store-cache.vala | 12 ++--
backends/telepathy/lib/tpf-persona.vala | 28 +++---
backends/tracker/Makefile.am | 2 +-
backends/tracker/lib/Makefile.am | 4 +-
.../tracker/lib/folks-tracker-uninstalled.pc.in | 2 +-
backends/tracker/lib/folks-tracker.pc.in | 2 +-
backends/tracker/lib/trf-persona-store.vala | 5 +-
backends/tracker/lib/trf-persona.vala | 53 ++++++------
configure.ac | 18 +---
docs/Makefile.am | 8 +-
folks/Makefile.am | 4 +-
folks/abstract-field-details.vala | 48 ++++++++++
folks/backend-store.vala | 9 +-
folks/debug.vala | 2 +-
folks/folks-uninstalled.pc.in | 2 +-
folks/folks.deps | 2 +-
folks/folks.pc.in | 2 +-
folks/individual-aggregator.vala | 10 +--
folks/individual.vala | 83 +++++++++---------
folks/potential-match.vala | 2 +-
tests/eds/Makefile.am | 2 +-
tests/eds/add-persona.vala | 20 ++--
tests/eds/email-details.vala | 3 +-
tests/eds/individual-retrieval.vala | 3 +-
tests/eds/link-personas.vala | 24 ++---
tests/eds/linkable-properties.vala | 4 +-
tests/eds/phone-details.vala | 3 +-
tests/eds/set-emails.vala | 4 +-
tests/eds/set-im-addresses.vala | 5 +-
tests/eds/set-phones.vala | 4 +-
tests/eds/set-roles.vala | 4 +-
tests/folks/Makefile.am | 2 +-
tests/folks/aggregation.vala | 2 +-
tests/folks/backend-loading.vala | 12 ++--
tests/key-file/Makefile.am | 2 +-
tests/key-file/individual-retrieval.vala | 3 +-
tests/lib/Makefile.am | 2 +-
tests/lib/eds/Makefile.am | 2 +-
tests/lib/libsocialweb/Makefile.am | 2 +-
tests/lib/telepathy/contactlist/Makefile.am | 2 +-
tests/lib/tracker/Makefile.am | 2 +-
tests/libsocialweb/Makefile.am | 2 +-
tests/telepathy/Makefile.am | 2 +-
tests/telepathy/individual-properties.vala | 12 ++--
tests/telepathy/individual-retrieval.vala | 7 +-
tests/tracker/Makefile.am | 2 +-
tests/tracker/add-persona.vala | 29 +++---
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 | 5 +-
tests/tracker/set-notes.vala | 4 +-
tests/tracker/set-phones.vala | 4 +-
tests/tracker/set-postal-addresses.vala | 4 +-
tests/tracker/set-roles.vala | 6 +-
tests/tracker/set-urls.vala | 4 +-
tools/Makefile.am | 2 +-
tools/inspect/Makefile.am | 2 +-
tools/inspect/inspect.vala | 2 +-
85 files changed, 385 insertions(+), 337 deletions(-)
---
diff --git a/NEWS b/NEWS
index 8f8ff2a..283d524 100644
--- a/NEWS
+++ b/NEWS
@@ -2,9 +2,11 @@ Overview of changes from libfolks 0.8.0 to libfolks 0.9.0
=========================================================
Dependencies:
+â libgee â 0.8.4
Major changes:
â Added an ofono backend
+â Ported to libgee 0.8.x
Bugs fixed:
â Bug 682941 â API to configure input of aggregation
@@ -34,6 +36,7 @@ Bugs fixed:
â Bug 691923 â Don't rebuild docs on every "make" run
â Bug 692122 â build: Don't use make functions for defining TESTS
â Bug 693435 â eds test: create-remove-stores fails sporadically
+â Bug 673918 â Port to newer libgee
API changes:
â Add Backend.enable_persona_store and disable_persona_store.
diff --git a/backends/eds/Makefile.am b/backends/eds/Makefile.am
index 18a037e..ca36417 100644
--- a/backends/eds/Makefile.am
+++ b/backends/eds/Makefile.am
@@ -23,7 +23,7 @@ eds_deps = \
folks \
folks-internal \
folks-eds \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
libebook-1.2 \
diff --git a/backends/eds/lib/Makefile.am b/backends/eds/lib/Makefile.am
index 6e277c7..cc276df 100644
--- a/backends/eds/lib/Makefile.am
+++ b/backends/eds/lib/Makefile.am
@@ -47,7 +47,7 @@ libfolks_eds_la_VALAFLAGS = \
--vapidir=$(top_srcdir)/folks \
--pkg folks \
--pkg folks-internal \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg gio-2.0 \
--pkg gobject-2.0 \
--pkg libebook-1.2 \
diff --git a/backends/eds/lib/edsf-persona.vala b/backends/eds/lib/edsf-persona.vala
index ebfa0de..1a55b20 100644
--- a/backends/eds/lib/edsf-persona.vala
+++ b/backends/eds/lib/edsf-persona.vala
@@ -289,8 +289,8 @@ public class Edsf.Persona : Folks.Persona,
private HashSet<EmailFieldDetails>? _email_addresses =
new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
private Set<EmailFieldDetails> _email_addresses_ro;
/**
@@ -525,8 +525,8 @@ public class Edsf.Persona : Folks.Persona,
* doesn't as it's a linkable property, so always has to be loaded anyway. */
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/**
* { inheritDoc}
@@ -935,13 +935,39 @@ public class Edsf.Persona : Folks.Persona,
debug ("Creating new Edsf.Persona with IID '%s'", this.iid);
this._gender = Gender.UNSPECIFIED;
+ this._phone_numbers = new HashSet<PhoneFieldDetails> (
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
+ this._phone_numbers_ro = this._phone_numbers.read_only_view;
+ this._email_addresses = new HashSet<EmailFieldDetails> (
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
+ this._email_addresses_ro = this._email_addresses.read_only_view;
+ this._notes = new HashSet<NoteFieldDetails> (
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
+ this._notes_ro = this._notes.read_only_view;
+ this._urls = new HashSet<UrlFieldDetails> (
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
+ this._urls_ro = this._urls.read_only_view;
+ this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
+ 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,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._email_addresses_ro = this._email_addresses.read_only_view;
+ 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);
+ this._roles_ro = this._roles.read_only_view;
this._anti_links = new HashSet<string> ();
this._anti_links_ro = this._anti_links.read_only_view;
@@ -1144,14 +1170,14 @@ public class Edsf.Persona : Folks.Persona,
else if (this._roles == null)
{
this._roles = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
this._roles_ro = this._roles.read_only_view;
}
var new_roles = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
var default_role_fd = this._get_default_role ();
if (default_role_fd != null)
@@ -1273,9 +1299,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_web_services_addresses ()
{
var new_services = new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var services = this.contact.get_attribute ("X-FOLKS-WEB-SERVICES-IDS");
if (services != null)
@@ -1307,8 +1332,8 @@ public class Edsf.Persona : Folks.Persona,
private void _update_emails (bool emit_notification = true)
{
var new_email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var attrs = this.contact.get_attributes (E.ContactField.EMAIL);
foreach (var attr in attrs)
@@ -1351,14 +1376,14 @@ public class Edsf.Persona : Folks.Persona,
else if (this._notes == null)
{
this._notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._notes_ro = this._notes.read_only_view;
}
var new_notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var n = this._get_property<string> ("note");
if (n != null && n != "")
@@ -1534,14 +1559,14 @@ public class Edsf.Persona : Folks.Persona,
else if (this._urls == null)
{
this._urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._urls_ro = this._urls.read_only_view;
}
var new_urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/* First we get the standard Evo urls.. */
foreach (var mapping in Persona._url_properties)
@@ -1591,8 +1616,8 @@ public class Edsf.Persona : Folks.Persona,
{
var im_eds_map = Persona._get_im_eds_map ();
var new_im_addresses = new HashMultiMap<string, ImFieldDetails> (null,
- null, (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var im_proto in im_eds_map.get_keys ())
{
@@ -1902,14 +1927,14 @@ public class Edsf.Persona : Folks.Persona,
else if (this._phone_numbers == null)
{
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
}
var new_phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var attrs = this.contact.get_attributes (E.ContactField.TEL);
foreach (var attr in attrs)
@@ -2012,14 +2037,14 @@ public class Edsf.Persona : Folks.Persona,
else if (this._postal_addresses == null)
{
this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
this._postal_addresses_ro = this._postal_addresses.read_only_view;
}
var new_postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
var attrs = this.contact.get_attributes (E.ContactField.ADDRESS);
foreach (unowned E.VCardAttribute attr in attrs)
diff --git a/backends/eds/lib/folks-eds-uninstalled.pc.in b/backends/eds/lib/folks-eds-uninstalled.pc.in
index d1f76e7..e6e38f9 100644
--- a/backends/eds/lib/folks-eds-uninstalled.pc.in
+++ b/backends/eds/lib/folks-eds-uninstalled.pc.in
@@ -7,6 +7,6 @@ vapidir= abs_top_srcdir@/folks
Name: Folks e-d-s support library (uninstalled copy)
Description: Evolution Data Server support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 libebook-1.2 libedataserver-1.2
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 libebook-1.2 libedataserver-1.2
Libs: ${abs_top_builddir}/backends/telepathy/libfolks-eds.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/backends/eds -I${abs_top_builddir}
diff --git a/backends/eds/lib/folks-eds.deps b/backends/eds/lib/folks-eds.deps
index 9cb8d84..05bde79 100644
--- a/backends/eds/lib/folks-eds.deps
+++ b/backends/eds/lib/folks-eds.deps
@@ -3,4 +3,4 @@ gobject-2.0
folks
libebook-1.2
libedataserver-1.2
-gee-1.0
+gee-0.8
diff --git a/backends/eds/lib/folks-eds.pc.in b/backends/eds/lib/folks-eds.pc.in
index 4d581af..9400f1e 100644
--- a/backends/eds/lib/folks-eds.pc.in
+++ b/backends/eds/lib/folks-eds.pc.in
@@ -10,6 +10,6 @@ vapidir= datadir@/vala/vapi
Name: Folks e-d-s support library
Description: Evolution Data Server support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 libebook-1.2 libedataserver-1.2
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 libebook-1.2 libedataserver-1.2
Libs: -L${libdir} -lfolks-eds
Cflags: -I${includedir}
diff --git a/backends/key-file/Makefile.am b/backends/key-file/Makefile.am
index 0e359c8..f9a1a7f 100644
--- a/backends/key-file/Makefile.am
+++ b/backends/key-file/Makefile.am
@@ -17,7 +17,7 @@ key_file_la_VALAFLAGS = \
--vapidir=$(top_srcdir)/folks \
--pkg folks \
--pkg folks-internal \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg gio-2.0 \
--pkg gobject-2.0 \
$(NULL)
diff --git a/backends/key-file/kf-persona.vala b/backends/key-file/kf-persona.vala
index d189d2f..e9f742e 100644
--- a/backends/key-file/kf-persona.vala
+++ b/backends/key-file/kf-persona.vala
@@ -145,9 +145,8 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
/* Add the new IM addresses to the key file and build a normalised
* table of them to set as the new property value */
var new_im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var protocol2 in im_addresses.get_keys ())
{
@@ -232,9 +231,8 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
* table of them to set as the new property value */
var new_web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var web_service2 in web_service_addresses.get_keys ())
{
@@ -327,12 +325,12 @@ public class Folks.Backends.Kf.Persona : Folks.Persona,
this.iid, this.display_id);
this._im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null, ImFieldDetails.hash, (EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._anti_links = new HashSet<string> ();
this._anti_links_ro = this._anti_links.read_only_view;
diff --git a/backends/libsocialweb/Makefile.am b/backends/libsocialweb/Makefile.am
index 65fc1b9..7cb5d8f 100644
--- a/backends/libsocialweb/Makefile.am
+++ b/backends/libsocialweb/Makefile.am
@@ -23,7 +23,7 @@ libsocialweb_deps = \
folks \
folks-internal \
folks-libsocialweb \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
libsocialweb-client \
diff --git a/backends/libsocialweb/lib/Makefile.am b/backends/libsocialweb/lib/Makefile.am
index 8242b81..b8db152 100644
--- a/backends/libsocialweb/lib/Makefile.am
+++ b/backends/libsocialweb/lib/Makefile.am
@@ -43,7 +43,7 @@ libfolks_libsocialweb_la_VALAFLAGS = \
--pkg folks-internal \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg libsocialweb-client \
--includedir folks \
--vapi folks-libsocialweb.vapi \
@@ -52,7 +52,7 @@ libfolks_libsocialweb_la_VALAFLAGS = \
folks_backend_libsocialweb_deps = \
folks \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
libsocialweb-client \
diff --git a/backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc.in b/backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc.in
index 60af3f3..02018c4 100644
--- a/backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc.in
+++ b/backends/libsocialweb/lib/folks-libsocialweb-uninstalled.pc.in
@@ -7,6 +7,6 @@ vapidir= abs_top_srcdir@/folks
Name: Folks Libsocialweb support library (uninstalled copy)
Description: Libsocialweb support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 libsocialweb-client
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 libsocialweb-client
Libs: ${abs_top_builddir}/backends/telepathy/libfolks-libsocialweb.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/backends/libsocialweb -I${abs_top_builddir}
diff --git a/backends/libsocialweb/lib/folks-libsocialweb.pc.in b/backends/libsocialweb/lib/folks-libsocialweb.pc.in
index 3fac010..bcf6abf 100644
--- a/backends/libsocialweb/lib/folks-libsocialweb.pc.in
+++ b/backends/libsocialweb/lib/folks-libsocialweb.pc.in
@@ -10,6 +10,6 @@ vapidir= datadir@/vala/vapi
Name: Folks libsocialweb support library
Description: Libsocialweb support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 libsocialweb-client
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 libsocialweb-client
Libs: -L${libdir} -lfolks-libsocialweb
Cflags: -I${includedir}
diff --git a/backends/libsocialweb/lib/swf-persona.vala b/backends/libsocialweb/lib/swf-persona.vala
index 177b1db..37b4b7d 100644
--- a/backends/libsocialweb/lib/swf-persona.vala
+++ b/backends/libsocialweb/lib/swf-persona.vala
@@ -151,13 +151,13 @@ public class Swf.Persona : Folks.Persona,
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- ImFieldDetails.hash, (EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
private HashMultiMap<string, WebServiceFieldDetails> _web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/**
* { inheritDoc}
@@ -391,8 +391,8 @@ public class Swf.Persona : Folks.Persona,
}
var urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var website = contact.get_value ("url");
if (website != null)
diff --git a/backends/ofono/Makefile.am b/backends/ofono/Makefile.am
index 966e5f4..15e380b 100644
--- a/backends/ofono/Makefile.am
+++ b/backends/ofono/Makefile.am
@@ -18,7 +18,7 @@ ofono_la_VALAFLAGS = \
--vapidir=$(top_srcdir)/folks \
--pkg folks \
--pkg folks-internal \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg gio-2.0 \
--pkg gobject-2.0 \
--pkg libebook-1.2 \
diff --git a/backends/telepathy/Makefile.am b/backends/telepathy/Makefile.am
index 95932e6..83d5b88 100644
--- a/backends/telepathy/Makefile.am
+++ b/backends/telepathy/Makefile.am
@@ -23,7 +23,7 @@ telepathy_deps = \
folks \
folks-internal \
folks-telepathy \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
telepathy-glib \
diff --git a/backends/telepathy/lib/Makefile.am b/backends/telepathy/lib/Makefile.am
index 1101079..f286252 100644
--- a/backends/telepathy/lib/Makefile.am
+++ b/backends/telepathy/lib/Makefile.am
@@ -125,7 +125,7 @@ libfolks_telepathy_la_VALAFLAGS = \
--pkg tp-lowlevel \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg telepathy-glib \
$(ZEITGEIST_PKG) \
--includedir folks \
diff --git a/backends/telepathy/lib/folks-telepathy-uninstalled.pc.in b/backends/telepathy/lib/folks-telepathy-uninstalled.pc.in
index 45d8968..c3a70c3 100644
--- a/backends/telepathy/lib/folks-telepathy-uninstalled.pc.in
+++ b/backends/telepathy/lib/folks-telepathy-uninstalled.pc.in
@@ -7,6 +7,6 @@ vapidir= abs_top_srcdir@/folks
Name: Folks Telepathy support library (uninstalled copy)
Description: Telepathy support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 telepathy-glib >= 0.11.11
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 telepathy-glib >= 0.11.11
Libs: ${abs_top_builddir}/backends/telepathy/libfolks-telepathy.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/backends/telepathy -I${abs_top_builddir}
diff --git a/backends/telepathy/lib/folks-telepathy.pc.in b/backends/telepathy/lib/folks-telepathy.pc.in
index 4f9b67b..3e56916 100644
--- a/backends/telepathy/lib/folks-telepathy.pc.in
+++ b/backends/telepathy/lib/folks-telepathy.pc.in
@@ -10,6 +10,6 @@ vapidir= datadir@/vala/vapi
Name: Folks Telepathy support library
Description: Telepathy support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 telepathy-glib >= 0.11.11
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 telepathy-glib >= 0.11.11
Libs: -L${libdir} -lfolks-telepathy
Cflags: -I${includedir}
diff --git a/backends/telepathy/lib/tpf-persona-store-cache.vala b/backends/telepathy/lib/tpf-persona-store-cache.vala
index 0021b2b..4556786 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var phone_number_set = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var url_set = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
if (object_version == 2)
{
diff --git a/backends/telepathy/lib/tpf-persona.vala b/backends/telepathy/lib/tpf-persona.vala
index d304752..d7fc067 100644
--- a/backends/telepathy/lib/tpf-persona.vala
+++ b/backends/telepathy/lib/tpf-persona.vala
@@ -389,8 +389,8 @@ public class Tpf.Persona : Folks.Persona,
* doesn't as it's a linkable property, so always has to be loaded anyway. */
private HashMultiMap<string, ImFieldDetails> _im_addresses =
new HashMultiMap<string, ImFieldDetails> (null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/**
* A mapping of IM protocol to an (unordered) set of IM addresses.
@@ -939,18 +939,18 @@ public class Tpf.Persona : Folks.Persona,
else if (this._urls == null)
{
this._urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._urls_ro = this._urls.read_only_view;
this._email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._email_addresses_ro = this._email_addresses.read_only_view;
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
}
@@ -965,14 +965,14 @@ public class Tpf.Persona : Folks.Persona,
var new_birthday_str = "";
var new_full_name = "";
var new_email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var new_phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var new_urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var contact_info = contact.get_contact_info ();
foreach (var info in contact_info)
diff --git a/backends/tracker/Makefile.am b/backends/tracker/Makefile.am
index e99c34c..73dc099 100644
--- a/backends/tracker/Makefile.am
+++ b/backends/tracker/Makefile.am
@@ -24,7 +24,7 @@ tracker_deps = \
folks \
folks-internal \
folks-tracker \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
diff --git a/backends/tracker/lib/Makefile.am b/backends/tracker/lib/Makefile.am
index c43885b..3c16a8d 100644
--- a/backends/tracker/lib/Makefile.am
+++ b/backends/tracker/lib/Makefile.am
@@ -28,7 +28,7 @@ libfolks_tracker_la_VALAFLAGS = \
--pkg folks-internal \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
--includedir folks \
--vapi folks-tracker.vapi \
@@ -37,7 +37,7 @@ libfolks_tracker_la_VALAFLAGS = \
folks_backend_tracker_deps = \
folks \
- gee-1.0 \
+ gee-0.8 \
gio-2.0 \
gobject-2.0 \
tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
diff --git a/backends/tracker/lib/folks-tracker-uninstalled.pc.in b/backends/tracker/lib/folks-tracker-uninstalled.pc.in
index fcffc8c..7f3561b 100644
--- a/backends/tracker/lib/folks-tracker-uninstalled.pc.in
+++ b/backends/tracker/lib/folks-tracker-uninstalled.pc.in
@@ -7,6 +7,6 @@ vapidir= abs_top_srcdir@/folks
Name: Folks Tracker support library (uninstalled copy)
Description: Tracker support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 tracker-sparql- TRACKER_SPARQL_MAJOR@
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 tracker-sparql- TRACKER_SPARQL_MAJOR@
Libs: ${abs_top_builddir}/backends/telepathy/libfolks-tracker.la
Cflags: -I${abs_top_srcdir} -I${abs_top_srcdir}/backends/tracker -I${abs_top_builddir}
diff --git a/backends/tracker/lib/folks-tracker.pc.in b/backends/tracker/lib/folks-tracker.pc.in
index 7898842..734827f 100644
--- a/backends/tracker/lib/folks-tracker.pc.in
+++ b/backends/tracker/lib/folks-tracker.pc.in
@@ -10,6 +10,6 @@ vapidir= datadir@/vala/vapi
Name: Folks tracker support library
Description: Tracker support library for the Folks meta-contacts library
Version: @VERSION@
-Requires: folks glib-2.0 gobject-2.0 gee-1.0 tracker-sparql- TRACKER_SPARQL_MAJOR@
+Requires: folks glib-2.0 gobject-2.0 gee-0.8 tracker-sparql- TRACKER_SPARQL_MAJOR@
Libs: -L${libdir} -lfolks-tracker
Cflags: -I${includedir}
diff --git a/backends/tracker/lib/trf-persona-store.vala b/backends/tracker/lib/trf-persona-store.vala
index dd0a7ab..6b97503 100644
--- a/backends/tracker/lib/trf-persona-store.vala
+++ b/backends/tracker/lib/trf-persona-store.vala
@@ -822,9 +822,8 @@ public class Trf.PersonaStore : Folks.PersonaStore
string ws_addrs)
{
var ret = new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 bfbc466..1683396 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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/**
* { inheritDoc}
@@ -467,9 +467,8 @@ public class Trf.Persona : Folks.Persona,
private HashMultiMap<string, WebServiceFieldDetails> _web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/**
* { inheritDoc}
@@ -558,28 +557,28 @@ public class Trf.Persona : Folks.Persona,
this._full_name = "";
this._structured_name = null;
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
this._email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._email_addresses_ro = this._email_addresses.read_only_view;
this._roles = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
this._roles_ro = this._roles.read_only_view;
this._notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._notes_ro = this._notes.read_only_view;
this._urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._urls_ro = this._urls.read_only_view;
this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
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 +803,8 @@ public class Trf.Persona : Folks.Persona,
}
var postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
string[] addresses_a = postal_field.split ("\n");
@@ -984,8 +983,8 @@ public class Trf.Persona : Folks.Persona,
}
HashSet<RoleFieldDetails> role_fds = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
string[] roles_a = roles_field.split ("\n");
@@ -1221,8 +1220,8 @@ public class Trf.Persona : Folks.Persona,
}
var phones = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
string[] phones_a = phones_field.split ("\n");
foreach (var p in phones_a)
@@ -1347,8 +1346,8 @@ public class Trf.Persona : Folks.Persona,
}
var email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
string[] emails_a = emails_field.split (",");
foreach (var e in emails_a)
@@ -1372,8 +1371,8 @@ public class Trf.Persona : Folks.Persona,
private void _update_urls ()
{
var url_fds = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var _urls_field = this._cursor.get_string (Trf.Fields.URLS).dup ();
if (_urls_field == null)
diff --git a/configure.ac b/configure.ac
index 13e16e0..c3fdb2a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -146,7 +146,7 @@ AS_IF([test "x$enable_libsocialweb_backend" != "xno"], [
"x$enable_vala" = "xyes"], [
VALA_CHECK_PACKAGES([telepathy-glib
gio-2.0
- gee-1.0
+ gee-0.8
libsocialweb-client],
,
have_libsocialweb_backend="no")
@@ -180,6 +180,7 @@ TRACKER_SPARQL_REQUIRED=0.13.1
EBOOK_REQUIRED=3.5.3
EDATASERVER_REQUIRED=3.5.3.1
ZEITGEIST_REQUIRED=0.3.14
+GEE_REQUIRED=0.8.4
AC_SUBST([TRACKER_SPARQL_MAJOR])
@@ -190,18 +191,7 @@ PKG_CHECK_MODULES([GMODULE], [gmodule-no-export-2.0])
PKG_CHECK_MODULES([GIO], [gio-2.0 >= $GLIB_REQUIRED])
PKG_CHECK_MODULES([DBUS_GLIB], [dbus-glib-1])
-# FIXME: We depend on libgee < 0.7 because 0.7 breaks API. bgo#627746
-PKG_CHECK_MODULES([GEE], [gee-1.0 < 0.7],
- have_gee_0_6_x="yes",
- have_gee_0_6_x="no")
-
-AS_IF([test "x$have_gee_0_6_x" != "xyes"], [
- AC_MSG_ERROR([
-Gee 0.6.x required but not installed.
-
-Note that Gee 0.8.x provides gee-0.8 (but gee-1.0 is, confusingly, provided by
-Gee 0.6.x)])
-])
+PKG_CHECK_MODULES([GEE], [gee-0.8 >= $GEE_REQUIRED])
TP_GLIB_REQUIRED=0.19.0
AS_IF([test x$enable_telepathy_backend = xyes], [
@@ -308,7 +298,7 @@ AS_IF([test "x$enable_vala" = "xyes"], [
AC_SUBST([VAPIDIR])
VALA_CHECK_PACKAGES([gio-2.0
- gee-1.0])
+ gee-0.8])
AS_IF([test x$enable_telepathy_backend = xyes], [
VALA_CHECK_PACKAGES([telepathy-glib])
diff --git a/docs/Makefile.am b/docs/Makefile.am
index 212385f..460363c 100644
--- a/docs/Makefile.am
+++ b/docs/Makefile.am
@@ -91,7 +91,7 @@ folks_doc_files = \
folks_doc_deps = \
gmodule-2.0 \
gio-2.0 \
- gee-1.0 \
+ gee-0.8 \
folks-internal \
build-conf \
$(NULL)
@@ -126,7 +126,7 @@ folks_telepathy_doc_files = $(top_srcdir)/backends/telepathy/lib/*.vala
folks_telepathy_doc_deps = \
gmodule-2.0 \
gio-2.0 \
- gee-1.0 \
+ gee-0.8 \
telepathy-glib \
zeitgeist-1.0 \
tp-lowlevel \
@@ -190,7 +190,7 @@ folks_eds_doc_files = $(top_srcdir)/backends/eds/lib/*.vala
folks_eds_doc_deps = \
gmodule-2.0 \
gio-2.0 \
- gee-1.0 \
+ gee-0.8 \
libebook-1.2 \
libedataserver-1.2 \
build-conf \
@@ -261,7 +261,7 @@ folks_libsocialweb_doc_files = $(top_srcdir)/backends/libsocialweb/lib/*.vala
folks_libsocialweb_doc_deps = \
gmodule-2.0 \
gio-2.0 \
- gee-1.0 \
+ gee-0.8 \
libsocialweb-client \
build-conf \
folks \
diff --git a/folks/Makefile.am b/folks/Makefile.am
index 82c43e6..d24c7f5 100644
--- a/folks/Makefile.am
+++ b/folks/Makefile.am
@@ -25,7 +25,7 @@ libfolks_internal_la_VALAFLAGS = \
--vapidir=. \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg posix \
--vapi folks-internal.vapi \
-H folks-internal.h \
@@ -108,7 +108,7 @@ libfolks_la_VALAFLAGS = \
--pkg gobject-2.0 \
--pkg gmodule-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--includedir folks \
--vapi folks.vapi \
-H folks.h \
diff --git a/folks/abstract-field-details.vala b/folks/abstract-field-details.vala
index 8bd5202..2bd8b64 100644
--- a/folks/abstract-field-details.vala
+++ b/folks/abstract-field-details.vala
@@ -276,6 +276,32 @@ 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 (AbstractFieldDetails left,
+ AbstractFieldDetails 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:
@@ -405,4 +431,26 @@ 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 avoid having to cast.
+ *
+ * @param value the value to hash
+ *
+ * @return the hash value
+ *
+ * @since UNRELEASED
+ */
+ public static uint hash_static (AbstractFieldDetails 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 ae17d65..4a47aa5 100644
--- a/folks/backend-store.vala
+++ b/folks/backend-store.vala
@@ -146,10 +146,9 @@ public class Folks.BackendStore : Object {
this._debug.print_status.connect (this._debug_print_status);
- 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._modules = new HashMap<string,unowned Module> ();
+ this._backend_hash = new HashMap<string,Backend> ();
+ this._prepared_backends = new HashMap<string,Backend> ();
this._prepared_backends_ro = this._prepared_backends.read_only_view;
}
@@ -613,7 +612,7 @@ public class Folks.BackendStore : Object {
return null;
}
- var modules_final = new HashMap<string, File> (str_hash, str_equal);
+ var modules_final = new HashMap<string, File> ();
foreach (var info in infos)
{
diff --git a/folks/debug.vala b/folks/debug.vala
index 7f6d98b..11c5f9e 100644
--- a/folks/debug.vala
+++ b/folks/debug.vala
@@ -237,7 +237,7 @@ public class Folks.Debug : Object
lock (retval._domains)
{
retval._all = false;
- retval._domains = new HashSet<string> (str_hash, str_equal);
+ retval._domains = new HashSet<string> ();
if (debug_flags != null && debug_flags != "")
{
diff --git a/folks/folks-uninstalled.pc.in b/folks/folks-uninstalled.pc.in
index 0443df0..642d801 100644
--- a/folks/folks-uninstalled.pc.in
+++ b/folks/folks-uninstalled.pc.in
@@ -7,6 +7,6 @@ vapidir= abs_top_srcdir@/folks
Name: Folks (uninstalled copy)
Description: The Folks meta-contacts library
Version: @VERSION@
-Requires: glib-2.0 gobject-2.0 gee-1.0 telepathy-glib >= 0.11.11
+Requires: glib-2.0 gobject-2.0 gee-0.8 telepathy-glib >= 0.11.11
Libs: ${abs_top_builddir}/folks/libfolks.la
Cflags: -I${abs_top_srcdir} -I${abs_top_builddir}
diff --git a/folks/folks.deps b/folks/folks.deps
index 664361d..411c6da 100644
--- a/folks/folks.deps
+++ b/folks/folks.deps
@@ -1,4 +1,4 @@
glib-2.0
gobject-2.0
gio-2.0
-gee-1.0
+gee-0.8
diff --git a/folks/folks.pc.in b/folks/folks.pc.in
index fd6a550..6255209 100644
--- a/folks/folks.pc.in
+++ b/folks/folks.pc.in
@@ -10,6 +10,6 @@ vapidir= datadir@/vala/vapi
Name: Folks
Description: The Folks meta-contacts library
Version: @VERSION@
-Requires: glib-2.0 gobject-2.0 gee-1.0
+Requires: glib-2.0 gobject-2.0 gee-0.8
Libs: -L${libdir} -lfolks
Cflags: -I${includedir}
diff --git a/folks/individual-aggregator.vala b/folks/individual-aggregator.vala
index 973361a..53bcbf7 100644
--- a/folks/individual-aggregator.vala
+++ b/folks/individual-aggregator.vala
@@ -1983,14 +1983,12 @@ 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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var web_service_addrs_set =
new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
/* List of local_ids */
var local_ids = new Gee.HashSet<string> ();
diff --git a/folks/individual.vala b/folks/individual.vala
index 7723a0a..d3fafed 100644
--- a/folks/individual.vala
+++ b/folks/individual.vala
@@ -103,7 +103,7 @@ public class Folks.Individual : Object,
{
/* Stores the Personas contained in this Individual. */
private HashSet<Persona> _persona_set =
- new HashSet<Persona> (direct_hash, direct_equal);
+ new HashSet<Persona> ();
/* Read-only view of the above set */
private Set<Persona> _persona_set_ro;
/* Mapping from PersonaStore -> number of Personas from that store contained
@@ -863,7 +863,7 @@ public class Folks.Individual : Object,
public DateTime? last_im_interaction_datetime
{
- get
+ get
{
if (this._last_im_interaction_datetime == null)
{
@@ -892,7 +892,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*/
@@ -1721,14 +1721,14 @@ public class Folks.Individual : Object,
() =>
{
this._im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null, ImFieldDetails.hash,
- (EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
},
() =>
{
var new_im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null, (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -1770,15 +1770,15 @@ public class Folks.Individual : Object,
{
this._web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
},
() =>
{
var new_web_service_addresses =
new HashMultiMap<string, WebServiceFieldDetails> (null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -1850,7 +1850,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);
@@ -1991,7 +1991,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);
@@ -2060,17 +2060,18 @@ public class Folks.Individual : Object,
() =>
{
this._urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._urls_ro = this._urls.read_only_view;
},
() =>
{
var new_urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
- var urls_set = new HashMap<string, UrlFieldDetails> (null, null,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
+ var urls_set = new HashMap<unowned string,
+ unowned UrlFieldDetails> (
+ null, null, AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -2117,17 +2118,17 @@ public class Folks.Individual : Object,
() =>
{
this._phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._phone_numbers_ro = this._phone_numbers.read_only_view;
},
() =>
{
var new_phone_numbers = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var phone_numbers_set = new HashMap<string, PhoneFieldDetails> (
- null, null, (GLib.EqualFunc) PhoneFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -2174,17 +2175,17 @@ public class Folks.Individual : Object,
() =>
{
this._email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._email_addresses_ro = this._email_addresses.read_only_view;
},
() =>
{
var new_email_addresses = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var emails_set = new HashMap<string, EmailFieldDetails> (
- null, null, (GLib.EqualFunc) EmailFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -2232,15 +2233,15 @@ public class Folks.Individual : Object,
() =>
{
this._roles = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
this._roles_ro = this._roles.read_only_view;
},
() =>
{
var new_roles = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -2310,16 +2311,16 @@ public class Folks.Individual : Object,
() =>
{
this._postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
this._postal_addresses_ro = this._postal_addresses.read_only_view;
},
() =>
{
var new_postal_addresses =
new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
foreach (var persona in this._persona_set)
{
@@ -2406,15 +2407,15 @@ public class Folks.Individual : Object,
() =>
{
this._notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
this._notes_ro = this._notes.read_only_view;
},
() =>
{
var new_notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
foreach (var persona in this._persona_set)
{
diff --git a/folks/potential-match.vala b/folks/potential-match.vala
index 31eac72..6e7bb40 100644
--- a/folks/potential-match.vala
+++ b/folks/potential-match.vala
@@ -102,7 +102,7 @@ public class Folks.PotentialMatch : Object
* @since 0.5.1
*/
public static Set<string> known_email_aliases =
- new Gee.HashSet<string> (str_hash, str_equal);
+ new Gee.HashSet<string> ();
private static double _DIST_THRESHOLD = 0.70;
private const string _SEPARATORS = "._-+";
diff --git a/tests/eds/Makefile.am b/tests/eds/Makefile.am
index b5a8723..2f0d573 100644
--- a/tests/eds/Makefile.am
+++ b/tests/eds/Makefile.am
@@ -30,7 +30,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_srcdir)/tests/lib/eds \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg folks-test \
--pkg libebook-1.2 \
diff --git a/tests/eds/add-persona.vala b/tests/eds/add-persona.vala
index 1f3178e..0f3d723 100644
--- a/tests/eds/add-persona.vala
+++ b/tests/eds/add-persona.vala
@@ -172,8 +172,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v2 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var email_1 = new EmailFieldDetails (this._email_1);
email_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
AbstractFieldDetails.PARAM_TYPE_HOME);
@@ -199,8 +199,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v5 = Value (typeof (Set));
var phones = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var phone_1 = new PhoneFieldDetails (this._phone_1);
phone_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
@@ -217,8 +217,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v6 = Value (typeof (Set));
var pa_fds = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
PostalAddress pa_a = new PostalAddress (this._po_box,
this._extension, this._street, this._locality, this._region,
@@ -242,8 +242,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v8 = Value (typeof (Set));
var notes = new HashSet<NoteFieldDetails> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var note = new NoteFieldDetails (this._note);
notes.add (note);
v8.set_object (notes);
@@ -259,8 +259,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v10 = Value (typeof (Set));
var role_fds = new HashSet<RoleFieldDetails> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
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 3b3828e..da5d57a 100644
--- a/tests/eds/email-details.vala
+++ b/tests/eds/email-details.vala
@@ -58,8 +58,7 @@ public class EmailDetailsTests : Folks.TestCase
public void test_email_details ()
{
this._email_count = 0;
- this._email_types = new HashSet<string> (str_hash,
- str_equal);
+ this._email_types = new HashSet<string> ();
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 d9fdbc2..c233715 100644
--- a/tests/eds/individual-retrieval.vala
+++ b/tests/eds/individual-retrieval.vala
@@ -55,8 +55,7 @@ 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> (str_hash,
- str_equal);
+ this._found_individuals = new HashSet<string> ();
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 09aa0e2..6b4443a 100644
--- a/tests/eds/link-personas.vala
+++ b/tests/eds/link-personas.vala
@@ -224,9 +224,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v1 = Value (typeof (MultiMap));
var im_addrs1 = new HashMultiMap<string, ImFieldDetails> (
- null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
if (this._linking_method == LinkingMethod.EMAIL_AS_IM_ADDRESS)
im_addrs1.set ("jabber",
new ImFieldDetails (this._auto_linkable_email));
@@ -239,9 +238,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v1 = Value (typeof (MultiMap));
var wsa1 = new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
wsa1.set ("twitter", new WebServiceFieldDetails (this._im_address_1));
v1.set_object (wsa1);
details1.insert (wsk, (owned) v1);
@@ -259,9 +257,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v3 = Value (typeof (MultiMap));
var im_addrs2 = new HashMultiMap<string, ImFieldDetails> (
- null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
im_addrs2.set ("yahoo", new ImFieldDetails (this._im_address_2));
v3.set_object (im_addrs2);
details2.insert ("im-addresses", (owned) v3);
@@ -270,9 +267,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v3 = Value (typeof (MultiMap));
var wsa2 = new HashMultiMap<string, WebServiceFieldDetails> (
- null, null,
- (GLib.HashFunc) WebServiceFieldDetails.hash,
- (GLib.EqualFunc) WebServiceFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
wsa2.set ("lastfm", new WebServiceFieldDetails (this._im_address_2));
v3.set_object (wsa2);
details2.insert (wsk, (owned) v3);
@@ -281,8 +277,8 @@ public class LinkPersonasTests : Folks.TestCase
{
v3 = Value (typeof (Set));
var emails = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var email_1 = new EmailFieldDetails (this._auto_linkable_email);
emails.add (email_1);
v3.set_object (emails);
diff --git a/tests/eds/linkable-properties.vala b/tests/eds/linkable-properties.vala
index aa6f667..817716c 100644
--- a/tests/eds/linkable-properties.vala
+++ b/tests/eds/linkable-properties.vala
@@ -172,8 +172,8 @@ public class LinkablePropertiesTests : Folks.TestCase
foreach (var p in i.personas)
{
var emails = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var email_1 = new EmailFieldDetails (_email_1);
email_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
AbstractFieldDetails.PARAM_TYPE_OTHER);
diff --git a/tests/eds/phone-details.vala b/tests/eds/phone-details.vala
index d14e8c7..2d1c850 100644
--- a/tests/eds/phone-details.vala
+++ b/tests/eds/phone-details.vala
@@ -57,8 +57,7 @@ public class PhoneDetailsTests : Folks.TestCase
public void test_phone_numbers ()
{
this._phones_count = 0;
- this._phone_types = new HashSet<string> (str_hash,
- str_equal);
+ this._phone_types = new HashSet<string> ();
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 bdb5429..c36bf41 100644
--- a/tests/eds/set-emails.vala
+++ b/tests/eds/set-emails.vala
@@ -124,8 +124,8 @@ public class SetEmailsTests : Folks.TestCase
foreach (var p in i.personas)
{
var emails = new HashSet<EmailFieldDetails> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var email_1 = new EmailFieldDetails ("bernie example org");
email_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
AbstractFieldDetails.PARAM_TYPE_OTHER);
diff --git a/tests/eds/set-im-addresses.vala b/tests/eds/set-im-addresses.vala
index 9d88b90..3808e17 100644
--- a/tests/eds/set-im-addresses.vala
+++ b/tests/eds/set-im-addresses.vala
@@ -126,9 +126,8 @@ public class SetIMAddressesTests : Folks.TestCase
foreach (var p in i.personas)
{
var im_addrs = new HashMultiMap<string, ImFieldDetails> (
- null, null,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 1ed862c..03701b9 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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var phone_1 = new PhoneFieldDetails ("1234");
phone_1.set_parameter (AbstractFieldDetails.PARAM_TYPE,
AbstractFieldDetails.PARAM_TYPE_HOME);
diff --git a/tests/eds/set-roles.vala b/tests/eds/set-roles.vala
index ebdd2f7..89e38ee 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> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
var r1 = new Role ("Dr.", "The Nut House Ltd");
r1.role = "The Manager";
var role_fd1 = new RoleFieldDetails (r1);
diff --git a/tests/folks/Makefile.am b/tests/folks/Makefile.am
index bfc362c..470485e 100644
--- a/tests/folks/Makefile.am
+++ b/tests/folks/Makefile.am
@@ -34,7 +34,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_builddir)/tests/lib/telepathy/contactlist/ \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg folks-test \
--pkg kf-test \
diff --git a/tests/folks/aggregation.vala b/tests/folks/aggregation.vala
index e555998..39b7d2d 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> (str_hash, str_equal);
+ this._default_personas = new HashSet<string> ();
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 ebe679f..30d4363 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> (str_hash, str_equal);
+ var backends_expected = new HashSet<string> ();
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> (str_hash, str_equal);
+ var backends_expected = new HashSet<string> ();
backends_expected.add ("key-file");
/* Disable some backends */
@@ -181,7 +181,7 @@ public class BackendLoadingTests : Folks.TestCase
/*
* First loading
*/
- backends_expected = new HashSet<string> (str_hash, str_equal);
+ backends_expected = new HashSet<string> ();
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> (str_hash, str_equal);
+ backends_expected = new HashSet<string> ();
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> (str_hash, str_equal);
+ backends_expected = new HashSet<string> ();
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> (str_hash, str_equal);
+ backends_expected = new HashSet<string> ();
backends_expected.add ("key-file");
backends_expected.add ("telepathy");
diff --git a/tests/key-file/Makefile.am b/tests/key-file/Makefile.am
index 45c7b73..a2a1e7f 100644
--- a/tests/key-file/Makefile.am
+++ b/tests/key-file/Makefile.am
@@ -23,7 +23,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_srcdir)/tests/lib/key-file \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg folks-test \
--pkg kf-test \
diff --git a/tests/key-file/individual-retrieval.vala b/tests/key-file/individual-retrieval.vala
index 9d2c529..45b7c67 100644
--- a/tests/key-file/individual-retrieval.vala
+++ b/tests/key-file/individual-retrieval.vala
@@ -58,8 +58,7 @@ 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> (str_hash,
- str_equal);
+ HashSet<string> expected_individuals = new HashSet<string> ();
expected_individuals.add ("0");
expected_individuals.add ("1");
diff --git a/tests/lib/Makefile.am b/tests/lib/Makefile.am
index bcaf81d..1d5c8c0 100644
--- a/tests/lib/Makefile.am
+++ b/tests/lib/Makefile.am
@@ -56,7 +56,7 @@ libfolks_test_la_VALAFLAGS = \
--vapidir=$(top_srcdir)/folks \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--library folks-test \
-H folks-test.h \
diff --git a/tests/lib/eds/Makefile.am b/tests/lib/eds/Makefile.am
index 4a698a9..304629a 100644
--- a/tests/lib/eds/Makefile.am
+++ b/tests/lib/eds/Makefile.am
@@ -8,7 +8,7 @@ VALAFLAGS += \
--vapidir=. \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg libebook-1.2 \
--pkg libedataserver-1.2 \
diff --git a/tests/lib/libsocialweb/Makefile.am b/tests/lib/libsocialweb/Makefile.am
index 09ae0f9..5e4bfb4 100644
--- a/tests/lib/libsocialweb/Makefile.am
+++ b/tests/lib/libsocialweb/Makefile.am
@@ -7,7 +7,7 @@ VALAFLAGS += \
--vapidir=. \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg libsocialweb-client \
--pkg folks-libsocialweb \
diff --git a/tests/lib/telepathy/contactlist/Makefile.am b/tests/lib/telepathy/contactlist/Makefile.am
index 368364e..2512900 100644
--- a/tests/lib/telepathy/contactlist/Makefile.am
+++ b/tests/lib/telepathy/contactlist/Makefile.am
@@ -8,7 +8,7 @@ VAPIGENFLAGS += \
--vapidir=. \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg gmodule-2.0 \
--pkg dbus-glib-1 \
--pkg telepathy-glib \
diff --git a/tests/lib/tracker/Makefile.am b/tests/lib/tracker/Makefile.am
index bd0776b..f0d2524 100644
--- a/tests/lib/tracker/Makefile.am
+++ b/tests/lib/tracker/Makefile.am
@@ -7,7 +7,7 @@ VALAFLAGS += \
--vapidir=. \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg tracker-sparql-$(TRACKER_SPARQL_MAJOR) \
--pkg folks-tracker \
diff --git a/tests/libsocialweb/Makefile.am b/tests/libsocialweb/Makefile.am
index 094d60f..3af489e 100644
--- a/tests/libsocialweb/Makefile.am
+++ b/tests/libsocialweb/Makefile.am
@@ -34,7 +34,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_srcdir)/tests/lib/libsocialweb \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg folks-test \
--pkg folks-libsocialweb \
diff --git a/tests/telepathy/Makefile.am b/tests/telepathy/Makefile.am
index 1ee7beb..35d7135 100644
--- a/tests/telepathy/Makefile.am
+++ b/tests/telepathy/Makefile.am
@@ -34,7 +34,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_srcdir)/backends/telepathy/lib \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg gmodule-2.0 \
--pkg telepathy-glib \
--pkg folks \
diff --git a/tests/telepathy/individual-properties.vala b/tests/telepathy/individual-properties.vala
index c31e00b..4922a4c 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
emails.add (new_email_fd);
var phones = new HashSet<PhoneFieldDetails> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
phones.add (new_phone_fd);
var urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 50ffb98..a8b6642 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> (str_hash, str_equal);
+ this.default_individuals = new HashSet<string> ();
/* 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> (str_hash, str_equal);
+ var ids_remaining = new HashSet<string> ();
foreach (var contact_id in ids_add)
ids_remaining.add (contact_id);
@@ -286,8 +286,7 @@ 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/Makefile.am b/tests/tracker/Makefile.am
index 27726b7..fe88726 100644
--- a/tests/tracker/Makefile.am
+++ b/tests/tracker/Makefile.am
@@ -32,7 +32,7 @@ AM_VALAFLAGS = \
--vapidir=$(top_srcdir)/tests/lib/tracker \
--pkg gobject-2.0 \
--pkg gio-2.0 \
- --pkg gee-1.0 \
+ --pkg gee-0.8 \
--pkg folks \
--pkg folks-test \
--pkg folks-tracker \
diff --git a/tests/tracker/add-persona.vala b/tests/tracker/add-persona.vala
index 1efb651..d554902 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
var r1 = new Role (this._title_1, this._organisation_1);
r1.role = this._role_1;
var role_fd1 = new RoleFieldDetails (r1);
@@ -284,9 +284,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v13 = Value (typeof (Set));
var postal_addresses = new HashSet<PostalAddressFieldDetails> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
-
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
var postal_a = new PostalAddress (this._po_box,
this._extension, this._street, this._locality, this._region,
@@ -300,8 +299,8 @@ public class AddPersonaTests : Folks.TestCase
Value? v14 = Value (typeof (Set));
var urls = new HashSet<UrlFieldDetails> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 ee13094..e3c7326 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 0c52f85..c0f8c97 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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 5cb4a15..d8f85d3 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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 73a878d..a04b959 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 b33dbf3..f5f2b52 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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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,
- (GLib.HashFunc) ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 788e690..3b89c1a 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 9ef9d57..198b0f3 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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 98b92e0..fd85e57 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 2dbc353..0953be7 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 57c7ffe..50dadd3 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> (
- (GLib.HashFunc) EmailFieldDetails.hash,
- (GLib.EqualFunc) EmailFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 0d732bd..80f6d3d 100644
--- a/tests/tracker/set-im-addresses.vala
+++ b/tests/tracker/set-im-addresses.vala
@@ -119,9 +119,8 @@ public class SetIMAddressesTests : Folks.TestCase
i.notify["im-addresses"].connect (this._notify_im_addresses_cb);
var im_addresses = new HashMultiMap<string, ImFieldDetails> (
- null, null,
- (GLib.HashFunc)ImFieldDetails.hash,
- (GLib.EqualFunc) ImFieldDetails.equal);
+ null, null, AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 ca178f1..6da3ab9 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> (
- (GLib.HashFunc) NoteFieldDetails.hash,
- (GLib.EqualFunc) NoteFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 5f3c775..79dccf6 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> (
- (GLib.HashFunc) PhoneFieldDetails.hash,
- (GLib.EqualFunc) PhoneFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
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 1f7c7dc..94b8659 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> (
- (GLib.HashFunc) PostalAddressFieldDetails.hash,
- (GLib.EqualFunc) PostalAddressFieldDetails.equal);
+ AbstractFieldDetails<PostalAddress>.hash_static,
+ AbstractFieldDetails<PostalAddress>.equal_static);
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 ab0151c..a9535e1 100644
--- a/tests/tracker/set-roles.vala
+++ b/tests/tracker/set-roles.vala
@@ -114,9 +114,9 @@ public class SetRolesTests : Folks.TestCase
i.notify["roles"].connect (this._notify_roles_cb);
Gee.HashSet<RoleFieldDetails> role_fds =
- new HashSet<RoleFieldDetails>
- ((GLib.HashFunc) RoleFieldDetails.hash,
- (GLib.EqualFunc) RoleFieldDetails.equal);
+ new HashSet<RoleFieldDetails> (
+ AbstractFieldDetails<Role>.hash_static,
+ AbstractFieldDetails<Role>.equal_static);
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 67dec87..09a2eb8 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> (
- (GLib.HashFunc) UrlFieldDetails.hash,
- (GLib.EqualFunc) UrlFieldDetails.equal);
+ AbstractFieldDetails<string>.hash_static,
+ AbstractFieldDetails<string>.equal_static);
var p1 = new UrlFieldDetails (
this._urls.get (UrlFieldDetails.PARAM_TYPE_BLOG));
p1.set_parameter (AbstractFieldDetails.PARAM_TYPE, UrlFieldDetails.PARAM_TYPE_BLOG);
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 99ac032..84bcff7 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -13,7 +13,7 @@ endif
VALAFLAGS = \
$(AM_VALAFLAGS) \
--vapidir=$(top_builddir)/folks \
- --pkg=gee-1.0 \
+ --pkg=gee-0.8 \
--pkg=libxml-2.0 \
--pkg=folks \
--pkg=build-conf \
diff --git a/tools/inspect/Makefile.am b/tools/inspect/Makefile.am
index 947706e..577e230 100644
--- a/tools/inspect/Makefile.am
+++ b/tools/inspect/Makefile.am
@@ -5,7 +5,7 @@ VALAFLAGS = \
--pkg=readline \
--pkg=gobject-2.0 \
--pkg=gio-2.0 \
- --pkg=gee-1.0 \
+ --pkg=gee-0.8 \
--pkg=posix \
--pkg=folks \
--pkg=build-conf \
diff --git a/tools/inspect/inspect.vala b/tools/inspect/inspect.vala
index d3a81e0..bd0794b 100644
--- a/tools/inspect/inspect.vala
+++ b/tools/inspect/inspect.vala
@@ -128,7 +128,7 @@ public class Folks.Inspect.Client : Object
{
Utils.init ();
- this.commands = new HashMap<string, Command> (str_hash, str_equal);
+ this.commands = new HashMap<string, Command> ();
/* Register the commands we support */
/* FIXME: This should be automatic */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]