summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-27 10:44:24 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2011-04-27 10:44:24 +0100
commit17792156e777ab737cbf5e14be09a9b5e6c33e25 (patch)
tree8ed12459679f4156c1ebfaa00dc3640c7edf2ffb
parent69cc6c47f681cbe9a66db7e7808271b0d5ad4f73 (diff)
nosey-status: register a client so we can advertise interest
This way, StatusChanged will actually be signalled. Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--telepathy-ytstenut-glib/tests/nosey-status.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/telepathy-ytstenut-glib/tests/nosey-status.c b/telepathy-ytstenut-glib/tests/nosey-status.c
index 59ea010..fb63d9c 100644
--- a/telepathy-ytstenut-glib/tests/nosey-status.c
+++ b/telepathy-ytstenut-glib/tests/nosey-status.c
@@ -28,10 +28,12 @@
static GMainLoop *loop = NULL;
static TpYtsAccountManager *am = NULL;
+static TpYtsClient *client = NULL;
static void
getoutofhere (void)
{
+ tp_clear_object (&client);
/* we called Hold in main, so let's let that go here by calling
* Release */
tp_yts_account_manager_release (am);
@@ -187,6 +189,14 @@ connection_prepared_cb (GObject *source_object,
}
else
{
+ client = tp_yts_client_new ("nosey.status", account);
+
+ tp_yts_client_add_interests (client,
+ "urn:ytstenut:capabilities:yts-caps-cats",
+ NULL);
+
+ tp_yts_client_register (client, NULL);
+
tp_yts_status_ensure_for_connection_async (connection,
NULL, status_ensured_cb, NULL);
}
@@ -238,7 +248,7 @@ am_get_account_cb (GObject *source_object,
if (connection != NULL)
{
notify_connection_cb (g_object_ref (account), NULL, NULL);
- }
+ }
else
{
g_signal_connect (account, "notify::connection",