protocols/ircv3/purpleircv3ctcp.h

Thu, 11 Apr 2024 21:39:52 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 11 Apr 2024 21:39:52 -0500
changeset 42694
c5d992e0ee08
parent 42652
225762d4e206
permissions
-rw-r--r--

Remove the remaining event loop API as it is no longer used

Testing Done:
Called in the world's most fearsome fighting team.

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

42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
55b30ce86f17 IRCv3: Implement basic CTCP support
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: 42544
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: 42544
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: 42544
diff changeset
7 * source distribution.
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42544
diff changeset
8 *
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42544
diff changeset
9 * This library is free software; you can redistribute it and/or modify
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
55b30ce86f17 IRCv3: Implement basic CTCP support
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: 42544
diff changeset
14 * This library is distributed in the hope that it will be useful,
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
55b30ce86f17 IRCv3: Implement basic CTCP support
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: 42544
diff changeset
20 * along with this library; if not, see <https://www.gnu.org/licenses/>.
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
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: 42544
diff changeset
22
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 !defined(PURPLE_IRCV3_COMPILATION)
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 # error "only <libpurple/protocols/ircv3.h> may be included directly"
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #endif
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #ifndef PURPLE_IRCV3_CTCP_H
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #define PURPLE_IRCV3_CTCP_H
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib.h>
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include <glib-object.h>
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 #include <purple.h>
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 #include "purpleircv3connection.h"
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 G_BEGIN_DECLS
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 /**
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * purple_ircv3_ctcp_handle: (skip)
42543
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
42 * @connection: The connection.
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
43 * @conversation: The conversation.
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
44 * @message: The message.
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 *
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 * Check if @message is a CTCP message and handles it accordingly.
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 *
42543
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
48 * Returns: %TRUE if the message was a CTCP message and %FALSE otherwise.
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
49 *
42619
3dd7cd0eabf1 Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42568
diff changeset
50 * Since: 3.0
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 */
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 G_GNUC_INTERNAL
42543
6dcf672547fe IRCv3: Update the signals so that handlers can inhibit the message from being displayed
Gary Kramlich <grim@reaperworld.com>
parents: 42530
diff changeset
53 gboolean purple_ircv3_ctcp_handle(PurpleIRCv3Connection *connection, PurpleConversation *conversation, PurpleMessage *message);
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54
42544
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
55 /**
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
56 * purple_ircv3_ctcp_add_default_handlers: (skip)
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
57 * @connection: The connection.
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
58 *
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
59 * Adds handlers for the CTCP commands that we support directly.
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
60 *
42619
3dd7cd0eabf1 Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42568
diff changeset
61 * Since: 3.0
42544
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
62 */
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
63 G_GNUC_INTERNAL
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
64 void purple_ircv3_ctcp_add_default_handlers(PurpleIRCv3Connection *connection);
95d36c221e21 Implement CTCP ACTION and VERSION
Gary Kramlich <grim@reaperworld.com>
parents: 42543
diff changeset
65
42530
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 G_END_DECLS
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67
55b30ce86f17 IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 #endif /* PURPLE_IRCV3_CTCP_H */

mercurial