Mon, 08 Mar 2021 23:22:02 -0600
Modernize PurpleProtocol
* Migrate PurpleProtocol to the `G_DECLARE_DERIVABLE_TYPE` and `G_DEFINE_TYPE` macros.
* Rename `purple_protocol_class_*` to `purple_protocol_*`.
* Move the class properties to instance properties and add accessors as necessary.
Testing Done:
Ran locally and connected with bonjour, facebook, irc, and xmpp. Verified that the other prpls are loading and visible in the account manager.
Bugs closed: PIDGIN-17492
Reviewed at https://reviews.imfreedom.org/r/552/
| 16303 | 1 | /* purple |
| 2 | * | |
| 3 | * Purple is the legal property of its developers, whose names are too numerous | |
| 4 | * to list here. Please refer to the COPYRIGHT file distributed with this | |
| 5 | * source distribution. | |
| 6 | * | |
| 7 | * This program is free software; you can redistribute it and/or modify | |
| 8 | * it under the terms of the GNU General Public License as published by | |
| 9 | * the Free Software Foundation; either version 2 of the License, or | |
| 10 | * (at your option) any later version. | |
| 11 | * | |
| 12 | * This program is distributed in the hope that it will be useful, | |
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 15 | * GNU General Public License for more details. | |
| 16 | * | |
| 17 | * You should have received a copy of the GNU General Public License | |
| 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 | 20 | * |
| 21 | */ | |
| 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 | 30 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
31 | static GList * |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
32 | xmpp_protocol_get_account_options(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
|
33 | PurpleAccountOption *option; |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
34 | PurpleKeyValuePair *kvp = NULL; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
35 | 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
|
36 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
37 | /* build the list of encryption types we support */ |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
38 | kvp = purple_key_value_pair_new(_("Require encryption"), "require_tls"); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
39 | 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
|
40 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
41 | kvp = purple_key_value_pair_new(_("Use encryption if available"), |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
42 | "opportunistic_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 old-style SSL"), "old_ssl"); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
46 | 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
|
47 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
48 | /* build all the options */ |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
49 | option = purple_account_option_list_new(_("Connection security"), |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
50 | "connection_security", |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
51 | encryption_values); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
52 | 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
|
53 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
54 | option = purple_account_option_bool_new(_("Allow plaintext auth over " |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
55 | "unencrypted streams"), |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
56 | "auth_plain_in_clear", FALSE); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
57 | 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
|
58 | |
|
19894
b273d0db2bdd
Fixed code indenting, some spaces were still left and now replaced by tabs.
Andreas Monitzer <am@adiumx.com>
parents:
18996
diff
changeset
|
59 | option = purple_account_option_int_new(_("Connect port"), "port", 5222); |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
60 | 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
|
61 | |
|
19894
b273d0db2bdd
Fixed code indenting, some spaces were still left and now replaced by tabs.
Andreas Monitzer <am@adiumx.com>
parents:
18996
diff
changeset
|
62 | option = purple_account_option_string_new(_("Connect server"), |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
63 | "connect_server", NULL); |
|
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 | |
|
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
|
66 | option = purple_account_option_string_new(_("File transfer proxies"), |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
67 | "ft_proxies", NULL); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
68 | 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
|
69 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
70 | option = purple_account_option_string_new(_("BOSH URL"), "bosh_url", NULL); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
71 | opts = g_list_append(opts, option); |
|
27397
690965a5ff24
Make "BOSH URL" its own account option.
Paul Aurich <darkrain42@pidgin.im>
parents:
27225
diff
changeset
|
72 | |
|
38082
63975292a852
Remove comment and docstring mentions of MSN
Mike Ruprecht <cmaiku@gmail.com>
parents:
31595
diff
changeset
|
73 | /* this should probably be part of global smiley theme settings |
|
63975292a852
Remove comment and docstring mentions of MSN
Mike Ruprecht <cmaiku@gmail.com>
parents:
31595
diff
changeset
|
74 | * later on |
|
63975292a852
Remove comment and docstring mentions of MSN
Mike Ruprecht <cmaiku@gmail.com>
parents:
31595
diff
changeset
|
75 | */ |
|
23626
e21afec2f485
Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents:
23277
diff
changeset
|
76 | option = purple_account_option_bool_new(_("Show Custom Smileys"), |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
77 | "custom_smileys", TRUE); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
78 | opts = g_list_append(opts, option); |
|
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 | return opts; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
81 | } |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
82 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
83 | static GList * |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
84 | xmpp_protocol_get_user_splits(PurpleProtocol *protocol) { |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
85 | GList *splits = NULL; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
86 | PurpleAccountUserSplit *split; |
|
23626
e21afec2f485
Custom smileys for XMPP according to XEP 0231. Refs #5627.
Marcus Lundblad <malu@pidgin.im>
parents:
23277
diff
changeset
|
87 | |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
88 | /* Translators: 'domain' is used here in the context of Internet domains, |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
89 | * e.g. pidgin.im. |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
90 | */ |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
91 | split = purple_account_user_split_new(_("Domain"), NULL, '@'); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
92 | purple_account_user_split_set_reverse(split, FALSE); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
93 | splits = g_list_append(splits, split); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
94 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
95 | split = purple_account_user_split_new(_("Resource"), "", '/'); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
96 | purple_account_user_split_set_reverse(split, FALSE); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
97 | splits = g_list_append(splits, split); |
|
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 | return splits; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
100 | } |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
101 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
102 | static void |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
103 | xmpp_protocol_init(XMPPProtocol *self) { |
| 36984 | 104 | 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
|
105 | } |
|
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
|
106 | |
|
36684
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
107 | static void |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
108 | xmpp_protocol_class_init(XMPPProtocolClass *klass) { |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
109 | PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
110 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
111 | protocol_class->get_account_options = xmpp_protocol_get_account_options; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
112 | 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
|
113 | } |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
114 | |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
115 | static void |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
116 | 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
|
117 | { |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
118 | } |
|
ecc74498e088
Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents:
36678
diff
changeset
|
119 | |
|
39894
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
120 | 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
|
121 | |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
122 | /* 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
|
123 | * static. */ |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
124 | void |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
125 | xmpp_protocol_register(PurplePlugin *plugin) |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
126 | { |
|
7eab91ea30a1
Replace Purple type macros by GObject macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
38854
diff
changeset
|
127 | 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
|
128 | } |
|
40813
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
129 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
130 | PurpleProtocol * |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
131 | xmpp_protocol_new(void) { |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
132 | PurpleProtocolOptions options; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
133 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
134 | options = OPT_PROTO_CHAT_TOPIC | OPT_PROTO_UNIQUE_CHATNAME | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
135 | OPT_PROTO_MAIL_CHECK | OPT_PROTO_SLASH_COMMANDS_NATIVE; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
136 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
137 | #ifdef HAVE_CYRUS_SASL |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
138 | options |= OPT_PROTO_PASSWORD_OPTIONAL; |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
139 | #endif |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
140 | |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
141 | return PURPLE_PROTOCOL(g_object_new( |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
142 | XMPP_TYPE_PROTOCOL, |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
143 | "id", XMPP_PROTOCOL_ID, |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
144 | "name", "XMPP", |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
145 | "options", options, |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
146 | NULL |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
147 | )); |
|
71305a7d7423
Modernize PurpleProtocol
Gary Kramlich <grim@reaperworld.com>
parents:
40441
diff
changeset
|
148 | } |