[next] telepathy-glib: account-request: update to 1.0 API
Jonny Lamb
jonny at kemper.freedesktop.org
Fri May 11 02:41:40 PDT 2012
Module: telepathy-glib
Branch: next
Commit: e4766c06dfd95789b726d2093c65d54e3684ad44
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=e4766c06dfd95789b726d2093c65d54e3684ad44
Author: Jonny Lamb <jonny.lamb at collabora.co.uk>
Date: Fri May 11 10:36:12 2012 +0100
account-request: update to 1.0 API
- SimplePresence â Presence
- more header includes are required
- TpSimpleClientFactory â TpClientFactory
Signed-off-by: Jonny Lamb <jonny.lamb at collabora.co.uk>
---
telepathy-glib/account-request.c | 19 ++++++++++---------
tests/dbus/account-request.c | 5 +++--
2 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/telepathy-glib/account-request.c b/telepathy-glib/account-request.c
index 2f39c7f..6701fcc 100644
--- a/telepathy-glib/account-request.c
+++ b/telepathy-glib/account-request.c
@@ -22,10 +22,11 @@
#include "telepathy-glib/account-request.h"
+#include <telepathy-glib/cli-misc.h>
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util.h>
-#include <telepathy-glib/simple-client-factory.h>
+#include <telepathy-glib/client-factory.h>
#define DEBUG_FLAG TP_DEBUG_ACCOUNTS
#include "telepathy-glib/dbus-internal.h"
@@ -179,7 +180,7 @@ tp_account_request_constructed (GObject *object)
#define GET_PRESENCE_VALUE(key, offset, type) \
G_STMT_START { \
GValueArray *_arr = tp_asv_get_boxed (self->priv->properties, \
- key, TP_STRUCT_TYPE_SIMPLE_PRESENCE); \
+ key, TP_STRUCT_TYPE_PRESENCE); \
if (_arr != NULL) \
g_value_set_##type (value, g_value_get_##type (_arr->values + offset)); \
} G_STMT_END
@@ -874,8 +875,8 @@ tp_account_request_set_requested_presence (TpAccountRequest *self,
g_return_if_fail (priv->result == NULL && !priv->created);
- value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_SIMPLE_PRESENCE,
- dbus_g_type_specialized_construct (TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+ value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE,
+ dbus_g_type_specialized_construct (TP_STRUCT_TYPE_PRESENCE));
arr = (GValueArray *) g_value_get_boxed (value);
g_value_set_uint (arr->values, presence);
@@ -918,8 +919,8 @@ tp_account_request_set_automatic_presence (TpAccountRequest *self,
g_return_if_fail (priv->result == NULL && !priv->created);
- value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_SIMPLE_PRESENCE,
- dbus_g_type_specialized_construct (TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+ value = tp_g_value_slice_new_take_boxed (TP_STRUCT_TYPE_PRESENCE,
+ dbus_g_type_specialized_construct (TP_STRUCT_TYPE_PRESENCE));
arr = (GValueArray *) g_value_get_boxed (value);
g_value_set_uint (arr->values, presence);
@@ -1244,7 +1245,7 @@ tp_account_request_create_account_cb (TpAccountManager *proxy,
priv->created = TRUE;
- account = tp_simple_client_factory_ensure_account (
+ account = tp_client_factory_ensure_account (
tp_proxy_get_factory (proxy), account_path, NULL, &e);
if (account == NULL)
@@ -1259,7 +1260,7 @@ tp_account_request_create_account_cb (TpAccountManager *proxy,
g_simple_async_result_set_op_res_gpointer (priv->result, account,
g_object_unref);
- features = tp_simple_client_factory_dup_account_features (
+ features = tp_client_factory_dup_account_features (
tp_proxy_get_factory (proxy), account);
tp_proxy_prepare_async (account, (GQuark *) features->data,
@@ -1331,7 +1332,7 @@ tp_account_request_create_account_async (TpAccountRequest *self,
*
* Finishes an asynchronous account creation operation and returns a
* new ref to a #TpAccount object. The returned account will have the
- * features listed in tp_simple_client_factory_dup_account_features()
+ * features listed in tp_client_factory_dup_account_features()
* (with the proxy factory from #TpAccountRequest:account-manager)
* prepared on it.
*
diff --git a/tests/dbus/account-request.c b/tests/dbus/account-request.c
index 2a67cd8..8402f6f 100644
--- a/tests/dbus/account-request.c
+++ b/tests/dbus/account-request.c
@@ -12,6 +12,7 @@
#include <string.h>
#include <telepathy-glib/account-request.h>
+#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include "tests/lib/simple-account.h"
@@ -429,7 +430,7 @@ test_create_succeed (Test *test,
array = tp_asv_get_boxed (test->am->create_properties,
TP_PROP_ACCOUNT_REQUESTED_PRESENCE,
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
g_assert_cmpuint (g_value_get_uint (array->values), ==,
TP_CONNECTION_PRESENCE_TYPE_AVAILABLE);
g_assert_cmpstr (g_value_get_string (array->values + 1), ==,
@@ -439,7 +440,7 @@ test_create_succeed (Test *test,
array = tp_asv_get_boxed (test->am->create_properties,
TP_PROP_ACCOUNT_AUTOMATIC_PRESENCE,
- TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+ TP_STRUCT_TYPE_PRESENCE);
g_assert_cmpuint (g_value_get_uint (array->values), ==,
TP_CONNECTION_PRESENCE_TYPE_BUSY);
g_assert_cmpstr (g_value_get_string (array->values + 1), ==,
More information about the telepathy-commits
mailing list