libpurple/protocols/ircv3/purpleircv3capabilities.h

changeset 42055
2f5bbcc91854
parent 42006
d3c594113fe1
child 42229
605f8cba9704
--- a/libpurple/protocols/ircv3/purpleircv3capabilities.h	Fri Feb 10 03:03:39 2023 -0600
+++ b/libpurple/protocols/ircv3/purpleircv3capabilities.h	Thu Feb 16 08:13:28 2023 -0600
@@ -85,6 +85,26 @@
 const char *purple_ircv3_capabilities_lookup(PurpleIRCv3Capabilities *capabilities, const char *name, gboolean *found);
 
 /**
+ * purple_ircv3_capabilities_lookup_and_request:
+ * @capabilities: The instance.
+ * @name: The name of the capability to look for.
+ *
+ * A helper function to call [method@PurpleIRCv3.Capabilities.Lookup] and if
+ * found, call [method@PurpleIRCv3.Capabilities.Request].
+ *
+ * This method ignores the advertised value, so to get that you'll need to call
+ * [method@PurpleIRCv3.Capabilities.Lookup] yourself.
+ *
+ * Also if you need to do something when the server ACK's or NAK's your
+ * request, you're probably better off just using the methods yourself.
+ *
+ * Returns: %TRUE if @name was found and requested, %FALSE otherwise.
+ *
+ * Since: 3.0.0
+ */
+gboolean purple_ircv3_capabilities_lookup_and_request(PurpleIRCv3Capabilities *capabilities, const char *name);
+
+/**
  * purple_ircv3_capabilties_add_wait:
  * @capabilities: The instance.
  *

mercurial