Mercurial > pidgin
annotate src/account.h @ 13545:cfc2f7fcb3dd
[gaim-migrate @ 15922]
Way more changes that I initially thought I was going to make. I apologize
for the commit message spam. These changes bring a lot of consistency to
our capitalization and punctuation, especially of words like "e-mail".
For reference, I've used these rules (after discussing in #gaim):
e-mail, a case of two words joined:
"e-mail" - in the middle of a sentence caps context
"E-mail" - start of text in a sentence caps context
"E-Mail" - in a header (title) caps context
re-enable, a single word, would be:
"re-enable", "Re-enable", and "Re-enable" (respectively)
The reason this changeset exploded is that, as I went through and verified
these changes, I realized we were using improper capitalization (e.g. header
instead of sentence) in a number of dialogs. I fixed a number of these
cases before, and this corrects another pile.
This looks like I've made a LOT of work for the translators, but the impact
is significantly mitigated by three factors: 1) Many of these changes use
strings that already exist, or change one string in many places. 2) I've
used sed to correct the .po files where possible. 3) The actual changes
are extremely trivial.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 21 Mar 2006 04:32:45 +0000 |
parents | 702107dd58f1 |
children |
rev | line source |
---|---|
5563 | 1 /** |
2 * @file account.h Account API | |
3 * @ingroup core | |
4 * | |
5 * gaim | |
6 * | |
8046 | 7 * Gaim is the legal property of its developers, whose names are too numerous |
8 * to list here. Please refer to the COPYRIGHT file distributed with this | |
9 * source distribution. | |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
10 * |
5563 | 11 * This program is free software; you can redistribute it and/or modify |
12 * it under the terms of the GNU General Public License as published by | |
13 * the Free Software Foundation; either version 2 of the License, or | |
14 * (at your option) any later version. | |
15 * | |
16 * This program is distributed in the hope that it will be useful, | |
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
19 * GNU General Public License for more details. | |
20 * | |
21 * You should have received a copy of the GNU General Public License | |
22 * along with this program; if not, write to the Free Software | |
23 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
6605
943b03bcecf5
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6583
diff
changeset
|
24 * |
943b03bcecf5
[gaim-migrate @ 7129]
Christian Hammond <chipx86@chipx86.com>
parents:
6583
diff
changeset
|
25 * @see @ref account-signals |
5563 | 26 */ |
9713 | 27 #ifndef _GAIM_ACCOUNT_H_ |
28 #define _GAIM_ACCOUNT_H_ | |
5563 | 29 |
10021 | 30 #include <glib.h> |
8289
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8235
diff
changeset
|
31 |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
32 typedef struct _GaimAccountUiOps GaimAccountUiOps; |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
33 typedef struct _GaimAccount GaimAccount; |
5563 | 34 |
8289
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8235
diff
changeset
|
35 typedef gboolean (*GaimFilterAccountFunc)(GaimAccount *account); |
e39ea2b4f6cd
[gaim-migrate @ 9013]
Christian Hammond <chipx86@chipx86.com>
parents:
8235
diff
changeset
|
36 |
5563 | 37 #include "connection.h" |
9718 | 38 #include "log.h" |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
39 #include "proxy.h" |
5563 | 40 #include "prpl.h" |
9947 | 41 #include "status.h" |
5563 | 42 |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
43 struct _GaimAccountUiOps |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
44 { |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
45 /* A buddy we already have added us to their buddy list. */ |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
46 void (*notify_added)(GaimAccount *account, const char *remote_user, |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
47 const char *id, const char *alias, |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
48 const char *message); |
9944 | 49 void (*status_changed)(GaimAccount *account, GaimStatus *status); |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
50 /* Someone we don't have on our list added us. Will prompt to add them. */ |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
51 void (*request_add)(GaimAccount *account, const char *remote_user, |
12286
255e6912607b
[gaim-migrate @ 14590]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12285
diff
changeset
|
52 const char *id, const char *alias, |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
53 const char *message); |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
54 }; |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
55 |
5563 | 56 struct _GaimAccount |
57 { | |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
58 char *username; /**< The username. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
59 char *alias; /**< The current alias. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
60 char *password; /**< The account password. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
61 char *user_info; /**< User information. */ |
5563 | 62 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
63 char *buddy_icon; /**< The buddy icon. */ |
5563 | 64 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
65 gboolean remember_pass; /**< Remember the password. */ |
5563 | 66 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
67 char *protocol_id; /**< The ID of the protocol. */ |
5563 | 68 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
69 GaimConnection *gc; /**< The connection handle. */ |
10384 | 70 gboolean disconnecting; /**< The account is currently disconnecting */ |
5563 | 71 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
72 GHashTable *settings; /**< Protocol-specific settings. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
73 GHashTable *ui_settings; /**< UI-specific settings. */ |
5563 | 74 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
75 GaimProxyInfo *proxy_info; /**< Proxy information. This will be set */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
76 /* to NULL when the account inherits */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
77 /* proxy settings from global prefs. */ |
5563 | 78 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
79 GSList *permit; /**< Permit list. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
80 GSList *deny; /**< Deny list. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
81 int perm_deny; /**< The permit/deny setting. */ |
9944 | 82 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
83 GList *status_types; /**< Status types. */ |
9944 | 84 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
85 GaimPresence *presence; /**< Presence. */ |
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
86 GaimLog *system_log; /**< The system log */ |
9304
96c481da57ea
[gaim-migrate @ 10112]
Christian Hammond <chipx86@chipx86.com>
parents:
9187
diff
changeset
|
87 |
10812
d087e928ffd1
[gaim-migrate @ 12465]
Luke Schierer <lschiere@pidgin.im>
parents:
10758
diff
changeset
|
88 void *ui_data; /**< The UI can put data here. */ |
5563 | 89 }; |
90 | |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
91 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
92 extern "C" { |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
93 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
94 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
95 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
96 /** @name Account API */ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
97 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
98 /*@{*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
99 |
5563 | 100 /** |
101 * Creates a new account. | |
102 * | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
103 * @param username The username. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
104 * @param protocol_id The protocol ID. |
10071 | 105 * |
106 * @return The new account. | |
5563 | 107 */ |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
108 GaimAccount *gaim_account_new(const char *username, const char *protocol_id); |
5563 | 109 |
110 /** | |
111 * Destroys an account. | |
112 * | |
113 * @param account The account to destroy. | |
114 */ | |
115 void gaim_account_destroy(GaimAccount *account); | |
116 | |
117 /** | |
118 * Connects to an account. | |
119 * | |
120 * @param account The account to connect to. | |
121 */ | |
10740 | 122 void gaim_account_connect(GaimAccount *account); |
5563 | 123 |
124 /** | |
6581 | 125 * Registers an account. |
126 * | |
127 * @param account The account to register. | |
128 */ | |
10740 | 129 void gaim_account_register(GaimAccount *account); |
6581 | 130 |
131 /** | |
5563 | 132 * Disconnects from an account. |
133 * | |
134 * @param account The account to disconnect from. | |
135 */ | |
136 void gaim_account_disconnect(GaimAccount *account); | |
137 | |
138 /** | |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
139 * Notifies the user that the account was added to a remote user's |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
140 * buddy list. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
141 * |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
142 * This will present a dialog informing the user that he was added to the |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
143 * remote user's buddy list. |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
144 * |
12286
255e6912607b
[gaim-migrate @ 14590]
Etan Reisner <pidgin@unreliablesource.net>
parents:
12285
diff
changeset
|
145 * @param account The account that was added. |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
146 * @param remote_user The name of the user that added this account. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
147 * @param id The optional ID of the local account. Rarely used. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
148 * @param alias The optional alias of the user. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
149 * @param message The optional message sent from the user adding you. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
150 */ |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
151 void gaim_account_notify_added(GaimAccount *account, const char *remote_user, |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
152 const char *id, const char *alias, |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
153 const char *message); |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
154 |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
155 /** |
12285
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
156 * Notifies the user that the account was addded to a remote user's buddy |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
157 * list and asks ther user if they want to add the remote user to their buddy |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
158 * list. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
159 * |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
160 * This will present a dialog informing the local user that the remote user |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
161 * added them to the remote user's buddy list and will ask if they want to add |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
162 * the remote user to the buddy list. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
163 * |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
164 * @param account The account that was added. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
165 * @param remote_user The name of the user that added this account. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
166 * @param id The optional ID of the local account. Rarely used. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
167 * @param alias The optional alias of the user. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
168 * @param message The optional message sent from the user adding you. |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
169 */ |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
170 void gaim_account_request_add(GaimAccount *account, const char *remote_user, |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
171 const char *id, const char *alias, |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
172 const char *message); |
af257d8679fe
[gaim-migrate @ 14589]
Etan Reisner <pidgin@unreliablesource.net>
parents:
11782
diff
changeset
|
173 /** |
7063
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
174 * Requests information from the user to change the account's password. |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
175 * |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
176 * @param account The account to change the password on. |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
177 */ |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
178 void gaim_account_request_change_password(GaimAccount *account); |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
179 |
7fdac700deb1
[gaim-migrate @ 7627]
Christian Hammond <chipx86@chipx86.com>
parents:
7015
diff
changeset
|
180 /** |
7067
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
181 * Requests information from the user to change the account's |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
182 * user information. |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
183 * |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
184 * @param account The account to change the user information on. |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
185 */ |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
186 void gaim_account_request_change_user_info(GaimAccount *account); |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
187 |
71e0da45abe6
[gaim-migrate @ 7631]
Christian Hammond <chipx86@chipx86.com>
parents:
7065
diff
changeset
|
188 /** |
5563 | 189 * Sets the account's username. |
190 * | |
191 * @param account The account. | |
192 * @param username The username. | |
193 */ | |
194 void gaim_account_set_username(GaimAccount *account, const char *username); | |
195 | |
196 /** | |
197 * Sets the account's password. | |
198 * | |
199 * @param account The account. | |
200 * @param password The password. | |
201 */ | |
202 void gaim_account_set_password(GaimAccount *account, const char *password); | |
203 | |
204 /** | |
205 * Sets the account's alias. | |
206 * | |
207 * @param account The account. | |
208 * @param alias The alias. | |
209 */ | |
210 void gaim_account_set_alias(GaimAccount *account, const char *alias); | |
211 | |
212 /** | |
213 * Sets the account's user information | |
214 * | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
215 * @param account The account. |
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
216 * @param user_info The user information. |
5563 | 217 */ |
218 void gaim_account_set_user_info(GaimAccount *account, const char *user_info); | |
219 | |
220 /** | |
221 * Sets the account's buddy icon. | |
6583
e07c66073b6d
[gaim-migrate @ 7105]
Christian Hammond <chipx86@chipx86.com>
parents:
6581
diff
changeset
|
222 * |
5563 | 223 * @param account The account. |
224 * @param icon The buddy icon file. | |
225 */ | |
226 void gaim_account_set_buddy_icon(GaimAccount *account, const char *icon); | |
227 | |
228 /** | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
229 * Sets the account's protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
230 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
231 * @param account The account. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
232 * @param protocol_id The protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
233 */ |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
234 void gaim_account_set_protocol_id(GaimAccount *account, |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
235 const char *protocol_id); |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
236 |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
237 /** |
5563 | 238 * Sets the account's connection. |
239 * | |
240 * @param account The account. | |
241 * @param gc The connection. | |
242 */ | |
243 void gaim_account_set_connection(GaimAccount *account, GaimConnection *gc); | |
244 | |
245 /** | |
246 * Sets whether or not this account should save its password. | |
247 * | |
248 * @param account The account. | |
249 * @param value @c TRUE if it should remember the password. | |
250 */ | |
251 void gaim_account_set_remember_password(GaimAccount *account, gboolean value); | |
252 | |
253 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
254 * Sets whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
255 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
256 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
257 * @param value @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
258 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
259 void gaim_account_set_check_mail(GaimAccount *account, gboolean value); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
260 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
261 /** |
10400 | 262 * Sets whether or not this account is enabled for the specified |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
263 * UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
264 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
265 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
266 * @param ui The UI. |
10400 | 267 * @param value @c TRUE if it is enabled. |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
268 */ |
10400 | 269 void gaim_account_set_enabled(GaimAccount *account, const char *ui, |
270 gboolean value); | |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
271 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
272 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
273 * Sets the account's proxy information. |
6583
e07c66073b6d
[gaim-migrate @ 7105]
Christian Hammond <chipx86@chipx86.com>
parents:
6581
diff
changeset
|
274 * |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
275 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
276 * @param info The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
277 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
278 void gaim_account_set_proxy_info(GaimAccount *account, GaimProxyInfo *info); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
279 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
280 /** |
9944 | 281 * Sets the account's status types. |
282 * | |
283 * @param account The account. | |
284 * @param status_types The list of status types. | |
285 */ | |
286 void gaim_account_set_status_types(GaimAccount *account, GList *status_types); | |
287 | |
288 /** | |
10738 | 289 * Activates or deactivates a status. All changes to the statuses of |
11249 | 290 * an account go through this function or gaim_account_set_status_vargs |
291 * or gaim_account_set_status_list. | |
9944 | 292 * |
293 * Only independent statuses can be deactivated with this. To deactivate | |
9991 | 294 * an exclusive status, activate a different (and exclusive?) status. |
9944 | 295 * |
296 * @param account The account. | |
297 * @param status_id The ID of the status. | |
298 * @param active The active state. | |
299 * @param ... Optional NULL-terminated attributes passed for the | |
300 * new status, in an id, value pair. | |
301 */ | |
302 void gaim_account_set_status(GaimAccount *account, const char *status_id, | |
303 gboolean active, ...); | |
304 | |
10738 | 305 |
306 /** | |
307 * Activates or deactivates a status. All changes to the statuses of | |
11249 | 308 * an account go through this function or gaim_account_set_status or |
309 * gaim_account_set_status_list. | |
10738 | 310 * |
311 * Only independent statuses can be deactivated with this. To deactivate | |
312 * an exclusive status, activate a different (and exclusive?) status. | |
313 * | |
314 * @param account The account. | |
315 * @param status_id The ID of the status. | |
316 * @param active The active state. | |
10758 | 317 * @param args The va_list of attributes. |
10738 | 318 */ |
319 void gaim_account_set_status_vargs(GaimAccount *account, | |
320 const char *status_id, | |
321 gboolean active, va_list args); | |
322 | |
9944 | 323 /** |
11249 | 324 * Activates or deactivates a status. All changes to the statuses of |
325 * an account go through this function or gaim_account_set_status or | |
326 * gaim_account_set_status_vargs. | |
327 * | |
328 * Only independent statuses can be deactivated with this. To deactivate | |
329 * an exclusive status, activate a different (and exclusive?) status. | |
330 * | |
331 * @param account The account. | |
332 * @param status_id The ID of the status. | |
333 * @param active The active state. | |
334 * @param attrs A list of attributes in key/value pairs | |
335 */ | |
336 void gaim_account_set_status_list(GaimAccount *account, | |
337 const char *status_id, | |
338 gboolean active, GList *attrs); | |
339 | |
340 /** | |
5694
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
341 * Clears all protocol-specific settings on an account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
342 * |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
343 * @param account The account. |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
344 */ |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
345 void gaim_account_clear_settings(GaimAccount *account); |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
346 |
2d0d96c5a7a7
[gaim-migrate @ 6115]
Christian Hammond <chipx86@chipx86.com>
parents:
5681
diff
changeset
|
347 /** |
5563 | 348 * Sets a protocol-specific integer setting for an account. |
349 * | |
350 * @param account The account. | |
351 * @param name The name of the setting. | |
352 * @param value The setting's value. | |
353 */ | |
354 void gaim_account_set_int(GaimAccount *account, const char *name, int value); | |
355 | |
356 /** | |
357 * Sets a protocol-specific string setting for an account. | |
358 * | |
359 * @param account The account. | |
360 * @param name The name of the setting. | |
361 * @param value The setting's value. | |
362 */ | |
363 void gaim_account_set_string(GaimAccount *account, const char *name, | |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
364 const char *value); |
5563 | 365 |
366 /** | |
367 * Sets a protocol-specific boolean setting for an account. | |
368 * | |
369 * @param account The account. | |
370 * @param name The name of the setting. | |
371 * @param value The setting's value. | |
372 */ | |
373 void gaim_account_set_bool(GaimAccount *account, const char *name, | |
374 gboolean value); | |
375 | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
376 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
377 * Sets a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
378 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
379 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
380 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
381 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
382 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
383 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
384 void gaim_account_set_ui_int(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
385 const char *name, int value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
386 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
387 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
388 * Sets a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
389 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
390 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
391 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
392 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
393 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
394 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
395 void gaim_account_set_ui_string(GaimAccount *account, const char *ui, |
6720
41120df7ed94
[gaim-migrate @ 7247]
Christian Hammond <chipx86@chipx86.com>
parents:
6621
diff
changeset
|
396 const char *name, const char *value); |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
397 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
398 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
399 * Sets a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
400 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
401 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
402 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
403 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
404 * @param value The setting's value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
405 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
406 void gaim_account_set_ui_bool(GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
407 const char *name, gboolean value); |
5563 | 408 |
409 /** | |
410 * Returns whether or not the account is connected. | |
411 * | |
412 * @param account The account. | |
413 * | |
414 * @return @c TRUE if connected, or @c FALSE otherwise. | |
415 */ | |
416 gboolean gaim_account_is_connected(const GaimAccount *account); | |
417 | |
418 /** | |
11251 | 419 * Returns whether or not the account is connecting. |
420 * | |
421 * @param account The account. | |
422 * | |
423 * @return @c TRUE if connecting, or @c FALSE otherwise. | |
424 */ | |
425 gboolean gaim_account_is_connecting(const GaimAccount *account); | |
426 | |
427 /** | |
428 * Returns whether or not the account is disconnected. | |
429 * | |
430 * @param account The account. | |
431 * | |
432 * @return @c TRUE if disconnected, or @c FALSE otherwise. | |
433 */ | |
434 gboolean gaim_account_is_disconnected(const GaimAccount *account); | |
435 | |
436 /** | |
5563 | 437 * Returns the account's username. |
438 * | |
439 * @param account The account. | |
440 * | |
441 * @return The username. | |
442 */ | |
443 const char *gaim_account_get_username(const GaimAccount *account); | |
444 | |
445 /** | |
446 * Returns the account's password. | |
447 * | |
448 * @param account The account. | |
449 * | |
450 * @return The password. | |
451 */ | |
452 const char *gaim_account_get_password(const GaimAccount *account); | |
453 | |
454 /** | |
455 * Returns the account's alias. | |
456 * | |
457 * @param account The account. | |
458 * | |
459 * @return The alias. | |
460 */ | |
461 const char *gaim_account_get_alias(const GaimAccount *account); | |
462 | |
463 /** | |
464 * Returns the account's user information. | |
465 * | |
466 * @param account The account. | |
467 * | |
468 * @return The user information. | |
469 */ | |
470 const char *gaim_account_get_user_info(const GaimAccount *account); | |
471 | |
472 /** | |
473 * Returns the account's buddy icon filename. | |
474 * | |
475 * @param account The account. | |
476 * | |
477 * @return The buddy icon filename. | |
478 */ | |
479 const char *gaim_account_get_buddy_icon(const GaimAccount *account); | |
480 | |
481 /** | |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
482 * Returns the account's protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
483 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
484 * @param account The account. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
485 * |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
486 * @return The protocol ID. |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
487 */ |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
488 const char *gaim_account_get_protocol_id(const GaimAccount *account); |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
489 |
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
490 /** |
9699 | 491 * Returns the account's protocol name. |
492 * | |
493 * @param account The account. | |
494 * | |
495 * @return The protocol name. | |
496 */ | |
497 const char *gaim_account_get_protocol_name(const GaimAccount *account); | |
498 | |
499 /** | |
5563 | 500 * Returns the account's connection. |
501 * | |
502 * @param account The account. | |
503 * | |
504 * @return The connection. | |
505 */ | |
506 GaimConnection *gaim_account_get_connection(const GaimAccount *account); | |
507 | |
508 /** | |
509 * Returns whether or not this account should save its password. | |
510 * | |
511 * @param account The account. | |
512 * | |
513 * @return @c TRUE if it should remember the password. | |
514 */ | |
515 gboolean gaim_account_get_remember_password(const GaimAccount *account); | |
516 | |
517 /** | |
5565
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
518 * Returns whether or not this account should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
519 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
520 * @param account The account. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
521 * |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
522 * @return @c TRUE if it should check for mail. |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
523 */ |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
524 gboolean gaim_account_get_check_mail(const GaimAccount *account); |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
525 |
c3c4aaf69f65
[gaim-migrate @ 5967]
Christian Hammond <chipx86@chipx86.com>
parents:
5564
diff
changeset
|
526 /** |
10400 | 527 * Returns whether or not this account is enabled for the |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
528 * specified UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
529 * |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
530 * @param account The account. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
531 * @param ui The UI. |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
532 * |
10400 | 533 * @return @c TRUE if it enabled on this UI. |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
534 */ |
10400 | 535 gboolean gaim_account_get_enabled(const GaimAccount *account, |
536 const char *ui); | |
5779
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
537 |
758fa27534b3
[gaim-migrate @ 6204]
Christian Hammond <chipx86@chipx86.com>
parents:
5777
diff
changeset
|
538 /** |
5681
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
539 * Returns the account's proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
540 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
541 * @param account The account. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
542 * |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
543 * @return The proxy information. |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
544 */ |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
545 GaimProxyInfo *gaim_account_get_proxy_info(const GaimAccount *account); |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
546 |
46d7ad0dfa26
[gaim-migrate @ 6100]
Christian Hammond <chipx86@chipx86.com>
parents:
5643
diff
changeset
|
547 /** |
10738 | 548 * Returns the active status for this account. This looks through |
549 * the GaimPresence associated with this account and returns the | |
550 * GaimStatus that has its active flag set to "TRUE." There can be | |
551 * only one active GaimStatus in a GaimPresence. | |
552 * | |
553 * @param account The account. | |
554 * | |
555 * @return The active status. | |
556 */ | |
557 GaimStatus *gaim_account_get_active_status(const GaimAccount *account); | |
558 | |
559 /** | |
9944 | 560 * Returns the account status with the specified ID. |
561 * | |
562 * Note that this works differently than gaim_buddy_get_status() in that | |
563 * it will only return NULL if the status was not registered. | |
564 * | |
565 * @param account The account. | |
566 * @param status_id The status ID. | |
567 * | |
568 * @return The status, or NULL if it was never registered. | |
569 */ | |
570 GaimStatus *gaim_account_get_status(const GaimAccount *account, | |
571 const char *status_id); | |
572 | |
573 /** | |
574 * Returns the account status type with the specified ID. | |
575 * | |
576 * @param account The account. | |
11739 | 577 * @param id The ID of the status type to find. |
9944 | 578 * |
579 * @return The status type if found, or NULL. | |
580 */ | |
581 GaimStatusType *gaim_account_get_status_type(const GaimAccount *account, | |
582 const char *id); | |
583 | |
584 /** | |
11739 | 585 * Returns the account status type with the specified primitive. |
586 * Note: It is possible for an account to have more than one | |
587 * GaimStatusType with the same primitive. In this case, the | |
588 * first GaimStatusType is returned. | |
589 * | |
590 * @param account The account. | |
591 * @param primitive The type of the status type to find. | |
592 * | |
593 * @return The status if found, or NULL. | |
594 */ | |
595 GaimStatusType *gaim_account_get_status_type_with_primitive( | |
596 const GaimAccount *account, | |
597 GaimStatusPrimitive primitive); | |
598 | |
599 /** | |
9944 | 600 * Returns the account's presence. |
601 * | |
602 * @param account The account. | |
603 * | |
604 * @return The account's presence. | |
605 */ | |
606 GaimPresence *gaim_account_get_presence(const GaimAccount *account); | |
607 | |
608 /** | |
609 * Returns whether or not an account status is active. | |
610 * | |
611 * @param account The account. | |
612 * @param status_id The status ID. | |
613 * | |
614 * @return TRUE if active, or FALSE if not. | |
615 */ | |
616 gboolean gaim_account_is_status_active(const GaimAccount *account, | |
617 const char *status_id); | |
618 | |
619 /** | |
620 * Returns the account's status types. | |
621 * | |
622 * @param account The account. | |
623 * | |
624 * @return The account's status types. | |
625 */ | |
626 const GList *gaim_account_get_status_types(const GaimAccount *account); | |
627 | |
628 /** | |
5563 | 629 * Returns a protocol-specific integer setting for an account. |
630 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
631 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
632 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
633 * @param default_value The default value. |
5563 | 634 * |
635 * @return The value. | |
636 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
637 int gaim_account_get_int(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
638 int default_value); |
5563 | 639 |
640 /** | |
641 * Returns a protocol-specific string setting for an account. | |
642 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
643 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
644 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
645 * @param default_value The default value. |
5563 | 646 * |
647 * @return The value. | |
648 */ | |
649 const char *gaim_account_get_string(const GaimAccount *account, | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
650 const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
651 const char *default_value); |
5563 | 652 |
653 /** | |
654 * Returns a protocol-specific boolean setting for an account. | |
655 * | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
656 * @param account The account. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
657 * @param name The name of the setting. |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
658 * @param default_value The default value. |
5563 | 659 * |
660 * @return The value. | |
661 */ | |
5564
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
662 gboolean gaim_account_get_bool(const GaimAccount *account, const char *name, |
187c740f2a4e
[gaim-migrate @ 5966]
Christian Hammond <chipx86@chipx86.com>
parents:
5563
diff
changeset
|
663 gboolean default_value); |
5563 | 664 |
665 /** | |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
666 * Returns a UI-specific integer setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
667 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
668 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
669 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
670 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
671 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
672 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
673 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
674 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
675 int gaim_account_get_ui_int(const GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
676 const char *name, int default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
677 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
678 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
679 * Returns a UI-specific string setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
680 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
681 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
682 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
683 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
684 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
685 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
686 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
687 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
688 const char *gaim_account_get_ui_string(const GaimAccount *account, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
689 const char *ui, const char *name, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
690 const char *default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
691 |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
692 /** |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
693 * Returns a UI-specific boolean setting for an account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
694 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
695 * @param account The account. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
696 * @param ui The UI name. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
697 * @param name The name of the setting. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
698 * @param default_value The default value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
699 * |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
700 * @return The value. |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
701 */ |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
702 gboolean gaim_account_get_ui_bool(const GaimAccount *account, const char *ui, |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
703 const char *name, gboolean default_value); |
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
704 |
8573 | 705 |
706 /** | |
707 * Returns the system log for an account. | |
708 * | |
9000 | 709 * @param account The account. |
13507
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
710 * @param create Should it be created if it doesn't exist? |
8573 | 711 * |
712 * @return The log. | |
13507
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
713 * |
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
714 * @note Callers should almost always pass @c FALSE for @a create. |
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
715 * Passing @c TRUE could result in an existing log being reopened, |
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
716 * if the log has already been closed, which not all loggers deal |
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
717 * with appropriately. |
8573 | 718 */ |
13507
702107dd58f1
[gaim-migrate @ 15883]
Richard Laager <rlaager@wiktel.com>
parents:
12857
diff
changeset
|
719 GaimLog *gaim_account_get_log(GaimAccount *account, gboolean create); |
8573 | 720 |
721 /** | |
722 * Frees the system log of an account | |
723 * | |
9000 | 724 * @param account The account. |
8573 | 725 */ |
9304
96c481da57ea
[gaim-migrate @ 10112]
Christian Hammond <chipx86@chipx86.com>
parents:
9187
diff
changeset
|
726 void gaim_account_destroy_log(GaimAccount *account); |
8573 | 727 |
11643 | 728 /** |
729 * Adds a buddy to the server-side buddy list for the specified account. | |
730 * | |
731 * @param account The account. | |
732 * @param buddy The buddy to add. | |
733 */ | |
734 void gaim_account_add_buddy(GaimAccount *account, GaimBuddy *buddy); | |
735 /** | |
736 * Adds a list of buddies to the server-side buddy list. | |
737 * | |
738 * @param account The account. | |
739 * @param buddies The list of GaimBlistNodes representing the buddies to add. | |
740 */ | |
741 void gaim_account_add_buddies(GaimAccount *account, GList *buddies); | |
742 | |
743 /** | |
744 * Removes a buddy from the server-side buddy list. | |
745 * | |
746 * @param account The account. | |
747 * @param buddy The buddy to remove. | |
11782
4baf0aa3158e
[gaim-migrate @ 14073]
Gary Kramlich <grim@reaperworld.com>
parents:
11739
diff
changeset
|
748 * @param group The group to remove the buddy from. |
11643 | 749 */ |
750 void gaim_account_remove_buddy(GaimAccount *account, GaimBuddy *buddy, | |
751 GaimGroup *group); | |
752 | |
753 /** | |
754 * Removes a list of buddies from the server-side buddy list. | |
755 * | |
756 * @note The lists buddies and groups are parallel lists. Be sure that node n of | |
757 * groups matches node n of buddies. | |
758 * | |
759 * @param account The account. | |
760 * @param buddies The list of buddies to remove. | |
761 * @param groups The list of groups to remove buddies from. Each node of this | |
762 * list should match the corresponding node of buddies. | |
763 */ | |
764 void gaim_account_remove_buddies(GaimAccount *account, GList *buddies, | |
765 GList *groups); | |
766 | |
767 /** | |
768 * Removes a group from the server-side buddy list. | |
769 * | |
770 * @param account The account. | |
771 * @param group The group to remove. | |
772 */ | |
773 void gaim_account_remove_group(GaimAccount *account, GaimGroup *group); | |
774 | |
775 /** | |
776 * Changes the password on the specified account. | |
777 * | |
778 * @param account The account. | |
779 * @param orig_pw The old password. | |
780 * @param new_pw The new password. | |
781 */ | |
782 void gaim_account_change_password(GaimAccount *account, const char *orig_pw, | |
783 const char *new_pw); | |
784 | |
12645
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
785 /** |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
786 * Whether the account supports sending offline messages to buddy. |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
787 * |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
788 * @param account The account |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
789 * @param buddy The buddy |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
790 */ |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
791 gboolean gaim_account_supports_offline_message(GaimAccount *account, GaimBuddy *buddy); |
fc28451f5d96
[gaim-migrate @ 14983]
Richard Laager <rlaager@wiktel.com>
parents:
12420
diff
changeset
|
792 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
793 /*@}*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
794 |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
795 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
796 /** @name Accounts API */ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
797 /**************************************************************************/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
798 /*@{*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
799 |
5777
1f786fb43ee6
[gaim-migrate @ 6202]
Christian Hammond <chipx86@chipx86.com>
parents:
5710
diff
changeset
|
800 /** |
5710
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
801 * Adds an account to the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
802 * |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
803 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
804 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
805 void gaim_accounts_add(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
806 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
807 /** |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
808 * Removes an account from the list of accounts. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
809 * |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
810 * @param account The account. |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
811 */ |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
812 void gaim_accounts_remove(GaimAccount *account); |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
813 |
dbac958d8937
[gaim-migrate @ 6131]
Christian Hammond <chipx86@chipx86.com>
parents:
5694
diff
changeset
|
814 /** |
6368
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
815 * Deletes an account. |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
816 * |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
817 * This will remove any buddies from the buddy list that belong to this |
11732 | 818 * account, buddy pounces that belong to this account, and will also |
8235 | 819 * destroy @a account. |
6368
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
820 * |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
821 * @param account The account. |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
822 */ |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
823 void gaim_accounts_delete(GaimAccount *account); |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
824 |
41e6d15f4687
[gaim-migrate @ 6873]
Christian Hammond <chipx86@chipx86.com>
parents:
6367
diff
changeset
|
825 /** |
5580
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
826 * Reorders an account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
827 * |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
828 * @param account The account to reorder. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
829 * @param new_index The new index for the account. |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
830 */ |
12420
b7d77321b685
[gaim-migrate @ 14727]
Richard Laager <rlaager@wiktel.com>
parents:
12323
diff
changeset
|
831 void gaim_accounts_reorder(GaimAccount *account, gint new_index); |
5580
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
832 |
86456ec3ca25
[gaim-migrate @ 5984]
Christian Hammond <chipx86@chipx86.com>
parents:
5573
diff
changeset
|
833 /** |
5563 | 834 * Returns a list of all accounts. |
835 * | |
836 * @return A list of all accounts. | |
837 */ | |
838 GList *gaim_accounts_get_all(void); | |
839 | |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
840 /** |
10400 | 841 * Returns a list of all enabled accounts |
842 * | |
11732 | 843 * @return A list of all enabled accounts. The list is owned |
844 * by the caller, and must be g_list_free()d to avoid | |
845 * leaking the nodes. | |
10400 | 846 */ |
847 GList *gaim_accounts_get_all_active(void); | |
848 | |
849 /** | |
8073
2b396aefe321
[gaim-migrate @ 8771]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
850 * Finds an account with the specified name and protocol id. |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
851 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
852 * @param name The account username. |
8073
2b396aefe321
[gaim-migrate @ 8771]
Christian Hammond <chipx86@chipx86.com>
parents:
8046
diff
changeset
|
853 * @param protocol The account protocol ID. |
5874
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
854 * |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
855 * @return The account, if found, or @c FALSE otherwise. |
964e4f94fc56
[gaim-migrate @ 6306]
Christian Hammond <chipx86@chipx86.com>
parents:
5872
diff
changeset
|
856 */ |
7132 | 857 GaimAccount *gaim_accounts_find(const char *name, const char *protocol); |
5943
a4f2aba0848d
[gaim-migrate @ 6384]
Christian Hammond <chipx86@chipx86.com>
parents:
5879
diff
changeset
|
858 |
11348 | 859 /** |
860 * This is called by the core after all subsystems and what | |
861 * not have been initialized. It sets all enabled accounts | |
12857
e5f780a6137b
[gaim-migrate @ 15208]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12645
diff
changeset
|
862 * to their startup status by signing them on, setting them |
11348 | 863 * away, etc. |
864 * | |
865 * You probably shouldn't call this unless you really know | |
866 * what you're doing. | |
867 */ | |
12857
e5f780a6137b
[gaim-migrate @ 15208]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12645
diff
changeset
|
868 void gaim_accounts_restore_current_statuses(void); |
11348 | 869 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
870 /*@}*/ |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
871 |
7122
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
872 |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
873 /**************************************************************************/ |
7122
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
874 /** @name UI Registration Functions */ |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
875 /**************************************************************************/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
876 /*@{*/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
877 /** |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
878 * Sets the UI operations structure to be used for accounts. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
879 * |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
880 * @param ops The UI operations structure. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
881 */ |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
882 void gaim_accounts_set_ui_ops(GaimAccountUiOps *ops); |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
883 |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
884 /** |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
885 * Returns the UI operations structure used for accounts. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
886 * |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
887 * @return The UI operations structure in use. |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
888 */ |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
889 GaimAccountUiOps *gaim_accounts_get_ui_ops(void); |
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
890 |
7122
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
891 /*@}*/ |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
892 |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
893 |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
894 /**************************************************************************/ |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
895 /** @name Accounts Subsystem */ |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
896 /**************************************************************************/ |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
897 /*@{*/ |
b90c94620d1c
[gaim-migrate @ 7689]
Christian Hammond <chipx86@chipx86.com>
parents:
7067
diff
changeset
|
898 |
7015
dece74f05509
[gaim-migrate @ 7578]
Christian Hammond <chipx86@chipx86.com>
parents:
6720
diff
changeset
|
899 /** |
6485
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
900 * Returns the accounts subsystem handle. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
901 * |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
902 * @return The accounts subsystem handle. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
903 */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
904 void *gaim_accounts_get_handle(void); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
905 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
906 /** |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
907 * Initializes the accounts subsystem. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
908 */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
909 void gaim_accounts_init(void); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
910 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
911 /** |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
912 * Uninitializes the accounts subsystem. |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
913 */ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
914 void gaim_accounts_uninit(void); |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
915 |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
916 /*@}*/ |
70d5122bc3ff
[gaim-migrate @ 6999]
Christian Hammond <chipx86@chipx86.com>
parents:
6368
diff
changeset
|
917 |
5944
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
918 #ifdef __cplusplus |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
919 } |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
920 #endif |
158196b2db19
[gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents:
5943
diff
changeset
|
921 |
9713 | 922 #endif /* _GAIM_ACCOUNT_H_ */ |