| 98 { |
98 { |
| 99 GAIM_STATUS_UNSET = 0, |
99 GAIM_STATUS_UNSET = 0, |
| 100 GAIM_STATUS_OFFLINE, |
100 GAIM_STATUS_OFFLINE, |
| 101 GAIM_STATUS_AVAILABLE, |
101 GAIM_STATUS_AVAILABLE, |
| 102 GAIM_STATUS_UNAVAILABLE, |
102 GAIM_STATUS_UNAVAILABLE, |
| 103 GAIM_STATUS_HIDDEN, |
103 GAIM_STATUS_INVISIBLE, |
| 104 GAIM_STATUS_AWAY, |
104 GAIM_STATUS_AWAY, |
| 105 GAIM_STATUS_EXTENDED_AWAY, |
105 GAIM_STATUS_EXTENDED_AWAY, |
| |
106 GAIM_STATUS_MOBILE, |
| 106 GAIM_STATUS_NUM_PRIMITIVES |
107 GAIM_STATUS_NUM_PRIMITIVES |
| 107 |
108 |
| 108 } GaimStatusPrimitive; |
109 } GaimStatusPrimitive; |
| 109 |
110 |
| 110 #include "account.h" |
111 #include "account.h" |
| 111 #include "blist.h" |
112 #include "blist.h" |
| 112 #include "conversation.h" |
113 #include "conversation.h" |
| 113 #include "value.h" |
114 #include "value.h" |
| 114 |
115 |
| 115 /**************************************************************************/ |
116 /**************************************************************************/ |
| 116 /** @name GaimStatusPrimtive API */ |
117 /** @name GaimStatusPrimitive API */ |
| 117 /**************************************************************************/ |
118 /**************************************************************************/ |
| 118 /*@{*/ |
119 /*@{*/ |
| 119 |
120 |
| 120 /** |
121 /** |
| 121 * Lookup the id of a primitive status type based on the type. This |
122 * Lookup the id of a primitive status type based on the type. This |
| 157 |
158 |
| 158 /** |
159 /** |
| 159 * Creates a new status type. |
160 * Creates a new status type. |
| 160 * |
161 * |
| 161 * @param primitive The primitive status type. |
162 * @param primitive The primitive status type. |
| 162 * @param id The ID of the status type. |
163 * @param id The ID of the status type, or @c NULL to use the id of |
| 163 * @param name The name presented to the user. |
164 * the primitive status type. |
| |
165 * @param name The name presented to the user, or @c NULL to use the |
| |
166 * name of the primitive status type. |
| 164 * @param saveable TRUE if the information set for this status by the |
167 * @param saveable TRUE if the information set for this status by the |
| 165 * user can be saved for future sessions. |
168 * user can be saved for future sessions. |
| 166 * @param user_settable TRUE if this is a status the user can manually set. |
169 * @param user_settable TRUE if this is a status the user can manually set. |
| 167 * @param independent TRUE if this is an independent (non-exclusive) |
170 * @param independent TRUE if this is an independent (non-exclusive) |
| 168 * status type. |
171 * status type. |
| 178 /** |
181 /** |
| 179 * Creates a new status type with some default values (not |
182 * Creates a new status type with some default values (not |
| 180 * savable and not independent). |
183 * savable and not independent). |
| 181 * |
184 * |
| 182 * @param primitive The primitive status type. |
185 * @param primitive The primitive status type. |
| 183 * @param id The ID of the status type. |
186 * @param id The ID of the status type, or @c NULL to use the id of |
| 184 * @param name The name presented to the user. |
187 * the primitive status type. |
| |
188 * @param name The name presented to the user, or @c NULL to use the |
| |
189 * name of the primitive status type. |
| 185 * @param user_settable TRUE if this is a status the user can manually set. |
190 * @param user_settable TRUE if this is a status the user can manually set. |
| 186 * |
191 * |
| 187 * @return A new status type. |
192 * @return A new status type. |
| 188 */ |
193 */ |
| 189 GaimStatusType *gaim_status_type_new(GaimStatusPrimitive primitive, |
194 GaimStatusType *gaim_status_type_new(GaimStatusPrimitive primitive, |
| 192 |
197 |
| 193 /** |
198 /** |
| 194 * Creates a new status type with attributes. |
199 * Creates a new status type with attributes. |
| 195 * |
200 * |
| 196 * @param primitive The primitive status type. |
201 * @param primitive The primitive status type. |
| 197 * @param id The ID of the status type. |
202 * @param id The ID of the status type, or @c NULL to use the id of |
| 198 * @param name The name presented to the user. |
203 * the primitive status type. |
| |
204 * @param name The name presented to the user, or @c NULL to use the |
| |
205 * name of the primitive status type. |
| 199 * @param saveable TRUE if the information set for this status by the |
206 * @param saveable TRUE if the information set for this status by the |
| 200 * user can be saved for future sessions. |
207 * user can be saved for future sessions. |
| 201 * @param user_settable TRUE if this is a status the user can manually set. |
208 * @param user_settable TRUE if this is a status the user can manually set. |
| 202 * @param independent TRUE if this is an independent (non-exclusive) |
209 * @param independent TRUE if this is an independent (non-exclusive) |
| 203 * status type. |
210 * status type. |
| 341 gboolean gaim_status_type_is_exclusive(const GaimStatusType *status_type); |
348 gboolean gaim_status_type_is_exclusive(const GaimStatusType *status_type); |
| 342 |
349 |
| 343 /** |
350 /** |
| 344 * Returns whether or not a status type is available. |
351 * Returns whether or not a status type is available. |
| 345 * |
352 * |
| 346 * Available status types are online and possibly hidden, but not away. |
353 * Available status types are online and possibly invisible, but not away. |
| 347 * |
354 * |
| 348 * @param status_type The status type. |
355 * @param status_type The status type. |
| 349 * |
356 * |
| 350 * @return TRUE if the status is available, or FALSE otherwise. |
357 * @return TRUE if the status is available, or FALSE otherwise. |
| 351 */ |
358 */ |
| 606 gboolean gaim_status_is_exclusive(const GaimStatus *status); |
613 gboolean gaim_status_is_exclusive(const GaimStatus *status); |
| 607 |
614 |
| 608 /** |
615 /** |
| 609 * Returns whether or not a status is available. |
616 * Returns whether or not a status is available. |
| 610 * |
617 * |
| 611 * Available statuses are online and possibly hidden, but not away or idle. |
618 * Available statuses are online and possibly invisible, but not away or idle. |
| 612 * |
619 * |
| 613 * This is a convenience method for |
620 * This is a convenience method for |
| 614 * gaim_status_type_is_available(gaim_status_get_type(status)). |
621 * gaim_status_type_is_available(gaim_status_get_type(status)). |
| 615 * |
622 * |
| 616 * @param status The status. |
623 * @param status The status. |
| 896 GaimStatus *gaim_presence_get_active_status(const GaimPresence *presence); |
903 GaimStatus *gaim_presence_get_active_status(const GaimPresence *presence); |
| 897 |
904 |
| 898 /** |
905 /** |
| 899 * Returns whether or not a presence is available. |
906 * Returns whether or not a presence is available. |
| 900 * |
907 * |
| 901 * Available presences are online and possibly hidden, but not away or idle. |
908 * Available presences are online and possibly invisible, but not away or idle. |
| 902 * |
909 * |
| 903 * @param presence The presence. |
910 * @param presence The presence. |
| 904 * |
911 * |
| 905 * @return TRUE if the presence is available, or FALSE otherwise. |
912 * @return TRUE if the presence is available, or FALSE otherwise. |
| 906 */ |
913 */ |