2 * Thrasher Bird - XMPP transport via libpurple
3 * Copyright (C) 2008 Barracuda Networks, Inc.
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with Thrasher Bird; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #include "connection.h"
25 #include "thconnection.h"
28 void thrasher_connection_error (PurpleConnection
*gc
,
29 PurpleConnectionError err
,
33 void thrasher_connection_error (PurpleConnection
*gc
,
34 PurpleConnectionError err
,
37 PurpleAccount
*account
;
39 /* Bail if we can't get what the error is for. */
40 g_return_if_fail(gc
!= NULL
);
42 /* Set account and verify */
43 account
= purple_connection_get_account(gc
);
44 g_return_if_fail(account
!= NULL
);
46 thrasher_wrapper_connection_error(thrasher_account_get_jid(account
),
51 gpointer
thrasher_connection_get_handle ()
58 thrasher_connection_update_progress(PurpleConnection
*gc
,
62 g_return_if_fail(gc
!= NULL
);
63 g_return_if_fail(text
!= NULL
);
64 PurpleAccount
*account
= purple_connection_get_account(gc
);
65 purple_debug_info("thrasher connection",
66 "%s: %s (step %d of %d)\n",
67 thrasher_account_get_jid(account
),
73 void thrasher_connection_init ()
75 purple_signal_connect_priority
76 (purple_connections_get_handle(),
78 thrasher_connection_get_handle(),
79 PURPLE_CALLBACK(thrasher_connection_error
),
81 10); // We want this to be called after the one in account.c,
82 // which has a priority of 0 (PURPLE_SIGNAL_PRIORITY_DEFAULT)