Tue, 23 Jul 2024 00:57:40 -0500
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Testing Done:
Connected to a local ergo and sent some channel messages and privmsgs from both sides and called in the turtles.
Reviewed at https://reviews.imfreedom.org/r/3292/
|
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 | |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
39 | #include <ibis.h> |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
40 | |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
41 | #include "purpleircv3version.h" |
|
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
42 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | G_BEGIN_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | #define PURPLE_IRCV3_TYPE_CONNECTION (purple_ircv3_connection_get_type()) |
|
42474
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
46 | |
|
a9285192c3d3
IRCv3: fix introspection
Gary Kramlich <grim@reaperworld.com>
parents:
42472
diff
changeset
|
47 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
48 | G_DECLARE_DERIVABLE_TYPE(PurpleIRCv3Connection, purple_ircv3_connection, |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
49 | PURPLE_IRCV3, CONNECTION, PurpleConnection) |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
51 | struct _PurpleIRCv3ConnectionClass { |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
52 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
53 | PurpleConnectionClass parent; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
54 | |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
55 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
56 | gpointer reserved[8]; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
57 | }; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
58 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
59 | /** |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
60 | * purple_ircv3_connection_register: (skip) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
61 | * @plugin: The GTypeModule |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
62 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
63 | * Registers the dynamic type using @plugin. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
64 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
65 | * Since: 3.0 |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
66 | */ |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | 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
|
68 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
69 | /** |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
70 | * purple_ircv3_connection_get_client: |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
71 | * @connection: The instance. |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
72 | * |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
73 | * Gets the [class@Ibis.Client] from @connection. |
|
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
|
74 | * |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
75 | * Returns: (transfer none): The client instance if connected, otherwise %NULL. |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
76 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
77 | * Since: 3.0 |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
78 | */ |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
79 | PURPLE_AVAILABLE_IN_3_0 |
|
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
80 | IbisClient *purple_ircv3_connection_get_client(PurpleIRCv3Connection *connection); |
|
42530
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
81 | |
|
55b30ce86f17
IRCv3: Implement basic CTCP support
Gary Kramlich <grim@reaperworld.com>
parents:
42513
diff
changeset
|
82 | /** |
|
42000
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
83 | * purple_ircv3_connection_writef: |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
84 | * @connection: The instance. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
85 | * @format: The format string. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
86 | * @...: The arguments for @format. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
87 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
88 | * 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
|
89 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
90 | * 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
|
91 | * that. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
92 | */ |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
93 | 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
|
94 | |
|
41807
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
95 | /** |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
96 | * 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
|
97 | * @connection: The instance. |
|
42333
a34601ac633c
Add PurpleIRCv3Message represent messages rather than multiple variables
Gary Kramlich <grim@reaperworld.com>
parents:
42275
diff
changeset
|
98 | * @message: The message. |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
99 | * |
|
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
100 | * 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
|
101 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
102 | * Since: 3.0 |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
103 | */ |
|
42472
409148c5c5b7
Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42333
diff
changeset
|
104 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42769
c488d7af2923
Move the IRCv3 protocol plugin to our new Ibis library
Gary Kramlich <grim@reaperworld.com>
parents:
42652
diff
changeset
|
105 | void purple_ircv3_connection_add_status_message(PurpleIRCv3Connection *connection, IbisMessage *message); |
|
42275
7568bf87e388
Add a basic status window to the IRCv3 protocol plugin
Gary Kramlich <grim@reaperworld.com>
parents:
42229
diff
changeset
|
106 | |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
107 | /** |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
108 | * purple_ircv3_connection_is_channel: |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
109 | * @connection: The instance. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
110 | * @id: The id to check. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
111 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
112 | * 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
|
113 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
114 | * 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
|
115 | * 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
|
116 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
117 | * 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
|
118 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
119 | * Since: 3.0 |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
120 | */ |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
121 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
122 | 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
|
123 | |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
124 | /** |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
125 | * 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
|
126 | * @connection: The instance. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
127 | * @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
|
128 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
129 | * 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
|
130 | * 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
|
131 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
132 | * 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
|
133 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
134 | * 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
|
135 | * [class@Purple.ConversationManager]. |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
136 | * |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
137 | * 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
|
138 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
139 | * Since: 3.0 |
|
42494
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
140 | */ |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
141 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
4d6baa511e52
IRCv3: create some helper functions for finding/creating conversations
Gary Kramlich <grim@reaperworld.com>
parents:
42474
diff
changeset
|
142 | 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
|
143 | |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
144 | /** |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
145 | * 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
|
146 | * @connection: The instance. |
|
42815
95bb2ae83de7
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
147 | * @message: The message to get the contact for. |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
148 | * |
|
42815
95bb2ae83de7
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
149 | * Looks for an existing contact from @message belonging to @connection and |
|
95bb2ae83de7
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
150 | * returns it if found. If not a new contact will be created. |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
151 | * |
|
42815
95bb2ae83de7
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
152 | * This will only ever return %NULL if @connection is invalid or @message is |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
153 | * %NULL. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
154 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
155 | * 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
|
156 | * [class@Purple.ContactManager]. |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
157 | * |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
158 | * 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
|
159 | * |
|
42619
3dd7cd0eabf1
Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents:
42568
diff
changeset
|
160 | * Since: 3.0 |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
161 | */ |
|
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
162 | PURPLE_IRCV3_AVAILABLE_IN_ALL |
|
42815
95bb2ae83de7
IRCv3: Use Ibis.Message in PurpleIRCv3.Connection.find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42769
diff
changeset
|
163 | PurpleContact *purple_ircv3_connection_find_or_create_contact(PurpleIRCv3Connection *connection, IbisMessage *message); |
|
42513
482ba61e5123
IRCv3: Add an ircv3_connection_find_or_create_contact
Gary Kramlich <grim@reaperworld.com>
parents:
42494
diff
changeset
|
164 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | G_END_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | #endif /* PURPLE_IRCV3_CONNECTION_H */ |