-typedef struct {
- EmpathyTpChat *chat;
- TpChannelChatState state;
-} StateChangedData;
-
-static void
-tp_chat_state_changed_got_contact_cb (TpConnection *connection,
- EmpathyContact *contact,
- const GError *error,
- gpointer user_data,
- GObject *chat)
-{
- TpChannelChatState state;
-
- if (error != NULL)
- {
- DEBUG ("Error: %s", error->message);
- return;
- }
-
- state = GPOINTER_TO_UINT (user_data);
- DEBUG ("Chat state changed for %s (%d): %d",
- empathy_contact_get_alias (contact),
- empathy_contact_get_handle (contact), state);
-
- g_signal_emit (chat, signals[CHAT_STATE_CHANGED], 0, contact, state);
-}
-
-static void
-tp_chat_state_changed_cb (TpChannel *channel,
- TpHandle handle,
- TpChannelChatState state,
- EmpathyTpChat *self)
-{
- TpConnection *connection = tp_channel_borrow_connection (
- (TpChannel *) self);
-
- empathy_tp_contact_factory_get_from_handle (connection, handle,
- tp_chat_state_changed_got_contact_cb, GUINT_TO_POINTER (state),
- NULL, G_OBJECT (self));
-}
-