}
typedef struct {
+ gchar *id;
gchar *alias;
guint subscribe:1;
if (d->tags != NULL)
tp_handle_set_destroy (d->tags);
+ g_free (d->id);
g_free (d->alias);
g_slice_free (TpTestContactDetails, d);
}
{
TpTestContactListManager *self = p;
TpHandle handle, cambridge, montreal, francophones;
+ const gchar *id;
TpTestContactDetails *d;
TpIntSet *set, *cam_set, *mtl_set, *fr_set;
TpIntSetFastIter iter;
mtl_set = tp_intset_new ();
fr_set = tp_intset_new ();
- handle = tp_handle_ensure (self->priv->contact_repo, "sjoerd@example.com",
- NULL, NULL);
+ id = "sjoerd@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
tp_intset_add (cam_set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Sjoerd");
d->subscribe = TRUE;
tp_handle_set_add (d->tags, cambridge);
tp_handle_unref (self->priv->contact_repo, handle);
- handle = tp_handle_ensure (self->priv->contact_repo, "guillaume@example.com",
- NULL, NULL);
+ id = "guillaume@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
tp_intset_add (cam_set, handle);
tp_intset_add (fr_set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Guillaume");
d->subscribe = TRUE;
tp_handle_set_add (d->tags, francophones);
tp_handle_unref (self->priv->contact_repo, handle);
- handle = tp_handle_ensure (self->priv->contact_repo, "olivier@example.com",
- NULL, NULL);
+ id = "olivier@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
tp_intset_add (mtl_set, handle);
tp_intset_add (fr_set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Olivier");
d->subscribe = TRUE;
tp_handle_set_add (d->tags, francophones);
tp_handle_unref (self->priv->contact_repo, handle);
- handle = tp_handle_ensure (self->priv->contact_repo, "travis@example.com",
- NULL, NULL);
+ id = "travis@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Travis");
d->subscribe = TRUE;
set = tp_intset_new ();
- handle = tp_handle_ensure (self->priv->contact_repo, "geraldine@example.com",
- NULL, NULL);
+ id = "geraldine@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
tp_intset_add (cam_set, handle);
tp_intset_add (fr_set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("GĂ©raldine");
d->subscribe_requested = TRUE;
tp_handle_set_add (d->tags, francophones);
tp_handle_unref (self->priv->contact_repo, handle);
- handle = tp_handle_ensure (self->priv->contact_repo, "helen@example.com",
- NULL, NULL);
+ id = "helen@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
tp_intset_add (set, handle);
tp_intset_add (cam_set, handle);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Helen");
d->subscribe_requested = TRUE;
/* Receive a couple of authorization requests too. These people are
* local-pending in publish */
- handle = tp_handle_ensure (self->priv->contact_repo, "wim@example.com",
- NULL, NULL);
+ id = "wim@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Wim");
d->publish_requested = TRUE;
g_signal_emit (self, signals[ALIAS_UPDATED], 0, handle);
g_signal_emit (self, signals[PRESENCE_UPDATED], 0, handle);
- handle = tp_handle_ensure (self->priv->contact_repo, "christian@example.com",
- NULL, NULL);
+ id = "christian@example.com";
+ handle = tp_handle_ensure (self->priv->contact_repo, id, NULL, NULL);
d = ensure_contact (self, handle, NULL);
+ g_free (d->id);
+ d->id = g_strdup (id);
g_free (d->alias);
d->alias = g_strdup ("Christian");
d->publish_requested = TRUE;