Mercurial > pidgin.yaz
comparison libpurple/connection.c @ 25288:da46097b4722
propagate from branch 'local.struct.hiding' (head da9fb6ccb9b3d723d8abdfaae8859bae223cf225)
to branch 'local.next.minor' (head bd7ae6d940b09aa836bd22be2c6c5b22bfbf4312)
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 31 Oct 2008 08:21:45 +0000 |
parents | 9ded0fb57e1c 8282911d5e17 |
children | 3d8c53f3108e |
comparison
equal
deleted
inserted
replaced
25287:de22f550bae2 | 25288:da46097b4722 |
---|---|
21 * | 21 * |
22 * You should have received a copy of the GNU General Public License | 22 * You should have received a copy of the GNU General Public License |
23 * along with this program; if not, write to the Free Software | 23 * along with this program; if not, write to the Free Software |
24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA | 24 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
25 */ | 25 */ |
26 #define _PURPLE_CONNECTION_C_ | |
27 | |
26 #include "internal.h" | 28 #include "internal.h" |
27 #include "account.h" | 29 #include "account.h" |
28 #include "blist.h" | 30 #include "blist.h" |
29 #include "connection.h" | 31 #include "connection.h" |
30 #include "dbus-maybe.h" | 32 #include "dbus-maybe.h" |
97 } | 99 } |
98 | 100 |
99 void | 101 void |
100 purple_connection_new(PurpleAccount *account, gboolean regist, const char *password) | 102 purple_connection_new(PurpleAccount *account, gboolean regist, const char *password) |
101 { | 103 { |
104 _purple_connection_new(account, regist, password); | |
105 } | |
106 | |
107 void | |
108 _purple_connection_new(PurpleAccount *account, gboolean regist, const char *password) | |
109 { | |
102 PurpleConnection *gc; | 110 PurpleConnection *gc; |
103 PurplePlugin *prpl; | 111 PurplePlugin *prpl; |
104 PurplePluginProtocolInfo *prpl_info; | 112 PurplePluginProtocolInfo *prpl_info; |
105 | 113 |
106 g_return_if_fail(account != NULL); | 114 g_return_if_fail(account != NULL); |
168 | 176 |
169 purple_signal_emit(purple_accounts_get_handle(), "account-connecting", account); | 177 purple_signal_emit(purple_accounts_get_handle(), "account-connecting", account); |
170 prpl_info->login(account); | 178 prpl_info->login(account); |
171 } | 179 } |
172 } | 180 } |
173 | |
174 void | 181 void |
175 purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data) | 182 purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data) |
183 { | |
184 _purple_connection_new_unregister(account, password, cb, user_data); | |
185 } | |
186 | |
187 void | |
188 _purple_connection_new_unregister(PurpleAccount *account, const char *password, PurpleAccountUnregistrationCb cb, void *user_data) | |
176 { | 189 { |
177 /* Lots of copy/pasted code to avoid API changes. You might want to integrate that into the previous function when posssible. */ | 190 /* Lots of copy/pasted code to avoid API changes. You might want to integrate that into the previous function when posssible. */ |
178 PurpleConnection *gc; | 191 PurpleConnection *gc; |
179 PurplePlugin *prpl; | 192 PurplePlugin *prpl; |
180 PurplePluginProtocolInfo *prpl_info; | 193 PurplePluginProtocolInfo *prpl_info; |
227 prpl_info->unregister_user(account, cb, user_data); | 240 prpl_info->unregister_user(account, cb, user_data); |
228 } | 241 } |
229 | 242 |
230 void | 243 void |
231 purple_connection_destroy(PurpleConnection *gc) | 244 purple_connection_destroy(PurpleConnection *gc) |
245 { | |
246 _purple_connection_destroy(gc); | |
247 } | |
248 | |
249 void | |
250 _purple_connection_destroy(PurpleConnection *gc) | |
232 { | 251 { |
233 PurpleAccount *account; | 252 PurpleAccount *account; |
234 GSList *buddies; | 253 GSList *buddies; |
235 PurplePluginProtocolInfo *prpl_info = NULL; | 254 PurplePluginProtocolInfo *prpl_info = NULL; |
236 gboolean remove = FALSE; | 255 gboolean remove = FALSE; |