Mercurial > pidgin
comparison libpurple/account.h @ 18924:3afcfbed2ced
propagate from branch 'im.pidgin.pidgin' (head 5775dc23bad7ecf62c8f951574460d2f075f9e72)
to branch 'im.pidgin.soc.2007.xmpp' (head c9129cb5ffdd67387b55d418b79fd8c2b6665f55)
author | Andreas Monitzer <pidgin@monitzer.com> |
---|---|
date | Wed, 08 Aug 2007 21:05:47 +0000 |
parents | 8007c107054b 2a9d60d7af82 |
children | c9de28101e6d |
comparison
equal
deleted
inserted
replaced
18841:03a0054954bb | 18924:3afcfbed2ced |
---|---|
34 typedef struct _PurpleAccountUiOps PurpleAccountUiOps; | 34 typedef struct _PurpleAccountUiOps PurpleAccountUiOps; |
35 typedef struct _PurpleAccount PurpleAccount; | 35 typedef struct _PurpleAccount PurpleAccount; |
36 | 36 |
37 typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); | 37 typedef gboolean (*PurpleFilterAccountFunc)(PurpleAccount *account); |
38 typedef void (*PurpleAccountRequestAuthorizationCb)(void *); | 38 typedef void (*PurpleAccountRequestAuthorizationCb)(void *); |
39 typedef void (*PurpleAccountRegistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); | |
40 typedef void (*PurpleAccountUnregistrationCb)(PurpleAccount *account, gboolean succeeded, void *user_data); | |
39 | 41 |
40 #include "connection.h" | 42 #include "connection.h" |
41 #include "log.h" | 43 #include "log.h" |
42 #include "proxy.h" | 44 #include "proxy.h" |
43 #include "prpl.h" | 45 #include "prpl.h" |
134 | 136 |
135 PurplePresence *presence; /**< Presence. */ | 137 PurplePresence *presence; /**< Presence. */ |
136 PurpleLog *system_log; /**< The system log */ | 138 PurpleLog *system_log; /**< The system log */ |
137 | 139 |
138 void *ui_data; /**< The UI can put data here. */ | 140 void *ui_data; /**< The UI can put data here. */ |
141 PurpleAccountRegistrationCb registration_cb; | |
142 void *registration_cb_user_data; | |
139 }; | 143 }; |
140 | 144 |
141 #ifdef __cplusplus | 145 #ifdef __cplusplus |
142 extern "C" { | 146 extern "C" { |
143 #endif | 147 #endif |
170 * @param account The account to connect to. | 174 * @param account The account to connect to. |
171 */ | 175 */ |
172 void purple_account_connect(PurpleAccount *account); | 176 void purple_account_connect(PurpleAccount *account); |
173 | 177 |
174 /** | 178 /** |
179 * Sets the callback for successful registration. | |
180 * | |
181 * @param account The account for which this callback should be used | |
182 * @param cb The callback | |
183 * @param user_data The user data passed to the callback | |
184 */ | |
185 void purple_account_set_register_callback(PurpleAccount *account, PurpleAccountRegistrationCb cb, void *user_data); | |
186 | |
187 /** | |
175 * Registers an account. | 188 * Registers an account. |
176 * | 189 * |
177 * @param account The account to register. | 190 * @param account The account to register. |
178 */ | 191 */ |
179 void purple_account_register(PurpleAccount *account); | 192 void purple_account_register(PurpleAccount *account); |
193 | |
194 /** | |
195 * Unregisters an account (deleting it from the server). | |
196 * | |
197 * @param account The account to unregister. | |
198 * @param cb Optional callback to be called when unregistration is complete | |
199 * @param user_data user data to pass to the callback | |
200 */ | |
201 void purple_account_unregister(PurpleAccount *account, PurpleAccountUnregistrationCb cb, void *user_data); | |
180 | 202 |
181 /** | 203 /** |
182 * Disconnects from an account. | 204 * Disconnects from an account. |
183 * | 205 * |
184 * @param account The account to disconnect from. | 206 * @param account The account to disconnect from. |