Thu, 11 Apr 2024 21:32:59 -0500
Remove PurpleConnectionUiOps as they are no longer used
Testing Done:
Checked in with the turtles.
Reviewed at https://reviews.imfreedom.org/r/3090/
|
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 | * |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
5 | * Purple is the legal property of its developers, whose names are too numerous |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
6 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
7 | * source distribution. |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
8 | * |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * 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
|
11 | * 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
|
12 | * (at your option) any later version. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * 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
|
16 | * 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
|
17 | * GNU General Public License for more details. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | * You should have received a copy of the GNU General Public License |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
20 | * along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | */ |
|
42568
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
22 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
23 | #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \ |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
24 | !defined(PURPLE_IRCV3_COMPILATION) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
25 | # 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
|
26 | #endif |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #ifndef PURPLE_IRCV3_CAPABILITIES_H |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #define PURPLE_IRCV3_CAPABILITIES_H |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib.h> |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <glib-object.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 | #include <gplugin.h> |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | #include <gplugin-native.h> |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | #include <purple.h> |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
39 | #include "purpleircv3version.h" |
|
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
40 | |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | G_BEGIN_DECLS |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
42287
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
43 | /* https://ircv3.net/specs/extensions/capability-negotiation */ |
|
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
44 | #define PURPLE_IRCV3_CAPABILITY_CAP_LS_VERSION "302" |
|
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
45 | |
|
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
46 | /* https://ircv3.net/specs/extensions/sasl-3.2 */ |
|
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
47 | #define PURPLE_IRCV3_CAPABILITY_SASL "sasl" |
|
8fc84ffcdcb2
IRCv3: Use constants for capability names
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
48 | |
|
42294
462317d1382d
IRCv3: add support for the server-time capability
Gary Kramlich <grim@reaperworld.com>
parents:
42287
diff
changeset
|
49 | /* https://ircv3.net/specs/extensions/server-time */ |
|
462317d1382d
IRCv3: add support for the server-time capability
Gary Kramlich <grim@reaperworld.com>
parents:
42287
diff
changeset
|
50 | #define PURPLE_IRCV3_CAPABILITY_SERVER_TIME "server-time" |
|
462317d1382d
IRCv3: add support for the server-time capability
Gary Kramlich <grim@reaperworld.com>
parents:
42287
diff
changeset
|
51 | |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | #define PURPLE_IRCV3_TYPE_CAPABILITIES (purple_ircv3_capabilities_get_type()) |
|
42474
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
53 | |
|
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
54 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | 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
|
56 | PURPLE_IRCV3, CAPABILITIES, GObject) |
|
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 | #include "purpleircv3connection.h" |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42294
diff
changeset
|
59 | #include "purpleircv3message.h" |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
61 | /** |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
62 | * purple_ircv3_capabilities_register: (skip) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
63 | * @plugin: The [class@GPlugin.NativePlugin] instance. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
64 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
65 | * Dynamically registers the PurpleIRCv3Capabilities type. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
66 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
67 | * Since: 3.0 |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42055
diff
changeset
|
68 | */ |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | 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
|
70 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | 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
|
72 | |
|
41954
558106ebf999
Various clean ups to the IRCv3 connection process
Gary Kramlich <grim@reaperworld.com>
parents:
41951
diff
changeset
|
73 | 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
|
74 | |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42294
diff
changeset
|
75 | G_GNUC_INTERNAL gboolean purple_ircv3_capabilities_message_handler(PurpleIRCv3Message *message, GError **error, gpointer data); |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | /** |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | * purple_ircv3_capabilities_get_connection: |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | * @capabilities: The instance. |
|
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 | * 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
|
82 | * |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | * Returns: (transfer none): The connection instance. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
85 | * Since: 3.0 |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
87 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | 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
|
89 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | /** |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | * purple_ircv3_capabilities_request: |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | * @capabilities: The instance. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | * @capability: The capabilities to request. |
|
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 | * 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
|
96 | * `::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
|
97 | * that was passed in here. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
99 | * Since: 3.0 |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
101 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | 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
|
103 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | /** |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | * purple_ircv3_capabilities_lookup: |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | * @capabilities: The instance. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | * @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
|
108 | * @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
|
109 | * capability was advertised or not. |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | * |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | * 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
|
112 | * 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
|
113 | * |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | * 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
|
115 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
116 | * Since: 3.0 |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
118 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
119 | 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
|
120 | |
|
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
|
121 | /** |
|
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
|
122 | * 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
|
123 | * @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
|
124 | * @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
|
125 | * |
|
2f5bbcc91854
IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents:
42006
diff
changeset
|
126 | * 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
|
127 | * 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
|
128 | * |
|
2f5bbcc91854
IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents:
42006
diff
changeset
|
129 | * 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
|
130 | * [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
|
131 | * |
|
2f5bbcc91854
IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents:
42006
diff
changeset
|
132 | * 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
|
133 | * 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
|
134 | * |
|
2f5bbcc91854
IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents:
42006
diff
changeset
|
135 | * 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
|
136 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
137 | * Since: 3.0 |
|
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
|
138 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
139 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
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
|
140 | 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
|
141 | |
|
2f5bbcc91854
IRCv3: Negotiate the message-tags capability and make sure our regex matches the BNF
Gary Kramlich <grim@reaperworld.com>
parents:
42006
diff
changeset
|
142 | /** |
|
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
|
143 | * 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
|
144 | * @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
|
145 | * |
|
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
|
146 | * 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
|
147 | * 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
|
148 | * 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
|
149 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
150 | * Since: 3.0 |
|
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
|
151 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
152 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
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
|
153 | 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
|
154 | |
|
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
|
155 | /** |
|
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
|
156 | * 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
|
157 | * @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
|
158 | * |
|
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
|
159 | * 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
|
160 | * 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
|
161 | * |
|
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
|
162 | * 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
|
163 | * 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
|
164 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
165 | * Since: 3.0 |
|
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
|
166 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
167 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
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
|
168 | 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
|
169 | |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | G_END_DECLS |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | #endif /* PURPLE_IRCV3_CAPABILITIES_H */ |