summaryrefslogtreecommitdiff
path: root/libpurple/status.h
diff options
context:
space:
mode:
authorRichard Laager <rlaager@pidgin.im>2007-06-16 19:44:59 +0000
committerRichard Laager <rlaager@pidgin.im>2007-06-16 19:44:59 +0000
commit24e6fa513ea900b8cb0345e24cbcf062427ddace (patch)
tree0c4341009e67938ffed1e745cf72c3c9fabe1092 /libpurple/status.h
parentfa13c7c25ca479dddb3a58ffb336ea0a082f6402 (diff)
downloadpidgin-24e6fa513ea900b8cb0345e24cbcf062427ddace.tar.gz
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.
Diffstat (limited to 'libpurple/status.h')
-rw-r--r--libpurple/status.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/libpurple/status.h b/libpurple/status.h
index f83c149031..aebb833435 100644
--- a/libpurple/status.h
+++ b/libpurple/status.h
@@ -387,9 +387,9 @@ PurpleStatusAttr *purple_status_type_get_attr(const PurpleStatusType *status_typ
*
* @param status_type The status type.
*
- * @return The list of attributes.
+ * @constreturn The list of attributes.
*/
-const GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
+GList *purple_status_type_get_attrs(const PurpleStatusType *status_type);
/**
* Find the PurpleStatusType with the given id.
@@ -515,10 +515,11 @@ void purple_status_set_active_with_attrs(PurpleStatus *status, gboolean active,
* @param active The active state.
* @param attrs A list of attributes to set on the status. This list is
* composed of key/value pairs, where each key is a valid
- * attribute name for this PurpleStatusType.
+ * attribute name for this PurpleStatusType. The list is
+ * not modified or freed by this function.
*/
void purple_status_set_active_with_attrs_list(PurpleStatus *status, gboolean active,
- const GList *attrs);
+ GList *attrs);
/**
* Sets the boolean value of an attribute in a status with the specified ID.
@@ -768,9 +769,10 @@ void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status);
* Adds a list of statuses to the presence.
*
* @param presence The presence.
- * @param source_list The source list of statuses to add.
+ * @param source_list The source list of statuses to add, which is not
+ * modified or freed by this function.
*/
-void purple_presence_add_list(PurplePresence *presence, const GList *source_list);
+void purple_presence_add_list(PurplePresence *presence, GList *source_list);
/**
* Sets the active state of a status in a presence.
@@ -869,9 +871,9 @@ PurpleBuddy *purple_presence_get_buddy(const PurplePresence *presence);
*
* @param presence The presence.
*
- * @return The statuses.
+ * @constreturn The statuses.
*/
-const GList *purple_presence_get_statuses(const PurplePresence *presence);
+GList *purple_presence_get_statuses(const PurplePresence *presence);
/**
* Returns the status with the specified ID from a presence.