Major changes:
Bugs fixed:
+• Bug 699865 — Folks needs to expose chat/VoIP service client types
API changes:
+• Add PresenceDetails.client_types
+• Add new Individual property:
+ - client_types
+• Add new Tpf.Persona property:
+ - client_types
Overview of changes from libfolks 0.9.2 to libfolks 0.9.3
=========================================================
public string presence_message { get; set; }
/**
+ * The Persona's client types.
+ *
+ * See {@link Folks.PresenceDetails.client_types}.
+ *
+ * @since UNRELEASED
+ */
+ public string[] client_types { get; set; }
+
+ /**
* The names of the Persona's linkable properties.
*
* See {@link Folks.Persona.linkable_properties}.
{
this._contact_notify_presence_status ();
});
+ contact.notify["client-types"].connect ((s, p) =>
+ {
+ this._contact_notify_client_types ();
+ });
+
this._contact_notify_presence_message ();
this._contact_notify_presence_type ();
this._contact_notify_presence_status ();
+ this._contact_notify_client_types ();
contact.notify["contact-info"].connect ((s, p) =>
{
this.presence_type = PresenceType.OFFLINE;
this.presence_message = "";
this.presence_status = "offline";
+ this.client_types = {};
this._writeable_properties = {};
}
contact.get_presence_type ());
}
+ private void _contact_notify_client_types ()
+ {
+ var contact = (Contact?) this._contact.get ();
+ assert (contact != null); /* should never be called while cached */
+ this.client_types = contact.get_client_types ();
+ }
+
private void _contact_notify_presence_status ()
{
var contact = (Contact?) this._contact.get ();
public string presence_message { get; set; }
/**
+ * {@inheritDoc}
+ *
+ * @since UNRELEASED
+ */
+ public string[] client_types { get; set; }
+
+ /**
* Whether the Individual is the user.
*
* Iff the Individual represents the user – the person who owns the
{
var presence_message = ""; /* must not be null */
var presence_status = ""; /* must not be null */
+ string[] client_types = {};
var presence_type = Folks.PresenceType.UNSET;
if (p != null)
presence_type = ((PresenceDetails) p).presence_type;
presence_message = ((PresenceDetails) p).presence_message;
presence_status = ((PresenceDetails) p).presence_status;
+ client_types = ((PresenceDetails) p).client_types;
}
/* Only notify if any of the values have changed. */
if (this.presence_type != presence_type ||
this.presence_message != presence_message ||
- this.presence_status != presence_status)
+ this.presence_status != presence_status ||
+ this.client_types != client_types)
{
this.freeze_notify ();
this.presence_message = presence_message;
this.presence_type = presence_type;
this.presence_status = presence_status;
+ this.client_types = client_types;
this.thaw_notify ();
}
});
persona.notify["alias"].connect (this._notify_alias_cb);
persona.notify["avatar"].connect (this._notify_avatar_cb);
persona.notify["presence-message"].connect (this._notify_presence_cb);
+ persona.notify["client-types"].connect (this._notify_presence_cb);
persona.notify["presence-type"].connect (this._notify_presence_cb);
persona.notify["im-addresses"].connect (this._notify_im_addresses_cb);
persona.notify["web-service-addresses"].connect
persona.notify["avatar"].disconnect (this._notify_avatar_cb);
persona.notify["presence-message"].disconnect (
this._notify_presence_cb);
+ persona.notify["client-types"].connect (this._notify_presence_cb);
persona.notify["presence-type"].disconnect (this._notify_presence_cb);
persona.notify["im-addresses"].disconnect (
this._notify_im_addresses_cb);
public abstract string presence_message { get; set; default = ""; }
/**
+ * The contact's client types.
+ *
+ * One can connect to instant messaging networks on a huge variety of devices,
+ * from PCs, to phones to consoles.
+ * The client types are represented in strings, using the values
+ * [[http://xmpp.org/registrar/disco-categories.html#client|documented by the
+ * XMPP registrar]]
+ *
+ * @since UNRELEASED
+ */
+ public abstract string[] client_types { get; set; }
+
+ /**
* The contact's detailed presence status.
*
* This is a more detailed representation of the contact's presence than