summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2013-10-21 11:56:10 -0400
committerXavier Claessens <xavier.claessens@collabora.co.uk>2013-10-21 12:11:52 -0400
commitb38f7126fd2ed166c7fdec9486ec509ddc7512a6 (patch)
tree68244b74845da102556ce71b5f4ec2bc8aa95905
parentdbd75fa4927537eb9723d523d08edb0e11b6ea82 (diff)
Stop using lowlevel telepathy-glib API
-rw-r--r--backends/telepathy/lib/tp-zeitgeist.vala11
-rw-r--r--backends/telepathy/lib/tpf-persona-store.vala2
2 files changed, 7 insertions, 6 deletions
diff --git a/backends/telepathy/lib/tp-zeitgeist.vala b/backends/telepathy/lib/tp-zeitgeist.vala
index b16ea4dd..65d75099 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 b5b0ac6e..049c68ab 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);