diff 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
line wrap: on
line diff
--- a/src/account.h	Sun Jun 22 17:08:52 2003 +0000
+++ b/src/account.h	Mon Jun 23 02:00:15 2003 +0000
@@ -49,7 +49,6 @@
 	gboolean remember_pass;     /**< Remember the password.      */
 	gboolean check_mail;        /**< Check for mail.             */
 
-	GaimProtocol protocol;      /**< The account protocol.       */
 	char *protocol_id;          /**< The ID of the protocol.     */
 
 	GaimConnection *gc;         /**< The connection handle.      */
@@ -67,10 +66,10 @@
 /**
  * Creates a new account.
  *
- * @param username The username.
- * @param protocol The protocol.
+ * @param username    The username.
+ * @param protocol_id The protocol ID.
  */
-GaimAccount *gaim_account_new(const char *username, GaimProtocol protocol);
+GaimAccount *gaim_account_new(const char *username, const char *protocol_id);
 
 /**
  * Destroys an account.
@@ -146,6 +145,15 @@
 void gaim_account_set_protocol(GaimAccount *account, GaimProtocol protocol);
 
 /**
+ * Sets the account's protocol ID.
+ *
+ * @param account     The account.
+ * @param protocol_id The protocol ID.
+ */
+void gaim_account_set_protocol_id(GaimAccount *account,
+								  const char *protocol_id);
+
+/**
  * Sets the account's connection.
  *
  * @param account The account.
@@ -321,6 +329,15 @@
 GaimProtocol gaim_account_get_protocol(const GaimAccount *account);
 
 /**
+ * Returns the account's protocol ID.
+ *
+ * @param account The account.
+ *
+ * @return The protocol ID.
+ */
+const char *gaim_account_get_protocol_id(const GaimAccount *account);
+
+/**
  * Returns the account's connection.
  *
  * @param account The account.
@@ -492,13 +509,24 @@
 GList *gaim_accounts_get_all(void);
 
 /**
- * Finds an account with the specified name and protocol.
+ * Finds an account with the specified name and protocol number.
  *
  * @param name     The account username.
- * @param protocol The account protocol.
+ * @param protocol The account protocol number.
  *
  * @return The account, if found, or @c FALSE otherwise.
  */
 GaimAccount *gaim_accounts_find(const char *name, GaimProtocol protocol);
 
+/**
+ * Finds an account with the specified name and protocol ID.
+ *
+ * @param name        The account username.
+ * @param protocol_id The account protocol ID.
+ *
+ * @return The account, if found, or @c FALSE otherwise.
+ */
+GaimAccount *gaim_accounts_find_with_prpl_id(const char *name,
+											 const char *protocol_id);
+
 #endif /* _GAIM_ACCOUNTS_H_ */