Mercurial > pidgin
comparison libpurple/status.h @ 32819:2c6510167895 default tip
propagate from branch 'im.pidgin.pidgin.2.x.y' (head 3315c5dfbd0ad16511bdcf865e5b07c02d07df24)
to branch 'im.pidgin.pidgin' (head cbd1eda6bcbf0565ae7766396bb8f6f419cb6a9a)
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sat, 02 Jun 2012 02:30:49 +0000 |
parents | 98520ee78f12 |
children |
comparison
equal
deleted
inserted
replaced
32818:01ff09d4a463 | 32819:2c6510167895 |
---|---|
146 #define PURPLE_TUNE_FULL "tune_full" | 146 #define PURPLE_TUNE_FULL "tune_full" |
147 | 147 |
148 #define PURPLE_MOOD_NAME "mood" | 148 #define PURPLE_MOOD_NAME "mood" |
149 #define PURPLE_MOOD_COMMENT "moodtext" | 149 #define PURPLE_MOOD_COMMENT "moodtext" |
150 | 150 |
151 #ifdef __cplusplus | 151 G_BEGIN_DECLS |
152 extern "C" { | |
153 #endif | |
154 | 152 |
155 /**************************************************************************/ | 153 /**************************************************************************/ |
156 /** @name PurpleStatusPrimitive API */ | 154 /** @name PurpleStatusPrimitive API */ |
157 /**************************************************************************/ | 155 /**************************************************************************/ |
158 /*@{*/ | 156 /*@{*/ |
269 * | 267 * |
270 * @param status_type The status type to destroy. | 268 * @param status_type The status type to destroy. |
271 */ | 269 */ |
272 void purple_status_type_destroy(PurpleStatusType *status_type); | 270 void purple_status_type_destroy(PurpleStatusType *status_type); |
273 | 271 |
274 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
275 /** | |
276 * Sets a status type's primary attribute. | |
277 * | |
278 * The value for the primary attribute is used as the description for | |
279 * the particular status type. An example is an away message. The message | |
280 * would be the primary attribute. | |
281 * | |
282 * @param status_type The status type. | |
283 * @param attr_id The ID of the primary attribute. | |
284 * | |
285 * @deprecated This function isn't used and should be removed in 3.0.0. | |
286 */ | |
287 void purple_status_type_set_primary_attr(PurpleStatusType *status_type, | |
288 const char *attr_id); | |
289 #endif | |
290 | |
291 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
292 /** | |
293 * Adds an attribute to a status type. | |
294 * | |
295 * @param status_type The status type to add the attribute to. | |
296 * @param id The ID of the attribute. | |
297 * @param name The name presented to the user. | |
298 * @param value The value type of this attribute. | |
299 * | |
300 * @deprecated This function isn't needed and should be removed in 3.0.0. | |
301 * Status type attributes should be set when the status type | |
302 * is created, in the call to purple_status_type_new_with_attrs. | |
303 */ | |
304 void purple_status_type_add_attr(PurpleStatusType *status_type, const char *id, | |
305 const char *name, PurpleValue *value); | |
306 #endif | |
307 | |
308 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
309 /** | |
310 * Adds multiple attributes to a status type. | |
311 * | |
312 * @param status_type The status type to add the attribute to. | |
313 * @param id The ID of the first attribute. | |
314 * @param name The description of the first attribute. | |
315 * @param value The value type of the first attribute attribute. | |
316 * @param ... Additional attribute information. | |
317 * | |
318 * @deprecated This function isn't needed and should be removed in 3.0.0. | |
319 * Status type attributes should be set when the status type | |
320 * is created, in the call to purple_status_type_new_with_attrs. | |
321 */ | |
322 void purple_status_type_add_attrs(PurpleStatusType *status_type, const char *id, | |
323 const char *name, PurpleValue *value, ...) G_GNUC_NULL_TERMINATED; | |
324 #endif | |
325 | |
326 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
327 /** | |
328 * Adds multiple attributes to a status type using a va_list. | |
329 * | |
330 * @param status_type The status type to add the attribute to. | |
331 * @param args The va_list of attributes. | |
332 * | |
333 * @deprecated This function isn't needed and should be removed in 3.0.0. | |
334 * Status type attributes should be set when the status type | |
335 * is created, in the call to purple_status_type_new_with_attrs. | |
336 */ | |
337 void purple_status_type_add_attrs_vargs(PurpleStatusType *status_type, | |
338 va_list args); | |
339 #endif | |
340 | |
341 /** | 272 /** |
342 * Returns the primitive type of a status type. | 273 * Returns the primitive type of a status type. |
343 * | 274 * |
344 * @param status_type The status type. | 275 * @param status_type The status type. |
345 * | 276 * |
416 * @param status_type The status type. | 347 * @param status_type The status type. |
417 * | 348 * |
418 * @return TRUE if the status is available, or FALSE otherwise. | 349 * @return TRUE if the status is available, or FALSE otherwise. |
419 */ | 350 */ |
420 gboolean purple_status_type_is_available(const PurpleStatusType *status_type); | 351 gboolean purple_status_type_is_available(const PurpleStatusType *status_type); |
421 | |
422 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
423 /** | |
424 * Returns a status type's primary attribute ID. | |
425 * | |
426 * @param type The status type. | |
427 * | |
428 * @return The primary attribute's ID. | |
429 * | |
430 * @deprecated This function isn't used and should be removed in 3.0.0. | |
431 */ | |
432 const char *purple_status_type_get_primary_attr(const PurpleStatusType *type); | |
433 #endif | |
434 | 352 |
435 /** | 353 /** |
436 * Returns the attribute with the specified ID. | 354 * Returns the attribute with the specified ID. |
437 * | 355 * |
438 * @param status_type The status type containing the attribute. | 356 * @param status_type The status type containing the attribute. |
580 * not modified or freed by this function. | 498 * not modified or freed by this function. |
581 */ | 499 */ |
582 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active, | 500 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active, |
583 GList *attrs); | 501 GList *attrs); |
584 | 502 |
585 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
586 /** | |
587 * Sets the boolean value of an attribute in a status with the specified ID. | |
588 * | |
589 * @param status The status. | |
590 * @param id The attribute ID. | |
591 * @param value The boolean value. | |
592 * | |
593 * @deprecated This function is only used by status.c and should be made | |
594 * static in 3.0.0. | |
595 */ | |
596 void purple_status_set_attr_boolean(PurpleStatus *status, const char *id, | |
597 gboolean value); | |
598 #endif | |
599 | |
600 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
601 /** | |
602 * Sets the integer value of an attribute in a status with the specified ID. | |
603 * | |
604 * @param status The status. | |
605 * @param id The attribute ID. | |
606 * @param value The integer value. | |
607 * | |
608 * @deprecated This function is only used by status.c and should be made | |
609 * static in 3.0.0. | |
610 */ | |
611 void purple_status_set_attr_int(PurpleStatus *status, const char *id, | |
612 int value); | |
613 #endif | |
614 | |
615 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
616 /** | |
617 * Sets the string value of an attribute in a status with the specified ID. | |
618 * | |
619 * @param status The status. | |
620 * @param id The attribute ID. | |
621 * @param value The string value. | |
622 * | |
623 * @deprecated This function is only used by status.c and should be made | |
624 * static in 3.0.0. | |
625 */ | |
626 void purple_status_set_attr_string(PurpleStatus *status, const char *id, | |
627 const char *value); | |
628 #endif | |
629 | |
630 /** | 503 /** |
631 * Returns the status's type. | 504 * Returns the status's type. |
632 * | 505 * |
633 * @param status The status. | 506 * @param status The status. |
634 * | 507 * |
830 * the presence. | 703 * the presence. |
831 * | 704 * |
832 * @param presence The presence to destroy. | 705 * @param presence The presence to destroy. |
833 */ | 706 */ |
834 void purple_presence_destroy(PurplePresence *presence); | 707 void purple_presence_destroy(PurplePresence *presence); |
835 | |
836 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
837 /** | |
838 * Adds a status to a presence. | |
839 * | |
840 * @param presence The presence. | |
841 * @param status The status to add. | |
842 * | |
843 * @deprecated This function is only used by purple_presence_add_list, | |
844 * and both should be removed in 3.0.0. | |
845 */ | |
846 void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status); | |
847 #endif | |
848 | |
849 #if !(defined PURPLE_DISABLE_DEPRECATED) || (defined _PURPLE_STATUS_C_) | |
850 /** | |
851 * Adds a list of statuses to the presence. | |
852 * | |
853 * @param presence The presence. | |
854 * @param source_list The source list of statuses to add, which is not | |
855 * modified or freed by this function. | |
856 * | |
857 * @deprecated This function isn't used and should be removed in 3.0.0. | |
858 */ | |
859 void purple_presence_add_list(PurplePresence *presence, GList *source_list); | |
860 #endif | |
861 | 708 |
862 /** | 709 /** |
863 * Sets the active state of a status in a presence. | 710 * Sets the active state of a status in a presence. |
864 * | 711 * |
865 * Only independent statuses can be set unactive. Normal statuses can only | 712 * Only independent statuses can be set unactive. Normal statuses can only |
1094 */ | 941 */ |
1095 void purple_status_uninit(void); | 942 void purple_status_uninit(void); |
1096 | 943 |
1097 /*@}*/ | 944 /*@}*/ |
1098 | 945 |
1099 #ifdef __cplusplus | 946 G_END_DECLS |
1100 } | |
1101 #endif | |
1102 | 947 |
1103 #endif /* _PURPLE_STATUS_H_ */ | 948 #endif /* _PURPLE_STATUS_H_ */ |
949 |