Mercurial > pidgin.yaz
changeset 25417:2d4f0dd04334
Deprecate some functions that aren't really needed
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 26 Jan 2009 09:46:09 +0000 |
parents | 6e1967b0f90b |
children | 86abaefccc92 |
files | libpurple/notify.h libpurple/protocols/null/nullprpl.c libpurple/protocols/sametime/sametime.c libpurple/status.h |
diffstat | 4 files changed, 76 insertions(+), 41 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/notify.h Mon Jan 26 09:12:04 2009 +0000 +++ b/libpurple/notify.h Mon Jan 26 09:46:09 2009 +0000 @@ -564,6 +564,11 @@ * * @param user_info The PurpleNotifyUserInfo * @param user_info_entry The PurpleNotifyUserInfoEntry + * + * @deprecated Nothing is using this function and it should be removed + * in 3.0.0. Or, if we decide we want to keep it in 3.0.0 + * then we should make purple_notify_user_info_entry_destroy + * public so that entries can be free'd after they're removed. */ void purple_notify_user_info_remove_entry(PurpleNotifyUserInfo *user_info, PurpleNotifyUserInfoEntry *user_info_entry);
--- a/libpurple/protocols/null/nullprpl.c Mon Jan 26 09:12:04 2009 +0000 +++ b/libpurple/protocols/null/nullprpl.c Mon Jan 26 09:46:09 2009 +0000 @@ -286,22 +286,22 @@ acct->username, NULL_STATUS_ONLINE, NULL_STATUS_AWAY, NULL_STATUS_OFFLINE); - type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, NULL_STATUS_ONLINE, - NULL, TRUE); - purple_status_type_add_attr(type, "message", _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); + type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE, + NULL_STATUS_ONLINE, NULL, TRUE, TRUE, FALSE, + "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); types = g_list_prepend(types, type); - type = purple_status_type_new(PURPLE_STATUS_AWAY, NULL_STATUS_AWAY, - NULL, TRUE); - purple_status_type_add_attr(type, "message", _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); + type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY, + NULL_STATUS_AWAY, NULL, TRUE, TRUE, FALSE, + "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); types = g_list_prepend(types, type); - - type = purple_status_type_new(PURPLE_STATUS_OFFLINE, NULL_STATUS_OFFLINE, - NULL, TRUE); - purple_status_type_add_attr(type, "message", _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); + + type = purple_status_type_new_with_attrs(PURPLE_STATUS_OFFLINE, + NULL_STATUS_OFFLINE, NULL, TRUE, TRUE, FALSE, + "message", _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); types = g_list_prepend(types, type); return g_list_reverse(types);
--- a/libpurple/protocols/sametime/sametime.c Mon Jan 26 09:12:04 2009 +0000 +++ b/libpurple/protocols/sametime/sametime.c Mon Jan 26 09:46:09 2009 +0000 @@ -3350,34 +3350,34 @@ } } - -static GList *mw_prpl_status_types(PurpleAccount *acct) { - GList *types = NULL; - PurpleStatusType *type; - - type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, MW_STATE_ACTIVE, - NULL, TRUE); - purple_status_type_add_attr(type, MW_STATE_MESSAGE, _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); - types = g_list_append(types, type); - - type = purple_status_type_new(PURPLE_STATUS_AWAY, MW_STATE_AWAY, - NULL, TRUE); - purple_status_type_add_attr(type, MW_STATE_MESSAGE, _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); - types = g_list_append(types, type); - - type = purple_status_type_new(PURPLE_STATUS_UNAVAILABLE, MW_STATE_BUSY, - _("Do Not Disturb"), TRUE); - purple_status_type_add_attr(type, MW_STATE_MESSAGE, _("Message"), - purple_value_new(PURPLE_TYPE_STRING)); - types = g_list_append(types, type); - - type = purple_status_type_new(PURPLE_STATUS_OFFLINE, MW_STATE_OFFLINE, - NULL, TRUE); - types = g_list_append(types, type); - - return types; +static GList *mw_prpl_status_types(PurpleAccount *acct) +{ + GList *types = NULL; + PurpleStatusType *type; + + type = purple_status_type_new_with_attrs(PURPLE_STATUS_AVAILABLE, + MW_STATE_ACTIVE, NULL, TRUE, TRUE, FALSE, + MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); + types = g_list_append(types, type); + + type = purple_status_type_new_with_attrs(PURPLE_STATUS_AWAY, + MW_STATE_AWAY, NULL, TRUE, TRUE, FALSE, + MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); + types = g_list_append(types, type); + + type = purple_status_type_new_with_attrs(PURPLE_STATUS_UNAVAILABLE, + MW_STATE_BUSY, _("Do Not Disturb"), TRUE, TRUE, FALSE, + MW_STATE_MESSAGE, _("Message"), purple_value_new(PURPLE_TYPE_STRING), + NULL); + types = g_list_append(types, type); + + type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE, + MW_STATE_OFFLINE, NULL, TRUE, TRUE, FALSE); + types = g_list_append(types, type); + + return types; }
--- a/libpurple/status.h Mon Jan 26 09:12:04 2009 +0000 +++ b/libpurple/status.h Mon Jan 26 09:46:09 2009 +0000 @@ -261,6 +261,8 @@ * * @param status_type The status type. * @param attr_id The ID of the primary attribute. + * + * @deprecated This function isn't used and should be removed in 3.0.0. */ void purple_status_type_set_primary_attr(PurpleStatusType *status_type, const char *attr_id); @@ -272,6 +274,10 @@ * @param id The ID of the attribute. * @param name The name presented to the user. * @param value The value type of this attribute. + * + * @deprecated This function isn't needed and should be removed in 3.0.0. + * Status type attributes should be set when the status type + * is created, in the call to purple_status_type_new_with_attrs. */ void purple_status_type_add_attr(PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value); @@ -284,6 +290,10 @@ * @param name The description of the first attribute. * @param value The value type of the first attribute attribute. * @param ... Additional attribute information. + * + * @deprecated This function isn't needed and should be removed in 3.0.0. + * Status type attributes should be set when the status type + * is created, in the call to purple_status_type_new_with_attrs. */ void purple_status_type_add_attrs(PurpleStatusType *status_type, const char *id, const char *name, PurpleValue *value, ...) G_GNUC_NULL_TERMINATED; @@ -293,6 +303,10 @@ * * @param status_type The status type to add the attribute to. * @param args The va_list of attributes. + * + * @deprecated This function isn't needed and should be removed in 3.0.0. + * Status type attributes should be set when the status type + * is created, in the call to purple_status_type_new_with_attrs. */ void purple_status_type_add_attrs_vargs(PurpleStatusType *status_type, va_list args); @@ -384,6 +398,8 @@ * @param type The status type. * * @return The primary attribute's ID. + * + * @deprecated This function isn't used and should be removed in 3.0.0. */ const char *purple_status_type_get_primary_attr(const PurpleStatusType *type); @@ -543,6 +559,9 @@ * @param status The status. * @param id The attribute ID. * @param value The boolean value. + * + * @deprecated This function is only used by status.c and should be made + * static in 3.0.0. */ void purple_status_set_attr_boolean(PurpleStatus *status, const char *id, gboolean value); @@ -553,6 +572,9 @@ * @param status The status. * @param id The attribute ID. * @param value The integer value. + * + * @deprecated This function is only used by status.c and should be made + * static in 3.0.0. */ void purple_status_set_attr_int(PurpleStatus *status, const char *id, int value); @@ -563,6 +585,9 @@ * @param status The status. * @param id The attribute ID. * @param value The string value. + * + * @deprecated This function is only used by status.c and should be made + * static in 3.0.0. */ void purple_status_set_attr_string(PurpleStatus *status, const char *id, const char *value); @@ -778,6 +803,9 @@ * * @param presence The presence. * @param status The status to add. + * + * @deprecated This function is only used by purple_presence_add_list, + * and both should be removed in 3.0.0. */ void purple_presence_add_status(PurplePresence *presence, PurpleStatus *status); @@ -787,6 +815,8 @@ * @param presence The presence. * @param source_list The source list of statuses to add, which is not * modified or freed by this function. + * + * @deprecated This function isn't used and should be removed in 3.0.0. */ void purple_presence_add_list(PurplePresence *presence, GList *source_list);