* Bug 655374 — Un-break avatar tests
* Bug 657067 — Can't build EDS backend using Vala master
* Bug 657332 — Add linking link-individuals
+* Bug 645056 — TpLowlevel library should have only static public functions
Overview of changes from libfolks 0.5.2 to libfolks 0.5.3
=========================================================
tp_lowlevel_gir_CFLAGS = $(TP_GLIB_CFLAGS)
tp_lowlevel_gir_LIBS = libtp-lowlevel.la
tp_lowlevel_gir_FILES = $(libtp_lowlevel_la_SOURCES) $(tp_lowlevel_headers)
-tp_lowlevel_gir_NAMESPACE = Folks
+tp_lowlevel_gir_NAMESPACE = TpLowlevel
+tp_lowlevel_gir_SCANNERFLAGS = --identifier-prefix=FolksTpLowlevel
INTROSPECTION_GIRS += tp-lowlevel.gir
if HAVE_VALA
#include "tp-lowlevel.h"
-G_DEFINE_TYPE (FolksTpLowlevel, folks_tp_lowlevel, G_TYPE_OBJECT);
-
GQuark
folks_tp_lowlevel_error_quark (void)
{
void
folks_tp_lowlevel_connection_open_contact_list_channel_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const char *name,
GAsyncReadyCallback callback,
/**
* folks_tp_lowlevel_connection_open_contact_list_channel_finish:
- * @lowlevel: a #FolksTpLowlevel
* @result: a #GAsyncResult
* @error: return location for a #GError, or %NULL
*
*/
TpChannel *
folks_tp_lowlevel_connection_open_contact_list_channel_finish (
- FolksTpLowlevel *lowlevel,
GAsyncResult *result,
GError **error)
{
void
folks_tp_lowlevel_connection_get_alias_flags_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
GAsyncReadyCallback callback,
gpointer user_data)
/**
* folks_tp_lowlevel_connection_get_alias_flags_finish:
- * @lowlevel: a #FolksTpLowlevel
* @result: a #GAsyncResult
* @error: return location for a #GError, or %NULL
*
*/
TpConnectionAliasFlags
folks_tp_lowlevel_connection_get_alias_flags_finish (
- FolksTpLowlevel *lowlevel,
GAsyncResult *result,
GError **error)
{
/**
* folks_tp_lowlevel_connection_get_contacts_by_handle_async:
- * @tp_lowlevel: a #FolksTpLowlevel
* @conn: the connection to use
* @contact_handles: (array length=contact_handles_length): the contact handles
* to get
*/
void
folks_tp_lowlevel_connection_get_contacts_by_handle_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const guint *contact_handles,
guint contact_handles_length,
/**
* folks_tp_lowlevel_connection_get_contacts_by_handle_finish:
- * @tp_lowlevel: a #FolksTpLowlevel
* @result: the async result
* @error: a #GError, or %NULL
*
*/
GList *
folks_tp_lowlevel_connection_get_contacts_by_handle_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error)
{
/**
* folks_tp_lowlevel_connection_get_contacts_by_id_async:
- * @tp_lowlevel: a #FolksTpLowlevel
* @conn: the connection to use
* @contact_ids: (array length=contact_ids_length) (element-type utf8): the
* contact IDs to get
*/
void
folks_tp_lowlevel_connection_get_contacts_by_id_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const char **contact_ids,
guint contact_ids_length,
/**
* folks_tp_lowlevel_connection_get_contacts_by_id_finish:
- * @tp_lowlevel: a #FolksTpLowlevel
* @result: the async result
* @error: a #GError, or %NULL
*
*/
GList *
folks_tp_lowlevel_connection_get_contacts_by_id_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error)
{
void
folks_tp_lowlevel_connection_get_requestable_channel_classes_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
GAsyncReadyCallback callback,
gpointer user_data)
/**
* folks_tp_lowlevel_connection_get_requestable_channel_classes_finish:
- * @tp_lowlevel: a #FolksTpLowlevel
* @result: a #GAsyncResult
* @error: return location for a #GError, or %NULL
*
*/
GPtrArray *
folks_tp_lowlevel_connection_get_requestable_channel_classes_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error)
{
const GArray *handles,
const GError *error,
gpointer user_data,
- GObject *tp_lowlevel)
+ GObject *weak_object)
{
guint channel_handle;
TRUE,
group_request_channel_cb,
NULL, NULL,
- tp_lowlevel);
+ weak_object);
}
void
folks_tp_lowlevel_connection_create_group_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const char *group)
{
void
folks_tp_lowlevel_connection_set_contact_alias (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
guint handle,
const gchar *alias)
/**
* folks_tp_lowlevel_connection_connect_to_new_group_channels:
- * @lowlevel: a #FolksTpLowlevel
* @conn: the connection to use
* @callback: (scope call): function to call on completion
* @user_data: (closure): user data to pass to @callback
*/
void
folks_tp_lowlevel_connection_connect_to_new_group_channels (
- FolksTpLowlevel *lowlevel,
TpConnection *conn,
FolksTpLowlevelNewGroupChannelsCallback callback,
gpointer user_data)
g_array_free (handles, TRUE);
}
-
-static void
-folks_tp_lowlevel_class_init (FolksTpLowlevelClass *klass)
-{
-}
-
-static void
-folks_tp_lowlevel_init (FolksTpLowlevel *self)
-{
-}
-
-FolksTpLowlevel *
-folks_tp_lowlevel_new (void)
-{
- return FOLKS_TP_LOWLEVEL (g_object_new (FOLKS_TYPE_TP_LOWLEVEL, NULL));
-}
G_BEGIN_DECLS
-typedef struct _FolksTpLowlevel FolksTpLowlevel;
-typedef struct _FolksTpLowlevelClass FolksTpLowlevelClass;
-
-struct _FolksTpLowlevel {
- /*<private>*/
- GObject parent;
-};
-
-struct _FolksTpLowlevelClass {
- /*<private>*/
- GObjectClass parent_class;
-};
-
-GType folks_tp_lowlevel_get_type (void);
-
-#define FOLKS_TYPE_TP_LOWLEVEL (folks_tp_lowlevel_get_type ())
-#define FOLKS_TP_LOWLEVEL(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), FOLKS_TYPE_TP_LOWLEVEL, FolksTpLowlevel))
-#define FOLKS_TP_LOWLEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), FOLKS_TYPE_TP_LOWLEVEL, FolksTpLowlevelClass))
-#define FOLKS_IS_TP_LOWLEVEL(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), FOLKS_TYPE_TP_LOWLEVEL))
-#define FOLKS_IS_TP_LOWLEVEL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), FOLKS_TYPE_TP_LOWLEVEL))
-#define FOLKS_TP_LOWLEVEL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), FOLKS_TYPE_TP_LOWLEVEL, FolksTpLowlevelClass))
-
GQuark folks_tp_lowlevel_error_quark (void);
#define FOLKS_TP_LOWLEVEL_ERROR (folks_tp_lowlevel_error_quark ())
FOLKS_TP_LOWLEVEL_ERROR_INVALID_ARGUMENT,
} FolksTpLowlevelError;
-FolksTpLowlevel *
-folks_tp_lowlevel_new (void) G_GNUC_WARN_UNUSED_RESULT;
-
/**
* folks_tp_lowlevel_channel_group_change_membership:
* @channel:
void
folks_tp_lowlevel_connection_connect_to_new_group_channels (
- FolksTpLowlevel *lowlevel,
TpConnection *conn,
FolksTpLowlevelNewGroupChannelsCallback callback,
gpointer user_data);
void
folks_tp_lowlevel_connection_create_group_async (
- FolksTpLowlevel *lowlevel,
TpConnection *conn,
const char *name);
void
folks_tp_lowlevel_connection_set_contact_alias (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
guint handle,
const gchar *alias);
void
folks_tp_lowlevel_connection_open_contact_list_channel_async (
- FolksTpLowlevel *lowlevel,
TpConnection *conn,
const char *name,
GAsyncReadyCallback callback,
TpChannel *
folks_tp_lowlevel_connection_open_contact_list_channel_finish (
- FolksTpLowlevel *lowlevel,
GAsyncResult *result,
GError **error);
void
folks_tp_lowlevel_connection_get_alias_flags_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
GAsyncReadyCallback callback,
gpointer user_data);
TpConnectionAliasFlags
folks_tp_lowlevel_connection_get_alias_flags_finish (
- FolksTpLowlevel *lowlevel,
GAsyncResult *result,
GError **error);
void
folks_tp_lowlevel_connection_get_contacts_by_handle_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const guint *contact_handles,
guint contact_handles_length,
GList *
folks_tp_lowlevel_connection_get_contacts_by_handle_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error);
void
folks_tp_lowlevel_connection_get_contacts_by_id_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
const char **contact_ids,
guint contact_ids_length,
GList *
folks_tp_lowlevel_connection_get_contacts_by_id_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error);
void
folks_tp_lowlevel_connection_get_requestable_channel_classes_async (
- FolksTpLowlevel *tp_lowlevel,
TpConnection *conn,
GAsyncReadyCallback callback,
gpointer user_data);
GPtrArray *
folks_tp_lowlevel_connection_get_requestable_channel_classes_finish (
- FolksTpLowlevel *tp_lowlevel,
GAsyncResult *result,
GError **error);
private Channel _stored;
private Channel _subscribe;
private Connection _conn;
- private TpLowlevel _ll;
private AccountManager _account_manager;
private Logger _logger;
private Contact? _self_contact;
this._groups = new HashMap<string, Channel> ();
this._favourite_handles = new HashSet<uint> ();
this._self_contact = null;
- this._ll = new TpLowlevel ();
}
/**
private void _connection_ready_cb (Object s, ParamSpec? p)
{
var c = (Connection) s;
- this._ll.connection_connect_to_new_group_channels (c,
+ FolksTpLowlevel.connection_connect_to_new_group_channels (c,
this._new_group_channels_cb);
- this._ll.connection_get_alias_flags_async.begin (c, (s2, res) =>
+ FolksTpLowlevel.connection_get_alias_flags_async.begin (c, (s2, res) =>
{
var new_can_alias = MaybeBool.FALSE;
try
{
- var flags = this._ll.connection_get_alias_flags_async.end (res);
+ var flags =
+ FolksTpLowlevel.connection_get_alias_flags_async.end (res);
if ((flags &
ConnectionAliasFlags.CONNECTION_ALIAS_FLAG_USER_SET) > 0)
{
this.notify_property ("can-alias-personas");
});
- this._ll.connection_get_requestable_channel_classes_async.begin (c,
+ FolksTpLowlevel.connection_get_requestable_channel_classes_async.begin (c,
(s3, res3) =>
{
var new_can_group = MaybeBool.FALSE;
try
{
- var ll = this._ll;
GenericArray<weak void*> v;
int i;
- v = ll.connection_get_requestable_channel_classes_async.end (
- res3);
+ v = FolksTpLowlevel.
+ connection_get_requestable_channel_classes_async.end (res3);
for (i = 0; i < v.length; i++)
{
{
try
{
- this._ll.channel_group_change_membership (channel,
+ FolksTpLowlevel.channel_group_change_membership (channel,
(Handle) persona.contact.handle, entry.value, null);
}
catch (GLib.Error e)
try
{
- this._ll.channel_group_change_membership (this._stored,
+ FolksTpLowlevel.channel_group_change_membership (this._stored,
(Handle) tp_persona.contact.handle, false, null);
}
catch (GLib.Error e1)
try
{
- this._ll.channel_group_change_membership (this._subscribe,
+ FolksTpLowlevel.channel_group_change_membership (this._subscribe,
(Handle) tp_persona.contact.handle, false, null);
}
catch (GLib.Error e2)
try
{
- this._ll.channel_group_change_membership (this._publish,
+ FolksTpLowlevel.channel_group_change_membership (this._publish,
(Handle) tp_persona.contact.handle, false, null);
}
catch (GLib.Error e3)
{
/* the changes queued above will be resolve in the NewChannels handler
*/
- this._ll.connection_create_group_async (this.account.connection,
+ FolksTpLowlevel.connection_create_group_async (this.account.connection,
group);
}
else
try
{
- this._ll.channel_group_change_membership (channel,
+ FolksTpLowlevel.channel_group_change_membership (channel,
(Handle) tp_persona.contact.handle, is_member, message);
}
catch (GLib.Error e)
/* FIXME: handle the error GLib.Error from this function */
try
{
- channel = yield this._ll.connection_open_contact_list_channel_async (
- conn, name);
+ channel =
+ yield FolksTpLowlevel.connection_open_contact_list_channel_async (
+ conn, name);
}
catch (GLib.Error e)
{
return;
GLib.List<TelepathyGLib.Contact> contacts =
- yield this._ll.connection_get_contacts_by_handle_async (
+ yield FolksTpLowlevel.connection_get_contacts_by_handle_async (
this._conn, contact_handles, (uint[]) _contact_features);
if (contacts == null || contacts.length () < 1)
return personas;
GLib.List<TelepathyGLib.Contact> contacts =
- yield this._ll.connection_get_contacts_by_id_async (
+ yield FolksTpLowlevel.connection_get_contacts_by_id_async (
this._conn, contact_ids, (uint[]) _contact_features);
unowned GLib.List<TelepathyGLib.Contact> l;
{
debug ("Changing alias of persona %u to '%s'.", persona.contact.handle,
alias);
- this._ll.connection_set_contact_alias (this._conn,
+ FolksTpLowlevel.connection_set_contact_alias (this._conn,
(Handle) persona.contact.handle, alias);
}
}