pidgin/pidgin

88440894952c
Parents bec3fdb35826
Children b9ea4504f1ff
Remove the unused functions from PurpleProtocolClient

Testing Done:
Called in the turtles.

Reviewed at https://reviews.imfreedom.org/r/3083/
--- a/libpurple/purpleprotocolclient.c Thu Apr 11 03:49:22 2024 -0500
+++ b/libpurple/purpleprotocolclient.c Thu Apr 11 03:51:54 2024 -0500
@@ -38,40 +38,6 @@
/******************************************************************************
* Public API
*****************************************************************************/
-const gchar *
-purple_protocol_client_list_emblem(PurpleProtocolClient *client,
- PurpleBuddy *buddy)
-{
- PurpleProtocolClientInterface *iface = NULL;
-
- g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
- g_return_val_if_fail(PURPLE_IS_BUDDY(buddy), NULL);
-
- iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
- if(iface != NULL && iface->list_emblem != NULL) {
- return iface->list_emblem(client, buddy);
- }
-
- return NULL;
-}
-
-GList *
-purple_protocol_client_blist_node_menu(PurpleProtocolClient *client,
- PurpleBlistNode *node)
-{
- PurpleProtocolClientInterface *iface = NULL;
-
- g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
- g_return_val_if_fail(PURPLE_IS_BLIST_NODE(node), NULL);
-
- iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
- if(iface != NULL && iface->blist_node_menu != NULL) {
- return iface->blist_node_menu(client, node);
- }
-
- return NULL;
-}
-
void
purple_protocol_client_buddy_free(PurpleProtocolClient *client,
PurpleBuddy *buddy)
@@ -156,36 +122,3 @@
return FALSE;
}
-
-GHashTable *
-purple_protocol_client_get_account_text_table(PurpleProtocolClient *client,
- PurpleAccount *account)
-{
- PurpleProtocolClientInterface *iface = NULL;
-
- g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), NULL);
-
- iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
- if(iface != NULL && iface->get_account_text_table != NULL) {
- return iface->get_account_text_table(client, account);
- }
-
- return NULL;
-}
-
-gssize
-purple_protocol_client_get_max_message_size(PurpleProtocolClient *client,
- PurpleConversation *conv)
-{
- PurpleProtocolClientInterface *iface = NULL;
-
- g_return_val_if_fail(PURPLE_IS_PROTOCOL_CLIENT(client), 0);
- g_return_val_if_fail(PURPLE_IS_CONVERSATION(conv), 0);
-
- iface = PURPLE_PROTOCOL_CLIENT_GET_IFACE(client);
- if(iface != NULL && iface->get_max_message_size != NULL) {
- return iface->get_max_message_size(client, conv);
- }
-
- return 0;
-}
--- a/libpurple/purpleprotocolclient.h Thu Apr 11 03:49:22 2024 -0500
+++ b/libpurple/purpleprotocolclient.h Thu Apr 11 03:51:54 2024 -0500
@@ -56,10 +56,6 @@
GTypeInterface parent;
/*< public >*/
- const gchar *(*list_emblem)(PurpleProtocolClient *client, PurpleBuddy *buddy);
-
- GList *(*blist_node_menu)(PurpleProtocolClient *client, PurpleBlistNode *node);
-
void (*buddy_free)(PurpleProtocolClient *client, PurpleBuddy *buddy);
void (*convo_closed)(PurpleProtocolClient *client, PurpleConnection *connection, const gchar *who);
@@ -70,10 +66,6 @@
gboolean (*offline_message)(PurpleProtocolClient *client, PurpleBuddy *buddy);
- GHashTable *(*get_account_text_table)(PurpleProtocolClient *client, PurpleAccount *account);
-
- gssize (*get_max_message_size)(PurpleProtocolClient *client, PurpleConversation *conv);
-
/*< private >*/
gpointer reserved[4];
};
@@ -81,36 +73,6 @@
G_BEGIN_DECLS
/**
- * purple_protocol_client_list_emblem:
- * @client: The #PurpleProtocolClient instance.
- * @buddy: The #PurpleBuddy instance.
- *
- * Gets the icon name of the emblem that should be used for @buddy.
- *
- * Returns: The icon name of the emblem or %NULL.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-const gchar *purple_protocol_client_list_emblem(PurpleProtocolClient *client, PurpleBuddy *buddy);
-
-/**
- * purple_protocol_client_blist_node_menu:
- * @client: The #PurpleProtocolClient instance.
- * @node: The #PurpleBlistNode instance.
- *
- * Gets a list of #PurpleActionMenu structs, which represent extra actions to
- * be shown in (for example) the right-click menu for @node.
- *
- * Returns: (transfer full) (element-type PurpleActionMenu): The list of
- * #PurpleActionMenu structs to display for @node.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-GList *purple_protocol_client_blist_node_menu(PurpleProtocolClient *client, PurpleBlistNode *node);
-
-/**
* purple_protocol_client_buddy_free:
* @client: The #PurpleProtocolClient instance.
* @buddy: A #PurpleBuddy instance.
@@ -185,41 +147,6 @@
PURPLE_AVAILABLE_IN_3_0
gboolean purple_protocol_client_offline_message(PurpleProtocolClient *client, PurpleBuddy *buddy);
-/**
- * purple_protocol_client_get_account_text_table:
- * @client: The #PurpleProtocolClient instance.
- * @account: (nullable): A #PurpleAccount instance.
- *
- * Gets the account text table which allows protocols to specify additional
- * strings to be used for various purposes. The idea is to stuff a bunch of
- * strings in this hash table instead of expanding the struct for every
- * addition.
- *
- * Returns: (transfer full): The newly allocated text table.
- *
- * Since: 3.0
- *
- * Deprecated: 3.0: This is a premature optimization. Right now this is only
- * used by GaduGadu for a single item and should be replaced.
- */
-PURPLE_DEPRECATED
-GHashTable *purple_protocol_client_get_account_text_table(PurpleProtocolClient *client, PurpleAccount *account);
-
-/**
- * purple_protocol_client_get_max_message_size:
- * @client: The #PurpleProtocolClient instance.
- * @conv: A #PurpleConversation instance.
- *
- * Gets the maximum number of characters per message for @conv.
- *
- * Returns: The maximum number of characters per message for @conv or -1 for no
- * limit.
- *
- * Since: 3.0
- */
-PURPLE_AVAILABLE_IN_3_0
-gssize purple_protocol_client_get_max_message_size(PurpleProtocolClient *client, PurpleConversation *conv);
-
G_END_DECLS
#endif /* PURPLE_PROTOCOL_CLIENT_H */