[folks] Stop using lowlevel telepathy-glib API
- From: Xavier Claessens <xclaesse src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [folks] Stop using lowlevel telepathy-glib API
- Date: Mon, 21 Oct 2013 16:12:02 +0000 (UTC)
commit b38f7126fd2ed166c7fdec9486ec509ddc7512a6
Author: Xavier Claessens <xavier claessens collabora co uk>
Date: Mon Oct 21 11:56:10 2013 -0400
Stop using lowlevel telepathy-glib API
backends/telepathy/lib/tp-zeitgeist.vala | 11 ++++++-----
backends/telepathy/lib/tpf-persona-store.vala | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
---
diff --git a/backends/telepathy/lib/tp-zeitgeist.vala b/backends/telepathy/lib/tp-zeitgeist.vala
index b16ea4d..65d7509 100644
--- a/backends/telepathy/lib/tp-zeitgeist.vala
+++ b/backends/telepathy/lib/tp-zeitgeist.vala
@@ -37,6 +37,7 @@ public class FolksTpZeitgeist.Controller : Object
private Zeitgeist.Log? _log = null;
private Zeitgeist.Monitor? _monitor = null;
private string _protocol;
+ private TelepathyGLib.Account _account;
/* This object is owned by the PersonaStore, so we don't want a cyclic
* reference. */
@@ -49,12 +50,13 @@ public class FolksTpZeitgeist.Controller : Object
private IncreasePersonaCounter _im_interaction_cb;
private IncreasePersonaCounter _last_call_interaction_cb;
- public Controller (PersonaStore store, string protocol,
+ public Controller (PersonaStore store, TelepathyGLib.Account account,
IncreasePersonaCounter im_interaction_cb,
IncreasePersonaCounter last_call_interaction_cb)
{
this._store = store;
- this._protocol = protocol;
+ this._account = account;
+ this._protocol = account.protocol_name;
this._im_interaction_cb = im_interaction_cb;
this._last_call_interaction_cb = last_call_interaction_cb;
}
@@ -218,9 +220,8 @@ public class FolksTpZeitgeist.Controller : Object
/* To fetch events from Zeitgeist about the interaction with contacts we
* create templates reflecting how the telepathy-logger stores events in
* Zeitgeist */
- var origin =
- this._store.id.replace (TelepathyGLib.ACCOUNT_OBJECT_PATH_BASE,
- "x-telepathy-account-path:");
+ var origin = "x-telepathy-account-path:" +
+ this._account.get_path_suffix ();
Event ev1 = new Event.full ("", "",
"dbus://org.freedesktop.Telepathy.Logger.service");
ev1.origin = origin;
diff --git a/backends/telepathy/lib/tpf-persona-store.vala b/backends/telepathy/lib/tpf-persona-store.vala
index b5b0ac6..049c68a 100644
--- a/backends/telepathy/lib/tpf-persona-store.vala
+++ b/backends/telepathy/lib/tpf-persona-store.vala
@@ -1680,7 +1680,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
private async void _populate_counters ()
{
this._zg_controller = new FolksTpZeitgeist.Controller (this,
- this.account.protocol, (p, dt) =>
+ this.account, (p, dt) =>
{
var persona = p as Tpf.Persona;
assert (persona != null);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]