diff options
author | Gary Kramlich <grim@reaperworld.com> | 2023-02-20 08:33:48 -0600 |
---|---|---|
committer | Gary Kramlich <grim@reaperworld.com> | 2023-02-20 08:33:48 -0600 |
commit | a0955b17df3c051f2d38929b252917345f30c5f2 (patch) | |
tree | a1bc52aa4c9c593aa471834c8f418054eed307f0 /libpurple | |
parent | 3d9a104a8649ae92e17a07779f82b7facdb7835c (diff) | |
download | pidgin-a0955b17df3c051f2d38929b252917345f30c5f2.tar.gz |
Remove conversation's internal history api as it will be replace by the new history api
Testing Done:
Joined a MUC and verified that that history was still displayed and that sending messages and stuff worked.
Reviewed at https://reviews.imfreedom.org/r/2238/
Diffstat (limited to 'libpurple')
-rw-r--r-- | libpurple/purpleconversation.c | 35 | ||||
-rw-r--r-- | libpurple/purpleconversation.h | 21 |
2 files changed, 0 insertions, 56 deletions
diff --git a/libpurple/purpleconversation.c b/libpurple/purpleconversation.c index 4aecb2f407..9221760859 100644 --- a/libpurple/purpleconversation.c +++ b/libpurple/purpleconversation.c @@ -48,7 +48,6 @@ typedef struct { PurpleConversationUiOps *ui_ops; /* UI-specific operations. */ PurpleConnectionFlags features; /* The supported features */ - GList *message_history; /* Message history, as a GList of PurpleMessages */ } PurpleConversationPrivate; enum { @@ -335,8 +334,6 @@ purple_conversation_finalize(GObject *object) { purple_signal_emit(purple_conversations_get_handle(), "deleting-conversation", conv); - purple_conversation_clear_message_history(conv); - if(ops != NULL && ops->destroy_conversation != NULL) { ops->destroy_conversation(conv); } @@ -592,7 +589,6 @@ void _purple_conversation_write_common(PurpleConversation *conv, PurpleMessage *pmsg) { - PurpleConversationPrivate *priv = NULL; PurpleProtocol *protocol = NULL; PurpleConnection *gc = NULL; PurpleAccount *account; @@ -604,7 +600,6 @@ _purple_conversation_write_common(PurpleConversation *conv, g_return_if_fail(PURPLE_IS_CONVERSATION(conv)); g_return_if_fail(pmsg != NULL); - priv = purple_conversation_get_instance_private(conv); ops = purple_conversation_get_ui_ops(conv); account = purple_conversation_get_account(conv); @@ -691,9 +686,6 @@ _purple_conversation_write_common(PurpleConversation *conv, } } - g_object_ref(pmsg); - priv->message_history = g_list_prepend(priv->message_history, pmsg); - purple_signal_emit(purple_conversations_get_handle(), (PURPLE_IS_IM_CONVERSATION(conv) ? "wrote-im-msg" : "wrote-chat-msg"), conv, pmsg); @@ -842,30 +834,3 @@ purple_conversation_get_extended_menu(PurpleConversation *conv) { return menu; } - -void -purple_conversation_clear_message_history(PurpleConversation *conv) { - PurpleConversationPrivate *priv = NULL; - GList *list; - - g_return_if_fail(PURPLE_IS_CONVERSATION(conv)); - - priv = purple_conversation_get_instance_private(conv); - list = priv->message_history; - g_list_free_full(list, g_object_unref); - priv->message_history = NULL; - - purple_signal_emit(purple_conversations_get_handle(), - "cleared-message-history", conv); -} - -GList * -purple_conversation_get_message_history(PurpleConversation *conv) { - PurpleConversationPrivate *priv = NULL; - - g_return_val_if_fail(PURPLE_IS_CONVERSATION(conv), NULL); - - priv = purple_conversation_get_instance_private(conv); - - return priv->message_history; -} diff --git a/libpurple/purpleconversation.h b/libpurple/purpleconversation.h index 358a776c66..2cfd4a80fe 100644 --- a/libpurple/purpleconversation.h +++ b/libpurple/purpleconversation.h @@ -314,27 +314,6 @@ gboolean purple_conversation_has_focus(PurpleConversation *conv); void purple_conversation_update(PurpleConversation *conv, PurpleConversationUpdateType type); /** - * purple_conversation_get_message_history: - * @conv: The conversation - * - * Retrieve the message history of a conversation. - * - * Returns: (element-type PurpleMessage) (transfer none): - * A GList of PurpleMessage's. You must not modify the - * list or the data within. The list contains the newest message at - * the beginning, and the oldest message at the end. - */ -GList *purple_conversation_get_message_history(PurpleConversation *conv); - -/** - * purple_conversation_clear_message_history: - * @conv: The conversation - * - * Clear the message history of a conversation. - */ -void purple_conversation_clear_message_history(PurpleConversation *conv); - -/** * purple_conversation_send_confirm: * @conv: The conversation. * @message: The message to send. |