pidgin.next.minor: bab46e2d: Deprecate some functions that aren't rea...

markdoliner at pidgin.im markdoliner at pidgin.im
Mon Jan 26 04:50:27 EST 2009


-----------------------------------------------------------------
Revision: bab46e2dd9ebff11705234f606d600c9c78011bb
Ancestor: 2357a977fc308a8f3e2f2c7447bb6c0bfe40f698
Author: markdoliner at pidgin.im
Date: 2009-01-26T09:46:09
Branch: im.pidgin.pidgin.next.minor
URL: http://d.pidgin.im/viewmtn/revision/info/bab46e2dd9ebff11705234f606d600c9c78011bb

Modified files:
        libpurple/notify.h libpurple/protocols/null/nullprpl.c
        libpurple/protocols/sametime/sametime.c libpurple/status.h

ChangeLog: 

Deprecate some functions that aren't really needed

-------------- next part --------------
============================================================
--- libpurple/notify.h	475e00c15564676eb60ed036c1d28676e4eb2b26
+++ libpurple/notify.h	c7a15efc6760d0d6526aea97907432e30d44f334
@@ -564,6 +564,11 @@ void purple_notify_user_info_prepend_pai
  *
  * @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);
 
============================================================
--- libpurple/protocols/null/nullprpl.c	94da5f199f98a8d06d4ed6b3421eac5f611c84b0
+++ libpurple/protocols/null/nullprpl.c	f28a1407d00757d62ef03440484aaae8728bea4a
@@ -286,22 +286,22 @@ static GList *nullprpl_status_types(Purp
                     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);
============================================================
--- libpurple/protocols/sametime/sametime.c	a87ec395473547486e7a8c1f8ed3b3515117007d
+++ libpurple/protocols/sametime/sametime.c	1f2d235bd8926a90983f95ac83e467e23bd55c72
@@ -3350,34 +3350,34 @@ static void mw_prpl_tooltip_text(PurpleB
   }
 }
 
+static GList *mw_prpl_status_types(PurpleAccount *acct)
+{
+	GList *types = NULL;
+	PurpleStatusType *type;
 
-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(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_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(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);
+	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);
 
-  return types;
+	type = purple_status_type_new_full(PURPLE_STATUS_OFFLINE,
+			MW_STATE_OFFLINE, NULL, TRUE, TRUE, FALSE);
+	types = g_list_append(types, type);
+
+	return types;
 }
 
 
============================================================
--- libpurple/status.h	476cf20741bc5c15828b494d5e76e77db6a39572
+++ libpurple/status.h	fc1a06b17a40bf3375a777efa6fc2f9d1e8e8204
@@ -261,6 +261,8 @@ void purple_status_type_destroy(PurpleSt
  *
  * @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 @@ void purple_status_type_set_primary_attr
  * @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 @@ void purple_status_type_add_attr(PurpleS
  * @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 @@ void purple_status_type_add_attrs(Purple
  *
  * @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 @@ gboolean purple_status_type_is_available
  * @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 @@ void purple_status_set_active_with_attrs
  * @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 @@ void purple_status_set_attr_boolean(Purp
  * @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 @@ void purple_status_set_attr_int(PurpleSt
  * @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 @@ void purple_presence_destroy(PurplePrese
  *
  * @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 @@ void purple_presence_add_status(PurplePr
  * @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);
 


More information about the Commits mailing list