comparison libpurple/status.h @ 18118:ab6d2763b8d8

Re-fix the DBus list handling code by killing const GList* / const GSList* everywhere. Now we maintain a list of functions which return a GList or GSList which must not be freed. Ideally at some point this will be replaced with code that looks at the Doxygen comment for the function and honors @constreturn, which I've declared as a macro around @return that prints a @note about not modifying or freeing the returned value.
author Richard Laager <rlaager@wiktel.com>
date Sat, 16 Jun 2007 19:44:59 +0000
parents 08b9f27cf219
children 72906c5ac037
comparison
equal deleted inserted replaced
18117:cd81f8f36788 18118:ab6d2763b8d8
385 /** 385 /**
386 * Returns a list of all attributes in a status type. 386 * Returns a list of all attributes in a status type.
387 * 387 *
388 * @param status_type The status type. 388 * @param status_type The status type.
389 * 389 *
390 * @return The list of attributes. 390 * @constreturn The list of attributes.
391 */ 391 */
392 const GList *purple_status_type_get_attrs(const PurpleStatusType *status_type); 392 GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
393 393
394 /** 394 /**
395 * Find the PurpleStatusType with the given id. 395 * Find the PurpleStatusType with the given id.
396 * 396 *
397 * @param status_types A list of status types. Often account->status_types. 397 * @param status_types A list of status types. Often account->status_types.
513 * 513 *
514 * @param status The status. 514 * @param status The status.
515 * @param active The active state. 515 * @param active The active state.
516 * @param attrs A list of attributes to set on the status. This list is 516 * @param attrs A list of attributes to set on the status. This list is
517 * composed of key/value pairs, where each key is a valid 517 * composed of key/value pairs, where each key is a valid
518 * attribute name for this PurpleStatusType. 518 * attribute name for this PurpleStatusType. The list is
519 * not modified or freed by this function.
519 */ 520 */
520 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active, 521 void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active,
521 const GList *attrs); 522 GList *attrs);
522 523
523 /** 524 /**
524 * Sets the boolean value of an attribute in a status with the specified ID. 525 * Sets the boolean value of an attribute in a status with the specified ID.
525 * 526 *
526 * @param status The status. 527 * @param status The status.
766 767
767 /** 768 /**
768 * Adds a list of statuses to the presence. 769 * Adds a list of statuses to the presence.
769 * 770 *
770 * @param presence The presence. 771 * @param presence The presence.
771 * @param source_list The source list of statuses to add. 772 * @param source_list The source list of statuses to add, which is not
772 */ 773 * modified or freed by this function.
773 void purple_presence_add_list(PurplePresence *presence, const GList *source_list); 774 */
775 void purple_presence_add_list(PurplePresence *presence, GList *source_list);
774 776
775 /** 777 /**
776 * Sets the active state of a status in a presence. 778 * Sets the active state of a status in a presence.
777 * 779 *
778 * Only independent statuses can be set unactive. Normal statuses can only 780 * Only independent statuses can be set unactive. Normal statuses can only
867 /** 869 /**
868 * Returns all the statuses in a presence. 870 * Returns all the statuses in a presence.
869 * 871 *
870 * @param presence The presence. 872 * @param presence The presence.
871 * 873 *
872 * @return The statuses. 874 * @constreturn The statuses.
873 */ 875 */
874 const GList *purple_presence_get_statuses(const PurplePresence *presence); 876 GList *purple_presence_get_statuses(const PurplePresence *presence);
875 877
876 /** 878 /**
877 * Returns the status with the specified ID from a presence. 879 * Returns the status with the specified ID from a presence.
878 * 880 *
879 * @param presence The presence. 881 * @param presence The presence.