Mercurial > pidgin
comparison src/savedstatuses.h @ 12056:6dc48f991b8d
[gaim-migrate @ 14351]
Part of sf patch #1354886, from Sadrul Habib Chowdhury
"Allow custom-saved statuses"
I'm still working on the UI parts
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Sat, 12 Nov 2005 22:33:41 +0000 |
parents | a8ec0a291d14 |
children | 3b52d94437f3 |
comparison
equal
deleted
inserted
replaced
12055:0747647faca1 | 12056:6dc48f991b8d |
---|---|
61 */ | 61 */ |
62 GaimSavedStatus *gaim_savedstatus_new(const char *title, | 62 GaimSavedStatus *gaim_savedstatus_new(const char *title, |
63 GaimStatusPrimitive type); | 63 GaimStatusPrimitive type); |
64 | 64 |
65 /** | 65 /** |
66 * Set the title for the given saved status. | |
67 * | |
68 * @param status The saved status. | |
69 * @param title The title of the saved status. | |
70 */ | |
71 void gaim_savedstatus_set_title(GaimSavedStatus *status, | |
72 const char *title); | |
73 | |
74 /** | |
66 * Set the type for the given saved status. | 75 * Set the type for the given saved status. |
67 * | 76 * |
68 * @param status The saved status. | 77 * @param status The saved status. |
69 * @param type The type of saved status. | 78 * @param type The type of saved status. |
70 */ | 79 */ |
78 * @param message The message, or NULL if you want to unset the | 87 * @param message The message, or NULL if you want to unset the |
79 * message for this status. | 88 * message for this status. |
80 */ | 89 */ |
81 void gaim_savedstatus_set_message(GaimSavedStatus *status, | 90 void gaim_savedstatus_set_message(GaimSavedStatus *status, |
82 const char *message); | 91 const char *message); |
92 | |
93 /** | |
94 * Set a substatus for an account in a saved status. | |
95 * | |
96 * @param status The saved status. | |
97 * @param account The account. | |
98 * @param type The status type for the account in the staved | |
99 * status. | |
100 * @param message The message for the account in the substatus. | |
101 */ | |
102 void gaim_savedstatus_set_substatus_for_account(GaimSavedStatus *status, | |
103 const GaimAccount *account, | |
104 const GaimStatusType *type, | |
105 const char *message); | |
106 | |
107 /** | |
108 * Unset a substatus for an account in a saved status. This clears | |
109 * the previosly set substatus for the GaimSavedStatus. If this | |
110 * saved status is activated then this account will use the default | |
111 * status type and message. | |
112 * | |
113 * @param status The saved status. | |
114 * @param account The account. | |
115 */ | |
116 void gaim_savedstatus_unset_substatus_for_account(GaimSavedStatus *saved_status, | |
117 const GaimAccount *account); | |
83 | 118 |
84 /** | 119 /** |
85 * Delete a saved status. This removes the saved status from the list | 120 * Delete a saved status. This removes the saved status from the list |
86 * of saved statuses, and writes the revised list to status.xml. | 121 * of saved statuses, and writes the revised list to status.xml. |
87 * | 122 * |
136 * @return The title. | 171 * @return The title. |
137 */ | 172 */ |
138 const char *gaim_savedstatus_get_title(const GaimSavedStatus *saved_status); | 173 const char *gaim_savedstatus_get_title(const GaimSavedStatus *saved_status); |
139 | 174 |
140 /** | 175 /** |
141 * Return the name of a given saved status. | 176 * Return the type of a given saved status. |
142 * | 177 * |
143 * @param saved_status The saved status. | 178 * @param saved_status The saved status. |
144 * | 179 * |
145 * @return The name. | 180 * @return The name. |
146 */ | 181 */ |
147 GaimStatusPrimitive gaim_savedstatus_get_type(const GaimSavedStatus *saved_status); | 182 GaimStatusPrimitive gaim_savedstatus_get_type(const GaimSavedStatus *saved_status); |
148 | 183 |
149 /** | 184 /** |
150 * Return the name of a given saved status. | 185 * Return the default message of a given saved status. |
151 * | 186 * |
152 * @param saved_status The saved status. | 187 * @param saved_status The saved status. |
153 * | 188 * |
154 * @return The name. | 189 * @return The name. |
155 */ | 190 */ |
166 * FALSE otherwise. | 201 * FALSE otherwise. |
167 */ | 202 */ |
168 gboolean gaim_savedstatus_has_substatuses(const GaimSavedStatus *saved_status); | 203 gboolean gaim_savedstatus_has_substatuses(const GaimSavedStatus *saved_status); |
169 | 204 |
170 /** | 205 /** |
206 * Get the substatus for an account in a saved status. | |
207 * | |
208 * @param status The saved status. | |
209 * @param account The account. | |
210 * | |
211 * @return The GaimSavedStatusSub for the account, or NULL if | |
212 * the given account does not have a substatus that | |
213 * differs from the default status of this GaimSavedStatus. | |
214 */ | |
215 GaimSavedStatusSub *gaim_savedstatus_get_substatus_for_account( | |
216 const GaimSavedStatus *saved_status, | |
217 const GaimAccount *account); | |
218 | |
219 /** | |
220 * Get the status type of a given substatus. | |
221 * | |
222 * @param substatus The substatus. | |
223 * | |
224 * @return The status type. | |
225 */ | |
226 const GaimStatusType *gaim_savedstatus_substatus_get_type(const GaimSavedStatusSub *substatus); | |
227 | |
228 /** | |
229 * Get the message of a given substatus. | |
230 * | |
231 * @param substatus The substatus. | |
232 * | |
233 * @return The message of the substatus, or NULL if this substatus does | |
234 * not have a message. | |
235 */ | |
236 const char *gaim_savedstatus_substatus_get_message(const GaimSavedStatusSub *substatus); | |
237 | |
238 /** | |
171 * Sets the statuses for all your accounts to those specified | 239 * Sets the statuses for all your accounts to those specified |
172 * by the given saved_status. This function calls | 240 * by the given saved_status. This function calls |
173 * gaim_savedstatus_activate_for_account() for all your accounts. | 241 * gaim_savedstatus_activate_for_account() for all your accounts. |
174 * | 242 * |
175 * @param saved_status The status you want to set your accounts to. | 243 * @param saved_status The status you want to set your accounts to. |