aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorMarco Barisione <marco.barisione@collabora.co.uk>2013-05-10 00:10:17 +0800
committerMarco Barisione <marco.barisione@collabora.co.uk>2013-08-20 18:03:06 +0800
commit431c21692c396b39764eca31c3c4f05f4507ce59 (patch)
treea9f8fc0fa9ca7ee6255df908f9f1ef2059ac5875 /libempathy
parentfad2ecd3f071c671425954638081c641ff603503 (diff)
downloadgsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar.gz
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar.bz2
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar.lz
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar.xz
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.tar.zst
gsoc2013-empathy-431c21692c396b39764eca31c3c4f05f4507ce59.zip
tpaw-utils: move empathy_implement_finish_* to tp-aw and rename them
All the code was initially written for wocky which is under LGPL. https://bugzilla.gnome.org/show_bug.cgi?id=699492
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-client-factory.c4
-rw-r--r--libempathy/empathy-individual-manager.c4
-rw-r--r--libempathy/empathy-sasl-mechanisms.c3
-rw-r--r--libempathy/empathy-utils.h45
4 files changed, 8 insertions, 48 deletions
diff --git a/libempathy/empathy-client-factory.c b/libempathy/empathy-client-factory.c
index 39760998c..e82b8620b 100644
--- a/libempathy/empathy-client-factory.c
+++ b/libempathy/empathy-client-factory.c
@@ -22,6 +22,8 @@
#include "config.h"
#include "empathy-client-factory.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#include "empathy-tp-chat.h"
#include "empathy-utils.h"
@@ -274,6 +276,6 @@ empathy_client_factory_dup_contact_by_id_finish (
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_return_copy_pointer (self,
+ tpaw_implement_finish_return_copy_pointer (self,
empathy_client_factory_dup_contact_by_id_async, g_object_ref);
}
diff --git a/libempathy/empathy-individual-manager.c b/libempathy/empathy-individual-manager.c
index 71960b5d2..851898531 100644
--- a/libempathy/empathy-individual-manager.c
+++ b/libempathy/empathy-individual-manager.c
@@ -23,6 +23,8 @@
#include "config.h"
#include "empathy-individual-manager.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#include "empathy-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
@@ -946,6 +948,6 @@ empathy_individual_manager_unprepare_finish (
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self,
+ tpaw_implement_finish_void (self,
empathy_individual_manager_unprepare_async)
}
diff --git a/libempathy/empathy-sasl-mechanisms.c b/libempathy/empathy-sasl-mechanisms.c
index a6829c450..75a924f0c 100644
--- a/libempathy/empathy-sasl-mechanisms.c
+++ b/libempathy/empathy-sasl-mechanisms.c
@@ -22,6 +22,7 @@
#include "empathy-sasl-mechanisms.h"
#include <libsoup/soup.h>
+#include <tp-account-widgets/tpaw-utils.h>
#define DEBUG_FLAG EMPATHY_DEBUG_SASL
#include "empathy-debug.h"
@@ -336,7 +337,7 @@ empathy_sasl_auth_finish (TpChannel *channel,
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (channel, empathy_sasl_auth_common_async);
+ tpaw_implement_finish_void (channel, empathy_sasl_auth_common_async);
}
gboolean
diff --git a/libempathy/empathy-utils.h b/libempathy/empathy-utils.h
index fe194bdc1..c62083241 100644
--- a/libempathy/empathy-utils.h
+++ b/libempathy/empathy-utils.h
@@ -120,51 +120,6 @@ GVariant * empathy_boxed_to_variant (GType gtype,
const gchar *variant_type,
gpointer boxed);
-/* Copied from wocky/wocky-utils.h */
-
-#define empathy_implement_finish_void(source, tag) \
- if (g_simple_async_result_propagate_error (\
- G_SIMPLE_ASYNC_RESULT (result), error)) \
- return FALSE; \
- g_return_val_if_fail (g_simple_async_result_is_valid (result, \
- G_OBJECT(source), tag), \
- FALSE); \
- return TRUE;
-
-#define empathy_implement_finish_copy_pointer(source, tag, copy_func, \
- out_param) \
- GSimpleAsyncResult *_simple; \
- _simple = (GSimpleAsyncResult *) result; \
- if (g_simple_async_result_propagate_error (_simple, error)) \
- return FALSE; \
- g_return_val_if_fail (g_simple_async_result_is_valid (result, \
- G_OBJECT (source), tag), \
- FALSE); \
- if (out_param != NULL) \
- *out_param = copy_func ( \
- g_simple_async_result_get_op_res_gpointer (_simple)); \
- return TRUE;
-
-#define empathy_implement_finish_return_copy_pointer(source, tag, copy_func) \
- GSimpleAsyncResult *_simple; \
- _simple = (GSimpleAsyncResult *) result; \
- if (g_simple_async_result_propagate_error (_simple, error)) \
- return NULL; \
- g_return_val_if_fail (g_simple_async_result_is_valid (result, \
- G_OBJECT (source), tag), \
- NULL); \
- return copy_func (g_simple_async_result_get_op_res_gpointer (_simple));
-
-#define empathy_implement_finish_return_pointer(source, tag) \
- GSimpleAsyncResult *_simple; \
- _simple = (GSimpleAsyncResult *) result; \
- if (g_simple_async_result_propagate_error (_simple, error)) \
- return NULL; \
- g_return_val_if_fail (g_simple_async_result_is_valid (result, \
- G_OBJECT (source), tag), \
- NULL); \
- return g_simple_async_result_get_op_res_gpointer (_simple);
-
G_END_DECLS
#endif /* __EMPATHY_UTILS_H__ */