| 33972:b55f819a1239 | 33973:b193c0e9044b |
|---|---|
| 1 /* TODO | 1 /* TODO |
| 2 - fix error reporting | 2 - fix error reporting |
| 3 - uses accessors for PurpleKeyringPasswordNode | |
| 4 - use hashtable instead of Glib | 3 - use hashtable instead of Glib |
| 5 - plugin interface | 4 - plugin interface |
| 6 - keyring info struct | 5 - move keyring info struct upwards |
| 7 */ | 6 */ |
| 8 | 7 |
| 9 #include <glib.h> | 8 #include <glib.h> |
| 10 #include <string.h> | 9 #include <string.h> |
| 11 #include "version.h" | 10 #include "version.h" |
| 273 | 272 |
| 274 | 273 |
| 275 /** | 274 /** |
| 276 * Exports password info to a PurpleKeyringPasswordNode structure | 275 * Exports password info to a PurpleKeyringPasswordNode structure |
| 277 * (called for each account when accounts are synced) | 276 * (called for each account when accounts are synced) |
| 278 * TODO : add error reporting | 277 * TODO : add proper error reporting |
| 279 * use accessors for PurpleKeyringPasswordNode (FIXME) | |
| 280 * FIXME : REWRITE AS ASYNC | |
| 281 */ | 278 */ |
| 282 void | 279 void |
| 283 InternalKeyring_export_password(const PurpleAccount * account, | 280 InternalKeyring_export_password(const PurpleAccount * account, |
| 284 GError ** error, | 281 GError ** error, |
| 285 PurpleKeyringExportCallback cb, | 282 PurpleKeyringExportCallback cb, |
| 291 nodeinfo = purple_keyring_password_node_new(); | 288 nodeinfo = purple_keyring_password_node_new(); |
| 292 pwinfo = InternalKeyring_get_account_info(account); | 289 pwinfo = InternalKeyring_get_account_info(account); |
| 293 | 290 |
| 294 if (pwinfo->password == NULL) { | 291 if (pwinfo->password == NULL) { |
| 295 | 292 |
| 293 // FIXME : error | |
| 296 cb(NULL, error, data); | 294 cb(NULL, error, data); |
| 297 return; | 295 return; |
| 298 | 296 |
| 299 } else { | 297 } else { |
| 300 | 298 |