telepathy backend fixed to match last vala release.

Vala change:
1. Warn when accessing static members with an instance reference.
2. Deprecate implicit .begin for async methods.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=681420
parent ab760eba
......@@ -78,16 +78,16 @@ internal class Logger : GLib.Object
{
bool retval = false;
if (this._logger == null)
if (Logger._logger == null)
{
/* Create a logger proxy for favourites support */
var dbus_conn = yield Bus.get (BusType.SESSION);
this._logger = yield dbus_conn.get_proxy<LoggerIface> (
Logger._logger = yield dbus_conn.get_proxy<LoggerIface> (
"org.freedesktop.Telepathy.Logger",
"/org/freedesktop/Telepathy/Logger");
/* Failure? */
if (this._logger == null)
if (Logger._logger == null)
{
this.invalidated ();
return retval;
......@@ -100,7 +100,7 @@ internal class Logger : GLib.Object
retval = true;
}
this._logger.favourite_contacts_changed.connect ((ap, a, r) =>
Logger._logger.favourite_contacts_changed.connect ((ap, a, r) =>
{
if (ap != this._account_path)
return;
......@@ -114,19 +114,19 @@ internal class Logger : GLib.Object
private void _logger_vanished (DBusConnection conn, string name)
{
/* The logger has vanished on the bus, so it and we are no longer valid */
this._logger = null;
Logger._logger = null;
this.invalidated ();
}
public async string[] get_favourite_contacts () throws GLib.Error
{
/* Invalidated */
if (this._logger == null)
if (Logger._logger == null)
return {};
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
var logger = this._logger;
var logger = Logger._logger;
AccountFavourites[] favs = yield logger.get_favourite_contacts ();
foreach (AccountFavourites account in favs)
......@@ -142,12 +142,12 @@ internal class Logger : GLib.Object
public async void add_favourite_contact (string id) throws GLib.Error
{
/* Invalidated */
if (this._logger == null)
if (Logger._logger == null)
return;
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
var logger = this._logger;
var logger = Logger._logger;
yield logger.add_favourite_contact (
new ObjectPath (this._account_path), id);
}
......@@ -155,12 +155,12 @@ internal class Logger : GLib.Object
public async void remove_favourite_contact (string id) throws GLib.Error
{
/* Invalidated */
if (this._logger == null)
if (Logger._logger == null)
return;
/* Use an intermediate, since this._logger could disappear before this
* async function finishes */
var logger = this._logger;
var logger = Logger._logger;
yield logger.remove_favourite_contact (
new ObjectPath (this._account_path), id);
}
......
......@@ -71,7 +71,7 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
// Maximum version?
if (object_version == uint8.MAX)
{
object_version = this._FILE_FORMAT_VERSION;
object_version = PersonaStoreCache._FILE_FORMAT_VERSION;
}
if (object_version == 1)
......@@ -134,7 +134,7 @@ internal class Tpf.PersonaStoreCache : Folks.ObjectCache<Tpf.Persona>
protected override uint8 get_serialised_object_version ()
{
return this._FILE_FORMAT_VERSION;
return PersonaStoreCache._FILE_FORMAT_VERSION;
}
private Variant[] serialise_abstract_field_details (
......
......@@ -433,7 +433,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
{
debug ("Removing store %s (%p)", this.id, this);
this._emit_personas_changed (null, this._persona_set);
this._cache.clear_cache ();
this._cache.clear_cache.begin ();
this.removed ();
}
......@@ -1126,7 +1126,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
new GLib.GenericArray<TelepathyGLib.Contact> ());
this._got_initial_members = true;
this._populate_counters ();
this._populate_counters.begin ();
this._notify_if_is_quiescent ();
}
......@@ -1444,7 +1444,7 @@ public class Tpf.PersonaStore : Folks.PersonaStore
_("Extended information may only be set on the user's Telepathy contact."));
}
var info_list = this._contact_info_set_to_list (info_set);
var info_list = PersonaStore._contact_info_set_to_list (info_set);
if (this.account.connection != null)
{
GLib.Error? error = null;
......
......@@ -249,7 +249,7 @@ public class Tpf.Persona : Folks.Persona,
*/
public override string[] linkable_properties
{
get { return this._linkable_properties; }
get { return Tpf.Persona._linkable_properties; }
}
/**
......@@ -705,7 +705,7 @@ public class Tpf.Persona : Folks.Persona,
unowned string id = contact.get_identifier ();
var connection = contact.connection;
var account = connection.get_account ();
var uid = this.build_uid (store.type_id, store.id, id);
var uid = Folks.Persona.build_uid (store.type_id, store.id, id);
Object (contact: contact,
display_id: id,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment