pidgin/pidgin

071065dec713
Parents f8b477a1b0b6
Children f1ce6abbf4d1
Move the old XMPP protocol plugin to BirbQueuedOutputStream

Testing Done:
Used Turtle Power!

Reviewed at https://reviews.imfreedom.org/r/2930/
--- a/libpurple/protocols/jabber/jabber.c Tue Jan 23 00:45:08 2024 -0600
+++ b/libpurple/protocols/jabber/jabber.c Tue Jan 23 00:55:37 2024 -0600
@@ -30,6 +30,8 @@
#include <gplugin.h>
#include <gplugin-native.h>
+#include <birb.h>
+
#include <purple.h>
#include "auth.h"
@@ -370,10 +372,10 @@
gboolean result;
GError *error = NULL;
- result = purple_queued_output_stream_push_bytes_finish(stream, res, &error);
+ result = birb_queued_output_stream_push_bytes_finish(stream, res, &error);
if (!result) {
- purple_queued_output_stream_clear_queue(stream);
+ birb_queued_output_stream_clear_queue(stream);
if (error->code != G_IO_ERROR_CANCELLED) {
g_prefix_error(&error, "%s", _("Lost connection with server: "));
@@ -395,7 +397,7 @@
jabber_stream_restart_inactivity_timer(js);
output = g_bytes_new(data, len);
- purple_queued_output_stream_push_bytes_async(
+ birb_queued_output_stream_push_bytes_async(
js->output, output, G_PRIORITY_DEFAULT, js->cancellable,
jabber_push_bytes_cb, js);
g_bytes_unref(output);
@@ -602,7 +604,7 @@
js->stream = stream;
js->input = g_object_ref(g_io_stream_get_input_stream(js->stream));
- js->output = purple_queued_output_stream_new(
+ js->output = birb_queued_output_stream_new(
g_io_stream_get_output_stream(js->stream));
if (js->state == JABBER_STREAM_CONNECTING) {
--- a/libpurple/protocols/jabber/jabber.h Tue Jan 23 00:45:08 2024 -0600
+++ b/libpurple/protocols/jabber/jabber.h Tue Jan 23 00:55:37 2024 -0600
@@ -56,6 +56,7 @@
#include <gmodule.h>
#include <gio/gio.h>
#include <libsoup/soup.h>
+#include <birb.h>
#include <purple.h>
@@ -178,7 +179,7 @@
GSocketClient *client;
GIOStream *stream;
GInputStream *input;
- PurpleQueuedOutputStream *output;
+ BirbQueuedOutputStream *output;
char *initial_avatar_hash;
char *avatar_hash;
--- a/libpurple/protocols/jabber/meson.build Tue Jan 23 00:45:08 2024 -0600
+++ b/libpurple/protocols/jabber/meson.build Tue Jan 23 00:55:37 2024 -0600
@@ -93,7 +93,7 @@
c_args : ['-DPURPLE_XMPP_COMPILATION', '-DG_LOG_USE_STRUCTURED', '-DG_LOG_DOMAIN="Purple-XMPP"'],
gnu_symbol_visibility : 'hidden',
link_args : jabber_link_args,
- dependencies : [gstreamer, idn, libxml, libpurple_dep, libsoup, glib, gio, math],
+ dependencies : [birb, gstreamer, idn, libxml, libpurple_dep, libsoup, glib, gio, math],
install : true,
install_dir : PURPLE_PLUGINDIR)
--- a/libpurple/protocols/jabber/tests/meson.build Tue Jan 23 00:45:08 2024 -0600
+++ b/libpurple/protocols/jabber/tests/meson.build Tue Jan 23 00:55:37 2024 -0600
@@ -2,7 +2,7 @@
e = executable(
f'test_jabber_@prog@', f'test_jabber_@prog@.c',
link_with : [jabber_prpl],
- dependencies : [libxml, libpurple_dep, libsoup, glib])
+ dependencies : [birb, libxml, libpurple_dep, libsoup, glib])
jabberenv = environment()
jabberenv.set('XDG_CONFIG_DIR', meson.current_build_dir() / 'config')