pidgin/pidgin

Make purple_ircv3_connection_writef public

18 months ago, Gary Kramlich
0b26ebc842db
Parents 91af085cf35b
Children 63635ba9f117
Make purple_ircv3_connection_writef public

This will eventually be used by the Twitch protocol plugin and anything else
that may be using IRCv3 under the hood.

Testing Done:
Connected and ircv3 account and made sure it connected properly.

Reviewed at https://reviews.imfreedom.org/r/2171/
--- a/libpurple/protocols/ircv3/purpleircv3connection.c Tue Jan 03 01:22:53 2023 -0600
+++ b/libpurple/protocols/ircv3/purpleircv3connection.c Tue Jan 03 02:05:24 2023 -0600
@@ -495,7 +495,7 @@
}
/******************************************************************************
- * GObject Implementation
+ * Internal API
*****************************************************************************/
void
purple_ircv3_connection_register(GPluginNativePlugin *plugin) {
@@ -509,6 +509,9 @@
return connection->cancellable;
}
+/******************************************************************************
+ * Public API
+ *****************************************************************************/
void
purple_ircv3_connection_writef(PurpleIRCv3Connection *connection,
const char *format, ...)
--- a/libpurple/protocols/ircv3/purpleircv3connection.h Tue Jan 03 01:22:53 2023 -0600
+++ b/libpurple/protocols/ircv3/purpleircv3connection.h Tue Jan 03 02:05:24 2023 -0600
@@ -39,7 +39,18 @@
G_GNUC_INTERNAL GCancellable *purple_ircv3_connection_get_cancellable(PurpleIRCv3Connection *connection);
-G_GNUC_INTERNAL void purple_ircv3_connection_writef(PurpleIRCv3Connection *connection, const char *format, ...) G_GNUC_PRINTF(2, 3);
+/**
+ * purple_ircv3_connection_writef:
+ * @connection: The instance.
+ * @format: The format string.
+ * @...: The arguments for @format.
+ *
+ * Similar to C `printf()` but writes the format string out to @connection.
+ *
+ * This will add the proper line termination, so you do not need to worry about
+ * that.
+ */
+void purple_ircv3_connection_writef(PurpleIRCv3Connection *connection, const char *format, ...) G_GNUC_PRINTF(2, 3);
/**
* purple_ircv3_connection_get_capabilities: