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/
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
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:
42543
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:
42543
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:
42543
diff
changeset
|
7 | * source distribution. |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42543
diff
changeset
|
8 | * |
|
31e8c7c92e2f
Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents:
42543
diff
changeset
|
9 | * This library is free software; you can redistribute it and/or modify |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * it under the terms of the GNU General Public License as published by |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * the Free Software Foundation; either version 2 of the License, or |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * (at your option) any later version. |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
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:
42543
diff
changeset
|
14 | * This library is distributed in the hope that it will be useful, |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | * GNU General Public License for more details. |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | * |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
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:
42543
diff
changeset
|
20 | * along with this library; if not, see <https://www.gnu.org/licenses/>. |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
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:
42543
diff
changeset
|
22 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
23 | #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \ |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
24 | !defined(PURPLE_IRCV3_COMPILATION) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
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:
42220
diff
changeset
|
26 | #endif |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | #ifndef PURPLE_IRCV3_CONNECTION_H |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #define PURPLE_IRCV3_CONNECTION_H |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | #include <glib.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <glib-object.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | #include <gplugin.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | #include <gplugin-native.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | #include <purple.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
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 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | G_BEGIN_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | #define PURPLE_IRCV3_TYPE_CONNECTION (purple_ircv3_connection_get_type()) |
|
42474
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
44 | |
|
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
45 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
46 | G_DECLARE_DERIVABLE_TYPE(PurpleIRCv3Connection, purple_ircv3_connection, |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
47 | PURPLE_IRCV3, CONNECTION, PurpleConnection) |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
49 | #include "purpleircv3capabilities.h" |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42275
diff
changeset
|
50 | #include "purpleircv3message.h" |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
51 | |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
52 | struct _PurpleIRCv3ConnectionClass { |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
53 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
54 | PurpleConnectionClass parent; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
55 | |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
56 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
57 | gpointer reserved[8]; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
58 | }; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
59 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
60 | /** |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
61 | * purple_ircv3_connection_register: (skip) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
62 | * @plugin: The GTypeModule |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
63 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
64 | * Registers the dynamic type using @plugin. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
65 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
66 | * Since: 3.0 |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
67 | */ |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | G_GNUC_INTERNAL void purple_ircv3_connection_register(GPluginNativePlugin *plugin); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
70 | /** |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
71 | * purple_ircv3_connection_emit_ctcp_request: |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
72 | * @connection: The instance. |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
73 | * @conversation: The conversation. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
74 | * @message: The message. |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
75 | * @command: The CTCP command. |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
76 | * @parameters: (nullable): The CTCP parameters. |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
77 | * |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
78 | * Emits the [signal@Connection:ctcp-request] signal with the given @command |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
79 | * and @parameters which originated from @message in @conversation. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
80 | * |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
81 | * The message may be modified by a signal handler. For example, the default |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
82 | * handler will output an internationalized string that describes what command |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
83 | * was requested. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
84 | * |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
85 | * Returns: %TRUE if the request was handled and the message should not be |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
86 | * echoed, otherwise %FALSE. |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
87 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
88 | * Since: 3.0 |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
89 | */ |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
90 | G_GNUC_INTERNAL gboolean purple_ircv3_connection_emit_ctcp_request(PurpleIRCv3Connection *connection, PurpleConversation *conversation, PurpleMessage *message, const char *command, const char *parameters); |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
91 | |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
92 | /** |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
93 | * purple_ircv3_connection_emit_ctcp_response: |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
94 | * @connection: The instance. |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
95 | * @conversation: The conversation. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
96 | * @message: The message. |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
97 | * @command: The CTCP command. |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
98 | * @parameters: (nullable): The CTCP parameters. |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
99 | * |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
100 | * Emits the [signal@Connection:ctcp-response] signal with the given @command |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
101 | * and @parameters which originated from @message in @conversation. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
102 | * |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
103 | * The message may be modified by a signal handler. For example, the default |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
104 | * handler will output an internationalized string that describes what the |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
105 | * response was. |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
106 | * |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
107 | * Returns: %TRUE if the request was handled and the message should not be |
|
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
108 | * echoed, otherwise %FALSE. |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
109 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
110 | * Since: 3.0 |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
111 | */ |
|
42543
6dcf672547fe
IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents:
42542
diff
changeset
|
112 | G_GNUC_INTERNAL gboolean purple_ircv3_connection_emit_ctcp_response(PurpleIRCv3Connection *connection, PurpleConversation *conversation, PurpleMessage *message, const char *command, const char *parameters); |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
113 | |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
114 | /** |
|
42000
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
115 | * purple_ircv3_connection_writef: |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
116 | * @connection: The instance. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
117 | * @format: The format string. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
118 | * @...: The arguments for @format. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
119 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
120 | * Similar to C `printf()` but writes the format string out to @connection. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
121 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
122 | * This will add the proper line termination, so you do not need to worry about |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
123 | * that. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
124 | */ |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
125 | void purple_ircv3_connection_writef(PurpleIRCv3Connection *connection, const char *format, ...) G_GNUC_PRINTF(2, 3); |
|
41793
2e6f09066f94
Add connection registration to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
41783
diff
changeset
|
126 | |
|
41807
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
127 | /** |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
128 | * purple_ircv3_connection_get_capabilities: |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
129 | * @connection: The instance. |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
130 | * |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
131 | * Gets the list of capabilities that the server supplied during registration. |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
132 | * |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
133 | * Returns: (transfer none): The list of capabilities that the server supports. |
|
41807
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
134 | */ |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
135 | PurpleIRCv3Capabilities *purple_ircv3_connection_get_capabilities(PurpleIRCv3Connection *connection); |
|
41807
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
136 | |
|
42013
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
137 | /** |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
138 | * purple_ircv3_connection_get_registered: |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
139 | * @connection: The instance. |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
140 | * |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
141 | * Gets whether or not the connection has finished the registration process. |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
142 | * |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
143 | * Returns: %TRUE if registration has been completed otherwise %FALSE. |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
144 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
145 | * Since: 3.0 |
|
42013
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
146 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
147 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42013
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
148 | gboolean purple_ircv3_connection_get_registered(PurpleIRCv3Connection *connection); |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
149 | |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
150 | /** |
|
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
151 | * purple_ircv3_connection_add_status_message: |
|
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
152 | * @connection: The instance. |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42275
diff
changeset
|
153 | * @message: The message. |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
154 | * |
|
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
155 | * Adds a message to the status conversation/window for @connection. |
|
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
156 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
157 | * Since: 3.0 |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
158 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
159 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42275
diff
changeset
|
160 | void purple_ircv3_connection_add_status_message(PurpleIRCv3Connection *connection, PurpleIRCv3Message *message); |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
161 | |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
162 | /** |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
163 | * purple_ircv3_connection_is_channel: |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
164 | * @connection: The instance. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
165 | * @id: The id to check. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
166 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
167 | * Checks if @id is a channel. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
168 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
169 | * Right now this just checks if @id starts with a `#` but in the future this |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
170 | * will be updated to check all channel prefixes that the connection supports. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
171 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
172 | * Returns: %TRUE if @id is a channel otherwise %FALSE. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
173 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
174 | * Since: 3.0 |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
175 | */ |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
176 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
177 | gboolean purple_ircv3_connection_is_channel(PurpleIRCv3Connection *connection, const char *id); |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
178 | |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
179 | /** |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
180 | * purple_ircv3_connection_find_or_create_conversation: |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
181 | * @connection: The instance. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
182 | * @id: The id of the conversation. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
183 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
184 | * Looks for an existing conversation belonging to @connection and returns it |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
185 | * if found. If not found a new conversation will be created. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
186 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
187 | * This will only ever return %NULL if @connection is invalid or @id is %NULL. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
188 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
189 | * Note that ownership of the conversation remains with the default |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
190 | * [class@Purple.ConversationManager]. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
191 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
192 | * Returns: (transfer none) (nullable): The conversation. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
193 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
194 | * Since: 3.0 |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
195 | */ |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
196 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
197 | PurpleConversation *purple_ircv3_connection_find_or_create_conversation(PurpleIRCv3Connection *connection, const char *id); |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
198 | |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
199 | /** |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
200 | * purple_ircv3_connection_find_or_create_contact: |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
201 | * @connection: The instance. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
202 | * @nick: The nickname of the user. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
203 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
204 | * Looks for an existing contact belonging to @connection and returns it if |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
205 | * found. If not a new contact will be created. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
206 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
207 | * This will only ever return %NULL if @connection is invalid or @nick is |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
208 | * %NULL. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
209 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
210 | * Note that the ownership of the contact remains with the default |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
211 | * [class@Purple.ContactManager]. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
212 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
213 | * Returns: (transfer none) (nullable): The contact. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
214 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
215 | * Since: 3.0 |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
216 | */ |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
217 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
218 | PurpleContact *purple_ircv3_connection_find_or_create_contact(PurpleIRCv3Connection *connection, const char *nick); |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
219 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
220 | G_END_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
221 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
222 | #endif /* PURPLE_IRCV3_CONNECTION_H */ |