Sat, 01 Jul 2023 02:01:14 -0500
Add gobject-introspection for ircv3
This includes a pkgconfig file and installs the header files as well as
purpleircv3.h to ${prefix}/include/purple-3/libpurple/protocols/ircv3.
This does not yet include the documentation as I assume that's going to touch
a bunch of files.
Testing Done:
Compiled against gplugin 0.41.0 locally without issue. Also installed to a local prefix and verified everything looked okie dokie.
Reviewed at https://reviews.imfreedom.org/r/2484/
|
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 | * |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * 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
|
7 | * 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
|
8 | * (at your option) any later version. |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * 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
|
12 | * 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
|
13 | * GNU General Public License for more details. |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
18 | #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \ |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
19 | !defined(PURPLE_IRCV3_COMPILATION) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
20 | # error "only <libpurple/protocols/ircv3.h> may be included directly" |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
21 | #endif |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #ifndef PURPLE_IRCV3_CONNECTION_H |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | #define PURPLE_IRCV3_CONNECTION_H |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | #include <glib.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include <glib-object.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | #include <gplugin.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include <gplugin-native.h> |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | #include <purple.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 | G_BEGIN_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | #define PURPLE_IRCV3_TYPE_CONNECTION (purple_ircv3_connection_get_type()) |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
37 | G_DECLARE_DERIVABLE_TYPE(PurpleIRCv3Connection, purple_ircv3_connection, |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
38 | PURPLE_IRCV3, CONNECTION, PurpleConnection) |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
40 | #include "purpleircv3capabilities.h" |
|
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
41 | |
|
42030
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
42 | struct _PurpleIRCv3ConnectionClass { |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
43 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
44 | PurpleConnectionClass parent; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
45 | |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
46 | /*< private >*/ |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
47 | gpointer reserved[8]; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
48 | }; |
|
7af8ab97086d
Make PurpleIRCv3Connection Derivable
Gary Kramlich <grim@reaperworld.com>
parents:
42023
diff
changeset
|
49 | |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
50 | /** |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
51 | * purple_ircv3_connection_register: (skip) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
52 | * @plugin: The GTypeModule |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
53 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
54 | * Registers the dynamic type using @plugin. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
55 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
56 | * Since: 3.0.0 |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
57 | */ |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | 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
|
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_get_cancellable: (skip) |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
62 | * @connection: The instance. |
|
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 | * This is a private method that is not exposed externally. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
65 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
66 | * Gets the cancellable for @connection. |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
67 | * |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
68 | * Since: 3.0.0 |
|
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
69 | */ |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | G_GNUC_INTERNAL GCancellable *purple_ircv3_connection_get_cancellable(PurpleIRCv3Connection *connection); |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | |
|
42000
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
72 | /** |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
73 | * purple_ircv3_connection_writef: |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
74 | * @connection: The instance. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
75 | * @format: The format string. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
76 | * @...: The arguments for @format. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
77 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
78 | * 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
|
79 | * |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
80 | * 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
|
81 | * that. |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
82 | */ |
|
0b26ebc842db
Make purple_ircv3_connection_writef public
Gary Kramlich <grim@reaperworld.com>
parents:
41998
diff
changeset
|
83 | 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
|
84 | |
|
41807
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
85 | /** |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
86 | * purple_ircv3_connection_get_capabilities: |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
87 | * @connection: The instance. |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
88 | * |
|
66d473190e94
Start adding capability support to the IRCv3 protocol
Gary Kramlich <grim@reaperworld.com>
parents:
41805
diff
changeset
|
89 | * 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
|
90 | * |
|
42229
605f8cba9704
Add gobject-introspection for ircv3
Gary Kramlich <grim@reaperworld.com>
parents:
42220
diff
changeset
|
91 | * 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
|
92 | */ |
|
41951
00c472cd0fff
Create PurpleIRCv3Capabilities for managing capabilities for each connection
Gary Kramlich <grim@reaperworld.com>
parents:
41870
diff
changeset
|
93 | 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
|
94 | |
|
42013
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
95 | /** |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
96 | * purple_ircv3_connection_get_registered: |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
97 | * @connection: The instance. |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
98 | * |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
99 | * 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
|
100 | * |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
101 | * 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
|
102 | * |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
103 | * Since: 3.0.0 |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
104 | */ |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
105 | gboolean purple_ircv3_connection_get_registered(PurpleIRCv3Connection *connection); |
|
5634642aca06
Add a registered property to PurpleIRCv3Connection
Gary Kramlich <grim@reaperworld.com>
parents:
42000
diff
changeset
|
106 | |
|
41783
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | G_END_DECLS |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | |
|
5ea6c18ef7a8
Add the ability to connect to IRCv3
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | #endif /* PURPLE_IRCV3_CONNECTION_H */ |