if (priv->sms_channel)
empathy_sms_contact_id (
account, priv->id,
- TP_USER_ACTION_TIME_NOT_USER_ACTION);
+ TP_USER_ACTION_TIME_NOT_USER_ACTION,
+ NULL, NULL);
else
empathy_chat_with_contact_id (
account, priv->id,
- TP_USER_ACTION_TIME_NOT_USER_ACTION);
+ TP_USER_ACTION_TIME_NOT_USER_ACTION,
+ NULL, NULL);
break;
case TP_HANDLE_TYPE_ROOM:
empathy_join_muc (account, priv->id,
empathy_sms_contact_id (
empathy_contact_get_account (contact),
empathy_contact_get_id (contact),
- empathy_get_current_action_time ());
+ empathy_get_current_action_time (),
+ NULL, NULL);
}
GtkWidget *
{
case EMP_NEW_MESSAGE_TEXT:
empathy_chat_with_contact_id (account, contact_id,
- empathy_get_current_action_time ());
+ empathy_get_current_action_time (),
+ NULL, NULL);
break;
case EMP_NEW_MESSAGE_SMS:
empathy_sms_contact_id (account, contact_id,
- empathy_get_current_action_time ());
+ empathy_get_current_action_time (),
+ NULL, NULL);
break;
default:
#include "empathy-auth-factory.h"
-#include <telepathy-glib/interfaces.h>
-#include <telepathy-glib/simple-handler.h>
-#include <telepathy-glib/util.h>
+#include <telepathy-glib/telepathy-glib.h>
#define DEBUG_FLAG EMPATHY_DEBUG_TLS
#include "empathy-debug.h"
{
empathy_chat_with_contact_id (
empathy_contact_get_account (contact), empathy_contact_get_id (contact),
- timestamp);
+ timestamp, NULL, NULL);
}
static void
TpHandleType target_handle_type,
const gchar *target_id,
gboolean sms_channel,
- gint64 timestamp)
+ gint64 timestamp,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GHashTable *request;
TpAccountChannelRequest *req;
tp_account_channel_request_set_delegate_to_preferred_handler (req, TRUE);
tp_account_channel_request_ensure_channel_async (req, EMPATHY_CHAT_BUS_NAME,
- NULL, ensure_text_channel_cb, NULL);
+ NULL, callback ? callback : ensure_text_channel_cb, user_data);
g_hash_table_unref (request);
g_object_unref (req);
}
+/* @callback is optional, but if it's provided, it should call the right
+ * _finish() func that we call in ensure_text_channel_cb() */
void
empathy_chat_with_contact_id (TpAccount *account,
const gchar *contact_id,
- gint64 timestamp)
+ gint64 timestamp,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
create_text_channel (account, TP_HANDLE_TYPE_CONTACT,
- contact_id, FALSE, timestamp);
+ contact_id, FALSE, timestamp, callback, user_data);
}
void
gint64 timestamp)
{
create_text_channel (account, TP_HANDLE_TYPE_ROOM,
- room_name, FALSE, timestamp);
+ room_name, FALSE, timestamp, NULL, NULL);
}
+/* @callback is optional, but if it's provided, it should call the right
+ * _finish() func that we call in ensure_text_channel_cb() */
void
empathy_sms_contact_id (TpAccount *account,
const gchar *contact_id,
- gint64 timestamp)
+ gint64 timestamp,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
create_text_channel (account, TP_HANDLE_TYPE_CONTACT,
- contact_id, TRUE, timestamp);
+ contact_id, TRUE, timestamp, callback, user_data);
}
/* Requesting 1 to 1 text channels */
void empathy_chat_with_contact_id (TpAccount *account,
const gchar *contact_id,
- gint64 timestamp);
+ gint64 timestamp,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
-void empathy_chat_with_contact (EmpathyContact *contact,
+void empathy_chat_with_contact (EmpathyContact *contact,
gint64 timestamp);
/* Request a muc channel */
/* Request a sms channel */
void empathy_sms_contact_id (TpAccount *account,
const gchar *contact_id,
- gint64 timestamp);
+ gint64 timestamp,
+ GAsyncReadyCallback callback,
+ gpointer user_data);
G_END_DECLS
if (data->room)
empathy_join_muc (data->account, data->id, timestamp);
else if (data->sms)
- empathy_sms_contact_id (data->account, data->id, timestamp);
+ empathy_sms_contact_id (data->account, data->id, timestamp,
+ NULL, NULL);
else
- empathy_chat_with_contact_id (data->account, data->id, timestamp);
+ empathy_chat_with_contact_id (data->account, data->id, timestamp,
+ NULL, NULL);
g_signal_emit (self, signals[CLOSED_CHATS_CHANGED], 0,
g_queue_get_length (priv->closed_queue));
if (!chat) {
empathy_chat_with_contact_id (
- account, contact_id, empathy_get_current_action_time ());
+ account, contact_id,
+ empathy_get_current_action_time (),
+ NULL, NULL);
g_strfreev (strv);
return;