libpurple/protocols/ircv3/purpleircv3capabilities.h

Sat, 01 Jul 2023 02:01:14 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Sat, 01 Jul 2023 02:01:14 -0500
changeset 42229
605f8cba9704
parent 42055
2f5bbcc91854
child 42287
8fc84ffcdcb2
permissions
-rw-r--r--

Add gobject-introspection for ircv3

This includes a pkgconfig file and installs the header files as well as
purpleircv3.h to ${prefix}/include/purple-3/libpurple/protocols/ircv3.

This does not yet include the documentation as I assume that's going to touch
a bunch of files.

Testing Done:
Compiled against gplugin 0.41.0 locally without issue. Also installed to a local prefix and verified everything looked okie dokie.

Reviewed at https://reviews.imfreedom.org/r/2484/

41951
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * This program is free software; you can redistribute it and/or modify
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * it under the terms of the GNU General Public License as published by
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * the Free Software Foundation; either version 2 of the License, or
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * (at your option) any later version.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This program is distributed in the hope that it will be useful,
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * GNU General Public License for more details.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * along with this program; if not, see <https://www.gnu.org/licenses/>.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 */
42229
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
18 #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
19 !defined(PURPLE_IRCV3_COMPILATION)
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
20 # error "only <libpurple/protocols/ircv3.h> may be included directly"
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
21 #endif
41951
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #ifndef PURPLE_IRCV3_CAPABILITIES_H
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #define PURPLE_IRCV3_CAPABILITIES_H
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #include <glib.h>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27 #include <glib-object.h>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #include <gplugin.h>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 #include <gplugin-native.h>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include <purple.h>
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 G_BEGIN_DECLS
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #define PURPLE_IRCV3_TYPE_CAPABILITIES (purple_ircv3_capabilities_get_type())
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 G_DECLARE_FINAL_TYPE(PurpleIRCv3Capabilities, purple_ircv3_capabilities,
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 PURPLE_IRCV3, CAPABILITIES, GObject)
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 #include "purpleircv3connection.h"
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41
42229
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
42 /**
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
43 * purple_ircv3_capabilities_register: (skip)
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
44 * @plugin: The [class@GPlugin.NativePlugin] instance.
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
45 *
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
46 * Dynamically registers the PurpleIRCv3Capabilities type.
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
47 *
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
48 * Since: 3.0.0
605f8cba9704 Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents: 42055
diff changeset
49 */
41951
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 G_GNUC_INTERNAL void purple_ircv3_capabilities_register(GPluginNativePlugin *plugin);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 G_GNUC_INTERNAL PurpleIRCv3Capabilities *purple_ircv3_capabilities_new(PurpleIRCv3Connection *connection);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53
41954
558106ebf999 Various clean ups to the IRCv3 connection process
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
54 G_GNUC_INTERNAL void purple_ircv3_capabilities_start(PurpleIRCv3Capabilities *capabilities);
558106ebf999 Various clean ups to the IRCv3 connection process
Gary Kramlich <grim@reaperworld.com>
parents: 41951
diff changeset
55
41951
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 G_GNUC_INTERNAL gboolean purple_ircv3_capabilities_message_handler(GHashTable *tags, const char *source, const char *command, guint n_params, GStrv params, GError **error, gpointer data);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 /**
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * purple_ircv3_capabilities_get_connection:
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 * @capabilities: The instance.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62 * Gets the PurpleIRCv3Connection object that @capabilities was created with.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * Returns: (transfer none): The connection instance.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * Since: 3.0.0
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 */
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 PurpleIRCv3Connection *purple_ircv3_capabilities_get_connection(PurpleIRCv3Capabilities *capabilities);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 /**
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * purple_ircv3_capabilities_request:
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 * @capabilities: The instance.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 * @capability: The capabilities to request.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 * This method will send `CAP REQ @capability` to the server. Listen to the
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * `::ack` and `::nak` signals which will contain the contents of @capability
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * that was passed in here.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * Since: 3.0.0
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 */
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 void purple_ircv3_capabilities_request(PurpleIRCv3Capabilities *capabilities, const char *capability);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 /**
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84 * purple_ircv3_capabilities_lookup:
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 * @capabilities: The instance.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
86 * @name: The name of the capability to look for.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
87 * @found: (out) (nullable): A return address for a boolean on whether the
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
88 * capability was advertised or not.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
89 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
90 * Gets the value that the @name capability provided if it was advertised. To
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
91 * determine if the capability was advertised use the @found parameter.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
92 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
93 * Returns: The value of the capability named @name.
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
94 *
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
95 * Since: 3.0.0
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
96 */
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
97 const char *purple_ircv3_capabilities_lookup(PurpleIRCv3Capabilities *capabilities, const char *name, gboolean *found);
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
98
42006
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
99 /**
42055
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
100 * purple_ircv3_capabilities_lookup_and_request:
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
101 * @capabilities: The instance.
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
102 * @name: The name of the capability to look for.
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
103 *
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
104 * A helper function to call [method@PurpleIRCv3.Capabilities.Lookup] and if
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
105 * found, call [method@PurpleIRCv3.Capabilities.Request].
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
106 *
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
107 * This method ignores the advertised value, so to get that you'll need to call
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
108 * [method@PurpleIRCv3.Capabilities.Lookup] yourself.
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
109 *
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
110 * Also if you need to do something when the server ACK's or NAK's your
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
111 * request, you're probably better off just using the methods yourself.
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
112 *
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
113 * Returns: %TRUE if @name was found and requested, %FALSE otherwise.
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
114 *
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
115 * Since: 3.0.0
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
116 */
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
117 gboolean purple_ircv3_capabilities_lookup_and_request(PurpleIRCv3Capabilities *capabilities, const char *name);
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
118
2f5bbcc91854 IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents: 42006
diff changeset
119 /**
42006
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
120 * purple_ircv3_capabilties_add_wait:
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
121 * @capabilities: The instance.
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
122 *
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
123 * Adds a wait counter to @capabilities. This counter is used to delay the
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
124 * call of `CAP END` until all capability negotiation has completed. This is
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
125 * necessary for SASL and may be necessary for other capabilities as well.
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
126 *
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
127 * Since: 3.0.0
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
128 */
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
129 void purple_ircv3_capabilities_add_wait(PurpleIRCv3Capabilities *capabilities);
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
130
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
131 /**
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
132 * purple_ircv3_capabilties_remove_wait:
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
133 * @capabilities: The instance.
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
134 *
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
135 * Removes a wait counter from @capabilities. Only when this counter reaches 0,
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
136 * will `CAP END` be called and registration completed.
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
137 *
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
138 * This is necessary for SASL and may be necessary for other capabilities as
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
139 * well.
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
140 *
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
141 * Since: 3.0.0
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
142 */
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
143 void purple_ircv3_capabilities_remove_wait(PurpleIRCv3Capabilities *capabilities);
d3c594113fe1 Add an atomic reference counters to the IRCv3 capabilities to track when we're done with negotiation
Gary Kramlich <grim@reaperworld.com>
parents: 41954
diff changeset
144
41951
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
145 G_END_DECLS
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
146
00c472cd0fff Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
147 #endif /* PURPLE_IRCV3_CAPABILITIES_H */

mercurial