libpurple/protocols/jabber/xmpp.c

Tue, 21 Mar 2023 02:07:16 -0500

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Tue, 21 Mar 2023 02:07:16 -0500
changeset 42176
8f7b46f497c6
parent 41967
025eee9e6f1d
child 42410
563e7a17c220
permissions
-rw-r--r--

Remove libsoup2 code

Soup 3 has been required since /r/2068.

Testing Done:
Compiled only.

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

16303
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
1 /* purple
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
2 *
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
5 * source distribution.
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
6 *
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
11 *
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
16 *
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
19859
71d37b57eff2 The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents: 18273
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
16303
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
20 *
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
21 */
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
22
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
23 #include <config.h>
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
24
40441
f23c7e772667 Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
25 #include <glib/gi18n-lib.h>
f23c7e772667 Make sure we're not including the gettext macros in header files and deal with the repercussions of that.
Gary Kramlich <grim@reaperworld.com>
parents: 40439
diff changeset
26
40350
72271baf92bc Split PurpleKeyValuePair out to it's own file and try to do some cleanup in the files that need to include it.
Gary Kramlich <grim@reaperworld.com>
parents: 40331
diff changeset
27 #include <purple.h>
28136
a3b6446eb2c4 Add support for XMPP URIs on Windows. Closes #2326.
Paul Aurich <darkrain42@pidgin.im>
parents: 27601
diff changeset
28
36665
5bef44ba334a Build a single library for jabber.
Ankit Vani <a@nevitus.org>
parents: 36653
diff changeset
29 #include "xmpp.h"
16303
0dd957edcc0a Very important to add files \!
Sean Egan <seanegan@pidgin.im>
parents:
diff changeset
30
40862
da09b67f08ab Use the G_DECLARE_*_TYPE macros for JabberProtocol and XMPPProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40813
diff changeset
31 struct _XMPPProtocol {
da09b67f08ab Use the G_DECLARE_*_TYPE macros for JabberProtocol and XMPPProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40813
diff changeset
32 JabberProtocol parent;
da09b67f08ab Use the G_DECLARE_*_TYPE macros for JabberProtocol and XMPPProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40813
diff changeset
33 };
da09b67f08ab Use the G_DECLARE_*_TYPE macros for JabberProtocol and XMPPProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40813
diff changeset
34
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
35 static GList *
41967
025eee9e6f1d Bump C standard to C99 for XMPP and fix warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41488
diff changeset
36 xmpp_protocol_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol) {
19894
b273d0db2bdd Fixed code indenting, some spaces were still left and now replaced by tabs.
Andreas Monitzer <am@adiumx.com>
parents: 18996
diff changeset
37 PurpleAccountOption *option;
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
38 PurpleKeyValuePair *kvp = NULL;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
39 GList *opts = NULL, *encryption_values = NULL;
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26041
diff changeset
40
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
41 /* build the list of encryption types we support */
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
42 kvp = purple_key_value_pair_new(_("Require encryption"), "require_tls");
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
43 encryption_values = g_list_append(encryption_values, kvp);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26041
diff changeset
44
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
45 kvp = purple_key_value_pair_new(_("Use encryption if available"),
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
46 "opportunistic_tls");
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
47 encryption_values = g_list_append(encryption_values, kvp);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26041
diff changeset
48
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
49 kvp = purple_key_value_pair_new(_("Use old-style SSL"), "old_ssl");
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
50 encryption_values = g_list_append(encryption_values, kvp);
30740
017077f79a0f jabber: Unify "Require TLS" and "Use old-style (port 5223) SSL" settings
Paul Aurich <darkrain42@pidgin.im>
parents: 30138
diff changeset
51
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
52 /* build all the options */
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
53 option = purple_account_option_list_new(_("Connection security"),
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
54 "connection_security",
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
55 encryption_values);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
56 opts = g_list_append(opts, option);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26041
diff changeset
57
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
58 option = purple_account_option_bool_new(_("Allow plaintext auth over "
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
59 "unencrypted streams"),
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
60 "auth_plain_in_clear", FALSE);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
61 opts = g_list_append(opts, option);
26042
4dabdb5fe213 Remove some extra trailing whitespace I noticed after merging mlundblad's
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 26041
diff changeset
62
19894
b273d0db2bdd Fixed code indenting, some spaces were still left and now replaced by tabs.
Andreas Monitzer <am@adiumx.com>
parents: 18996
diff changeset
63 option = purple_account_option_int_new(_("Connect port"), "port", 5222);
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
64 opts = g_list_append(opts, option);
21717
424d552a8435 Now that the release has been tagged and strings are unfrozen, enable the new ft proxy account setting for xmpp accounts. Also, prevent duplicate entries in the streamhost lists. I don't know if the default account proxy is acceptable, perhaps there shouldn't be a default value.
Daniel Atallah <datallah@pidgin.im>
parents: 21688
diff changeset
65
19894
b273d0db2bdd Fixed code indenting, some spaces were still left and now replaced by tabs.
Andreas Monitzer <am@adiumx.com>
parents: 18996
diff changeset
66 option = purple_account_option_string_new(_("Connect server"),
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
67 "connect_server", NULL);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
68 opts = g_list_append(opts, option);
21717
424d552a8435 Now that the release has been tagged and strings are unfrozen, enable the new ft proxy account setting for xmpp accounts. Also, prevent duplicate entries in the streamhost lists. I don't know if the default account proxy is acceptable, perhaps there shouldn't be a default value.
Daniel Atallah <datallah@pidgin.im>
parents: 21688
diff changeset
69
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21395
diff changeset
70 option = purple_account_option_string_new(_("File transfer proxies"),
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
71 "ft_proxies", NULL);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
72 opts = g_list_append(opts, option);
21688
a16385b34219 Implement more of XEP-0065 to support sending files through a proxy. To avoid adding strings this close to a release, it only supports using a proxy that is discovered from the server, but we'll include an account option to manually specify a ft proxy in the next release. Lots of this is based on a patch from galt - Fixes #3730, #116, #1768
Daniel Atallah <datallah@pidgin.im>
parents: 21395
diff changeset
73
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
74 option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
75 opts = g_list_append(opts, option);
27397
690965a5ff24 Make "BOSH URL" its own account option.
Paul Aurich <darkrain42@pidgin.im>
parents: 27225
diff changeset
76
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
77 return opts;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
78 }
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
79
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
80 static GList *
41967
025eee9e6f1d Bump C standard to C99 for XMPP and fix warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41488
diff changeset
81 xmpp_protocol_get_user_splits(G_GNUC_UNUSED PurpleProtocol *protocol) {
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
82 GList *splits = NULL;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
83 PurpleAccountUserSplit *split;
23626
e21afec2f485 Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents: 23277
diff changeset
84
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
85 /* Translators: 'domain' is used here in the context of Internet domains,
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
86 * e.g. pidgin.im.
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
87 */
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
88 split = purple_account_user_split_new(_("Domain"), NULL, '@');
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
89 purple_account_user_split_set_reverse(split, FALSE);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
90 splits = g_list_append(splits, split);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
91
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
92 split = purple_account_user_split_new(_("Resource"), "", '/');
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
93 purple_account_user_split_set_reverse(split, FALSE);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
94 splits = g_list_append(splits, split);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
95
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
96 return splits;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
97 }
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
98
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
99 static void
41967
025eee9e6f1d Bump C standard to C99 for XMPP and fix warnings
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 41488
diff changeset
100 xmpp_protocol_init(G_GNUC_UNUSED XMPPProtocol *self) {
36984
1768a56dbcf4 Re-revert pref renames
Ankit Vani <a@nevitus.org>
parents: 36982
diff changeset
101 purple_prefs_remove("/plugins/prpl/jabber");
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
102 }
21717
424d552a8435 Now that the release has been tagged and strings are unfrozen, enable the new ft proxy account setting for xmpp accounts. Also, prevent duplicate entries in the streamhost lists. I don't know if the default account proxy is acceptable, perhaps there shouldn't be a default value.
Daniel Atallah <datallah@pidgin.im>
parents: 21688
diff changeset
103
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
104 static void
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
105 xmpp_protocol_class_init(XMPPProtocolClass *klass) {
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
106 PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass);
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
107
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
108 protocol_class->get_account_options = xmpp_protocol_get_account_options;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
109 protocol_class->get_user_splits = xmpp_protocol_get_user_splits;
39894
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
110 }
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
111
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
112 static void
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
113 xmpp_protocol_class_finalize(G_GNUC_UNUSED XMPPProtocolClass *klass)
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
114 {
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
115 }
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
116
39894
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
117 G_DEFINE_DYNAMIC_TYPE(XMPPProtocol, xmpp_protocol, JABBER_TYPE_PROTOCOL);
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
118
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
119 /* This exists solely because the above macro makes xmpp_protocol_register_type
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
120 * static. */
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
121 void
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
122 xmpp_protocol_register(PurplePlugin *plugin)
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
123 {
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
124 xmpp_protocol_register_type(G_TYPE_MODULE(plugin));
7eab91ea30a1 Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 38854
diff changeset
125 }
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
126
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
127 PurpleProtocol *
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
128 xmpp_protocol_new(void) {
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
129 PurpleProtocolOptions options;
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
130
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
131 options = OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME |
41488
95f59c2bc50d Make cyrus-sasl required
Gary Kramlich <grim@reaperworld.com>
parents: 41348
diff changeset
132 OPT_PROTO_MAIL_CHECK | OPT_PROTO_SLASH_COMMANDS_NATIVE |
95f59c2bc50d Make cyrus-sasl required
Gary Kramlich <grim@reaperworld.com>
parents: 41348
diff changeset
133 OPT_PROTO_PASSWORD_OPTIONAL;
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
134
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
135 return PURPLE_PROTOCOL(g_object_new(
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
136 XMPP_TYPE_PROTOCOL,
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
137 "id", XMPP_PROTOCOL_ID,
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
138 "name", "XMPP",
41348
74b1a5db343b Mark the protocol descriptions for translation and tweak them a bit.
Gary Kramlich <grim@reaperworld.com>
parents: 41076
diff changeset
139 "description", _("Extensible Messaging and Presence Protocol for IM, "
74b1a5db343b Mark the protocol descriptions for translation and tweak them a bit.
Gary Kramlich <grim@reaperworld.com>
parents: 41076
diff changeset
140 "voice, and video."),
41076
7c8fcbef00ca move the xmpp protocol plugins icons to a resource in the plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41034
diff changeset
141 "icon-name", "im-jabber",
7c8fcbef00ca move the xmpp protocol plugins icons to a resource in the plugin
Gary Kramlich <grim@reaperworld.com>
parents: 41034
diff changeset
142 "icon-resource-path", "/im/pidgin/libpurple/xmpp/icons",
40813
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
143 "options", options,
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
144 NULL
71305a7d7423 Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40441
diff changeset
145 ));
40862
da09b67f08ab Use the G_DECLARE_*_TYPE macros for JabberProtocol and XMPPProtocol
Gary Kramlich <grim@reaperworld.com>
parents: 40813
diff changeset
146 }

mercurial