pidgin/pidgin

4f2160a2edce
Parents 997ab408c113
Children 9e5a5eb54a57
remove the purple_conversations_ management api

Testing Done:
compiled and built the docs

Reviewed at https://reviews.imfreedom.org/r/842/
--- a/ChangeLog.API Mon Jul 26 04:13:19 2021 -0500
+++ b/ChangeLog.API Mon Jul 26 04:20:08 2021 -0500
@@ -361,6 +361,20 @@
* purple_contact_set_alias
* purple_conv_chat_set_users
* PurpleConversationType
+ * purple_conversations_add. Use purple_conversation_manager_register
+ instead.
+ * purple_conversations_remove. Use
+ purple_conversation_manager_unregister instead.
+ * purple_conversations_get_all. Use purple_conversation_manager_get_all
+ instead.
+ * purple_conversations_find_with_account. Use
+ purple_conversation_manager_find instead.
+ * purple_conversations_find_im_with_account. Use
+ purple_conversation_manager_find_im instead.
+ * purple_conversations_find_chat_with_account. Use
+ purple_conversation_manager_find_chat instead.
+ * purple_conversations_find_chat. Use
+ purple_conversation_manager_find_chat_by_id instead.
* purple_core_ensure_single_instance. Check via GApplication
or whatever is appropriate for your UI.
* purple_core_migrate
--- a/libpurple/conversations.c Mon Jul 26 04:13:19 2021 -0500
+++ b/libpurple/conversations.c Mon Jul 26 04:20:08 2021 -0500
@@ -27,89 +27,6 @@
static PurpleConversationUiOps *default_ops = NULL;
void
-purple_conversations_add(PurpleConversation *conv) {
- PurpleConversationManager *manager = NULL;
-
- g_return_if_fail(conv != NULL);
-
- manager = purple_conversation_manager_get_default();
-
- purple_conversation_manager_register(manager, conv);
-}
-
-void
-purple_conversations_remove(PurpleConversation *conv) {
- PurpleConversationManager *manager = NULL;
-
- g_return_if_fail(conv != NULL);
-
- manager = purple_conversation_manager_get_default();
-
- purple_conversation_manager_unregister(manager, conv);
-}
-
-GList *
-purple_conversations_get_all(void) {
- PurpleConversationManager *manager = NULL;
-
- manager = purple_conversation_manager_get_default();
-
- return purple_conversation_manager_get_all(manager);
-}
-
-PurpleConversation *
-purple_conversations_find_with_account(const char *name,
- PurpleAccount *account)
-{
- PurpleConversationManager *manager = NULL;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- manager = purple_conversation_manager_get_default();
-
- return purple_conversation_manager_find(manager, account, name);
-}
-
-PurpleConversation *
-purple_conversations_find_im_with_account(const gchar *name,
- PurpleAccount *account)
-{
- PurpleConversationManager *manager = NULL;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- manager = purple_conversation_manager_get_default();
-
- return purple_conversation_manager_find_im(manager, account, name);
-}
-
-PurpleConversation *
-purple_conversations_find_chat_with_account(const gchar *name,
- PurpleAccount *account)
-{
- PurpleConversationManager *manager = NULL;
-
- g_return_val_if_fail(name != NULL, NULL);
-
- manager = purple_conversation_manager_get_default();
-
- return purple_conversation_manager_find_chat(manager, account, name);
-}
-
-PurpleConversation *
-purple_conversations_find_chat(PurpleConnection *gc, gint id) {
- PurpleAccount *account = NULL;
- PurpleConversationManager *manager = NULL;
-
- g_return_val_if_fail(PURPLE_IS_CONNECTION(gc), NULL);
-
- account = purple_connection_get_account(gc);
- manager = purple_conversation_manager_get_default();
-
- return purple_conversation_manager_find_chat_by_id(manager, account, id);
-}
-
-void
purple_conversations_set_ui_ops(PurpleConversationUiOps *ops)
{
default_ops = ops;
--- a/libpurple/conversations.h Mon Jul 26 04:13:19 2021 -0500
+++ b/libpurple/conversations.h Mon Jul 26 04:20:08 2021 -0500
@@ -43,85 +43,6 @@
/**************************************************************************/
/**
- * purple_conversations_add:
- * @conv: The conversation.
- *
- * Adds a conversation to the list of conversations.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_register)
-void purple_conversations_add(PurpleConversation *conv);
-
-/**
- * purple_conversations_remove:
- * @conv: The conversation.
- *
- * Removes a conversation from the list of conversations.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_unregister)
-void purple_conversations_remove(PurpleConversation *conv);
-
-/**
- * purple_conversations_get_all:
- *
- * Returns a list of all conversations.
- *
- * This list includes both IMs and chats.
- *
- * Returns: (element-type PurpleConversation) (transfer none): A GList of all conversations.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_get_all)
-GList *purple_conversations_get_all(void);
-
-/**
- * purple_conversations_find_with_account:
- * @name: The name of the conversation.
- * @account: The account associated with the conversation.
- *
- * Finds a conversation of any type with the specified name and Purple account.
- *
- * Returns: (transfer none): The conversation if found, or %NULL otherwise.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_find)
-PurpleConversation *purple_conversations_find_with_account(const char *name,
- PurpleAccount *account);
-
-/**
- * purple_conversations_find_im_with_account:
- * @name: The name of the conversation.
- * @account: The account associated with the conversation.
- *
- * Finds an IM with the specified name and Purple account.
- *
- * Returns: (transfer none): The conversation if found, or %NULL otherwise.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_find_im)
-PurpleConversation *purple_conversations_find_im_with_account(const char *name, PurpleAccount *account);
-
-/**
- * purple_conversations_find_chat_with_account:
- * @name: The name of the conversation.
- * @account: The account associated with the conversation.
- *
- * Finds a chat with the specified name and Purple account.
- *
- * Returns: (transfer none): The conversation if found, or %NULL otherwise.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_find_chat)
-PurpleConversation *purple_conversations_find_chat_with_account(const char *name, PurpleAccount *account);
-
-/**
- * purple_conversations_find_chat:
- * @gc: The purple_connection.
- * @id: The chat ID.
- *
- * Finds a chat with the specified chat ID.
- *
- * Returns: (transfer none): The chat conversation.
- */
-G_DEPRECATED_FOR(purple_conversation_manager_find_chat_by_id)
-PurpleConversation *purple_conversations_find_chat(PurpleConnection *gc, int id);
-
-/**
* purple_conversations_set_ui_ops:
* @ops: The UI conversation operations structure.
*