All the code was initially written for wocky which is under LGPL.
https://bugzilla.gnome.org/show_bug.cgi?id=699492
#include "config.h"
#include "empathy-client-factory.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#include "empathy-tp-chat.h"
#include "empathy-utils.h"
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);
}
#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
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self,
+ tpaw_implement_finish_void (self,
empathy_individual_manager_unprepare_async)
}
#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"
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
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__ */
#include "config.h"
#include "empathy-audio-src.h"
+#include <tp-account-widgets/tpaw-utils.h>
+
#ifdef HAVE_GST1
#include <gst/audio/streamvolume.h>
#else
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (src,
+ tpaw_implement_finish_void (src,
empathy_audio_src_change_microphone_async);
}
#include "empathy-mic-monitor.h"
#include <pulse/glib-mainloop.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-utils.h"
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self,
+ tpaw_implement_finish_void (self,
empathy_mic_monitor_change_microphone_async);
}
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_return_pointer (self,
+ tpaw_implement_finish_return_pointer (self,
empathy_mic_monitor_get_default_async);
}
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self,
+ tpaw_implement_finish_void (self,
empathy_mic_monitor_set_default_async);
}
#include <tp-account-widgets/tpaw-camera-monitor.h>
#include <tp-account-widgets/tpaw-gsettings.h>
#include <tp-account-widgets/tpaw-images.h>
+#include <tp-account-widgets/tpaw-utils.h>
#ifdef HAVE_CHEESE
#include <cheese-avatar-chooser.h>
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self, tpaw_avatar_chooser_apply_async);
+ tpaw_implement_finish_void (self, tpaw_avatar_chooser_apply_async);
}
#endif
#include "empathy-utils.h"
+#include "tpaw-utils.h"
#define DEBUG_FLAG EMPATHY_DEBUG_OTHER
#include "empathy-debug.h"
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_return_pointer (account,
+ tpaw_implement_finish_return_pointer (account,
tpaw_keyring_get_account_password_async);
}
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_return_pointer (account,
+ tpaw_implement_finish_return_pointer (account,
tpaw_keyring_get_room_password_async);
}
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (account, tpaw_keyring_set_account_password_async);
+ tpaw_implement_finish_void (account, tpaw_keyring_set_account_password_async);
}
gboolean
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (account, tpaw_keyring_set_room_password_async);
+ tpaw_implement_finish_void (account, tpaw_keyring_set_room_password_async);
}
/* delete */
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (account, tpaw_keyring_delete_account_password_async);
+ tpaw_implement_finish_void (account, tpaw_keyring_delete_account_password_async);
}
#include <tp-account-widgets/tpaw-calendar-button.h>
#include <tp-account-widgets/tpaw-contactinfo-utils.h>
#include <tp-account-widgets/tpaw-time.h>
+#include <tp-account-widgets/tpaw-utils.h>
#include "empathy-utils.h"
GAsyncResult *result,
GError **error)
{
- empathy_implement_finish_void (self, tpaw_user_info_apply_async);
+ tpaw_implement_finish_void (self, tpaw_user_info_apply_async);
}
void tpaw_make_color_whiter (GdkRGBA *color);
+/* Copied from wocky/wocky-utils.h */
+
+#define tpaw_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 tpaw_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 tpaw_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 tpaw_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 /* __TPAW_UTILS_H__ */