comparison src/account.h @ 5943:a4f2aba0848d

[gaim-migrate @ 6384] This should fix corruption in the blist, accounts, and pounces when some protocol plugins cannot load. Some parts of gaim now use the new unique Plugin or Protocol Plugin IDs, while some still use the old protocol numbers. Accounts kind of used both, and when prpls were missing, it had trouble finding accounts. It would find the names, even without mapping the protocol numbers to IDs, and any duplicate accounts would get nuked. That would then affect pounce saving. Anyhow, long story short (well, it's already long, too late for that), this should fix all that mess. And introduce new mess, but hopefully temporary mess. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Mon, 23 Jun 2003 02:00:15 +0000
parents d58406d31a1a
children 158196b2db19
comparison
equal deleted inserted replaced
5942:d0320de18feb 5943:a4f2aba0848d
47 char *buddy_icon; /**< The buddy icon. */ 47 char *buddy_icon; /**< The buddy icon. */
48 48
49 gboolean remember_pass; /**< Remember the password. */ 49 gboolean remember_pass; /**< Remember the password. */
50 gboolean check_mail; /**< Check for mail. */ 50 gboolean check_mail; /**< Check for mail. */
51 51
52 GaimProtocol protocol; /**< The account protocol. */
53 char *protocol_id; /**< The ID of the protocol. */ 52 char *protocol_id; /**< The ID of the protocol. */
54 53
55 GaimConnection *gc; /**< The connection handle. */ 54 GaimConnection *gc; /**< The connection handle. */
56 55
57 GHashTable *settings; /**< Protocol-specific settings. */ 56 GHashTable *settings; /**< Protocol-specific settings. */
65 }; 64 };
66 65
67 /** 66 /**
68 * Creates a new account. 67 * Creates a new account.
69 * 68 *
70 * @param username The username. 69 * @param username The username.
71 * @param protocol The protocol. 70 * @param protocol_id The protocol ID.
72 */ 71 */
73 GaimAccount *gaim_account_new(const char *username, GaimProtocol protocol); 72 GaimAccount *gaim_account_new(const char *username, const char *protocol_id);
74 73
75 /** 74 /**
76 * Destroys an account. 75 * Destroys an account.
77 * 76 *
78 * @param account The account to destroy. 77 * @param account The account to destroy.
142 * 141 *
143 * @param account The account. 142 * @param account The account.
144 * @param protocol The protocol. 143 * @param protocol The protocol.
145 */ 144 */
146 void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol); 145 void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol);
146
147 /**
148 * Sets the account's protocol ID.
149 *
150 * @param account The account.
151 * @param protocol_id The protocol ID.
152 */
153 void gaim_account_set_protocol_id(GaimAccount *account,
154 const char *protocol_id);
147 155
148 /** 156 /**
149 * Sets the account's connection. 157 * Sets the account's connection.
150 * 158 *
151 * @param account The account. 159 * @param account The account.
317 * @param account The account. 325 * @param account The account.
318 * 326 *
319 * @return The protocol. 327 * @return The protocol.
320 */ 328 */
321 GaimProtocol gaim_account_get_protocol(const GaimAccount *account); 329 GaimProtocol gaim_account_get_protocol(const GaimAccount *account);
330
331 /**
332 * Returns the account's protocol ID.
333 *
334 * @param account The account.
335 *
336 * @return The protocol ID.
337 */
338 const char *gaim_account_get_protocol_id(const GaimAccount *account);
322 339
323 /** 340 /**
324 * Returns the account's connection. 341 * Returns the account's connection.
325 * 342 *
326 * @param account The account. 343 * @param account The account.
490 * @return A list of all accounts. 507 * @return A list of all accounts.
491 */ 508 */
492 GList *gaim_accounts_get_all(void); 509 GList *gaim_accounts_get_all(void);
493 510
494 /** 511 /**
495 * Finds an account with the specified name and protocol. 512 * Finds an account with the specified name and protocol number.
496 * 513 *
497 * @param name The account username. 514 * @param name The account username.
498 * @param protocol The account protocol. 515 * @param protocol The account protocol number.
499 * 516 *
500 * @return The account, if found, or @c FALSE otherwise. 517 * @return The account, if found, or @c FALSE otherwise.
501 */ 518 */
502 GaimAccount *gaim_accounts_find(const char *name, GaimProtocol protocol); 519 GaimAccount *gaim_accounts_find(const char *name, GaimProtocol protocol);
503 520
521 /**
522 * Finds an account with the specified name and protocol ID.
523 *
524 * @param name The account username.
525 * @param protocol_id The account protocol ID.
526 *
527 * @return The account, if found, or @c FALSE otherwise.
528 */
529 GaimAccount *gaim_accounts_find_with_prpl_id(const char *name,
530 const char *protocol_id);
531
504 #endif /* _GAIM_ACCOUNTS_H_ */ 532 #endif /* _GAIM_ACCOUNTS_H_ */