Mon, 30 Jun 2025 14:22:13 -0500
Update the flatpak to gnome 48 and to the matching birb version
The birb version was missed here when it was updated.
Testing Done:
Built the flatpak with the instructions in the readme.
Reviewed at https://reviews.imfreedom.org/r/4038/
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
1 | /* |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
2 | * Purple - Internet Messaging Library |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
3 | * Copyright (C) Pidgin Developers <devel@pidgin.im> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
4 | * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
5 | * This program is free software; you can redistribute it and/or modify |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
6 | * it under the terms of the GNU General Public License as published by |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
7 | * the Free Software Foundation; either version 2 of the License, or |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
8 | * (at your option) any later version. |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
9 | * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
10 | * This program is distributed in the hope that it will be useful, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
13 | * GNU General Public License for more details. |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
14 | * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
15 | * You should have received a copy of the GNU General Public License |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
16 | * along with this program; if not, see <https://www.gnu.org/licenses/>. |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
17 | */ |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
18 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
19 | #include <glib.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | #include <glib/gi18n-lib.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | #include <gplugin.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
23 | #include <gplugin-native.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
24 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
25 | #include <purple.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | #include "purplexmppcore.h" |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
29 | #include "purplexmppconnection.h" |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | #include "purplexmppprotocol.h" |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
32 | /****************************************************************************** |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
33 | * Globals |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | *****************************************************************************/ |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | static PurpleProtocol *xmpp_protocol = NULL; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
37 | /****************************************************************************** |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
38 | * GPlugin Exports |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | *****************************************************************************/ |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | static GPluginPluginInfo * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | purple_xmpp_query(G_GNUC_UNUSED GError **error) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | PurplePluginInfoFlags flags = PURPLE_PLUGIN_INFO_FLAGS_INTERNAL | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | PURPLE_PLUGIN_INFO_FLAGS_AUTO_LOAD; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | const gchar * const authors[] = { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
45 | "Pidgin Developers <devel@pidgin.im>", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
46 | NULL |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
47 | }; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
48 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
49 | return purple_plugin_info_new( |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
50 | "id", "prpl-xmpp", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
51 | "name", "XMPP Protocol", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
52 | "authors", authors, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
53 | "version", DISPLAY_VERSION, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
54 | "category", N_("Protocol"), |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
55 | "summary", N_("XMPP Protocol Plugin"), |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
56 | "description", N_("Modern XMPP Support"), |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
57 | "website", PURPLE_WEBSITE, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
58 | "abi-version", PURPLE_ABI_VERSION, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
59 | "flags", flags, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
60 | NULL); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
61 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
62 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
63 | static gboolean |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
64 | purple_xmpp_load(GPluginPlugin *plugin, GError **error) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
65 | PurpleProtocolManager *manager = NULL; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
66 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
67 | if(PURPLE_IS_PROTOCOL(xmpp_protocol)) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
68 | g_set_error_literal(error, PURPLE_XMPP_DOMAIN, 0, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
69 | "plugin was not cleaned up properly"); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
70 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
71 | return FALSE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
72 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
73 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
74 | purple_xmpp_protocol_register(GPLUGIN_NATIVE_PLUGIN(plugin)); |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
75 | purple_xmpp_connection_register(GPLUGIN_NATIVE_PLUGIN(plugin)); |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
76 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
77 | xmpp_protocol = purple_xmpp_protocol_new(); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
78 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
79 | manager = purple_protocol_manager_get_default(); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
80 | if(PURPLE_IS_PROTOCOL_MANAGER(manager)) { |
|
43036
bb4db2d67c61
Update the protocols for the Purple.ProtocolManager deprecations
Gary Kramlich <grim@reaperworld.com>
parents:
42546
diff
changeset
|
81 | if(!purple_protocol_manager_add(manager, xmpp_protocol, error)) { |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
82 | g_clear_object(&xmpp_protocol); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
83 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
84 | return FALSE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
85 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
86 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
87 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
88 | return TRUE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
89 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
90 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
91 | static gboolean |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
92 | purple_xmpp_unload(G_GNUC_UNUSED GPluginPlugin *plugin, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
93 | G_GNUC_UNUSED gboolean shutdown, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
94 | GError **error) |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
95 | { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
96 | PurpleProtocolManager *manager = NULL; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
97 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | if(!PURPLE_IS_PROTOCOL(xmpp_protocol)) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | g_set_error_literal(error, PURPLE_XMPP_DOMAIN, 0, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | "plugin was not setup properly"); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | return FALSE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
103 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
104 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | manager = purple_protocol_manager_get_default(); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | if(PURPLE_IS_PROTOCOL_MANAGER(manager)) { |
|
43036
bb4db2d67c61
Update the protocols for the Purple.ProtocolManager deprecations
Gary Kramlich <grim@reaperworld.com>
parents:
42546
diff
changeset
|
107 | if(!purple_protocol_manager_remove(manager, xmpp_protocol, error)) { |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | return FALSE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
109 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
110 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
111 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
112 | g_clear_object(&xmpp_protocol); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
113 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
114 | return TRUE; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
115 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
116 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
117 | GPLUGIN_NATIVE_PLUGIN_DECLARE(purple_xmpp) |