Thu, 29 Feb 2024 21:27:30 -0600
Remove the micro version from since tags for the new protocols
Remove the micro version from since tags for the new protocols
Testing Done:
Compiled as we don't have the docs setup for either of these.
Reviewed at https://reviews.imfreedom.org/r/2986/
|
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/gi18n-lib.h> |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
20 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
21 | #include "purplexmppprotocol.h" |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
22 | |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
23 | #include "purplexmppconnection.h" |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
24 | #include "purplexmppconstants.h" |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
25 | |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
26 | struct _PurpleXmppProtocol { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
27 | PurpleProtocol parent; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
28 | }; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
29 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
30 | /****************************************************************************** |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
31 | * PurpleProtocol Implementation |
|
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 | static GList * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
34 | purple_xmpp_protocol_get_user_splits(G_GNUC_UNUSED PurpleProtocol *protocol) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
35 | PurpleAccountUserSplit *split = NULL; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
36 | GList *splits = NULL; |
|
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 | split = purple_account_user_split_new(_("Server"), NULL, '@'); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
39 | splits = g_list_append(splits, split); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
40 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
41 | return splits; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
42 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
43 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
44 | static GList * |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
45 | purple_xmpp_protocol_get_account_options(G_GNUC_UNUSED PurpleProtocol *protocol) |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
46 | { |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
47 | PurpleAccountOption *option = NULL; |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
48 | PurpleKeyValuePair *pair = NULL; |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
49 | GList *options = NULL; |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
50 | GList *items = NULL; |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
51 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
52 | option = purple_account_option_string_new(_("Resource"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
53 | PURPLE_XMPP_OPTION_RESOURCE, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
54 | NULL); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
55 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
56 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
57 | option = purple_account_option_string_new(_("Server"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
58 | PURPLE_XMPP_OPTION_SERVER, NULL); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
59 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
60 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
61 | option = purple_account_option_int_new(_("Port"), PURPLE_XMPP_OPTION_PORT, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
62 | PURPLE_XMPP_DEFAULT_PORT_TLS); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
63 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
64 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
65 | pair = purple_key_value_pair_new(_("Direct TLS"), PURPLE_XMPP_TLS_DIRECT); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
66 | items = g_list_append(items, pair); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
67 | pair = purple_key_value_pair_new(_("STARTTLS"), PURPLE_XMPP_TLS_STARTTLS); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
68 | items = g_list_append(items, pair); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
69 | pair = purple_key_value_pair_new(_("None"), PURPLE_XMPP_TLS_NONE); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
70 | items = g_list_append(items, pair); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
71 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
72 | option = purple_account_option_list_new(_("TLS Mode"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
73 | PURPLE_XMPP_OPTION_TLS_MODE, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
74 | items); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
75 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
76 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
77 | option = purple_account_option_string_new(_("SASL login name"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
78 | PURPLE_XMPP_OPTION_SASL_LOGIN_NAME, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
79 | NULL); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
80 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
81 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
82 | option = purple_account_option_string_new(_("SASL mechanisms"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
83 | PURPLE_XMPP_OPTION_SASL_MECHANISMS, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
84 | NULL); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
85 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
86 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
87 | option = purple_account_option_bool_new(_("Allow plaintext SASL auth over " |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
88 | "unencrypted connection"), |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
89 | PURPLE_XMPP_OPTION_PLAIN_SASL_IN_CLEAR, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
90 | FALSE); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
91 | options = g_list_append(options, option); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
92 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
93 | return options; |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
94 | } |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
95 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
96 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
97 | static GList * |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
98 | purple_xmpp_protocol_status_types(G_GNUC_UNUSED PurpleProtocol *protocol, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
99 | G_GNUC_UNUSED PurpleAccount *account) |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
100 | { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
101 | PurpleStatusType *type = NULL; |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
102 | GList *types = NULL; |
|
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 | type = purple_status_type_new(PURPLE_STATUS_AVAILABLE, NULL, NULL, TRUE); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
105 | types = g_list_append(types, type); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
106 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
107 | type = purple_status_type_new(PURPLE_STATUS_OFFLINE, NULL, NULL, TRUE); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
108 | types = g_list_append(types, type); |
|
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 | return types; |
|
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 | |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
113 | static PurpleConnection * |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
114 | purple_xmpp_protocol_create_connection(PurpleProtocol *protocol, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
115 | PurpleAccount *account, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
116 | const char *password, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
117 | G_GNUC_UNUSED GError **error) |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
118 | { |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
119 | return g_object_new( |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
120 | PURPLE_XMPP_TYPE_CONNECTION, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
121 | "protocol", protocol, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
122 | "account", account, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
123 | "password", password, |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
124 | NULL); |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
125 | } |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
126 | |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
127 | /****************************************************************************** |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
128 | * GObject Implementation |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
129 | *****************************************************************************/ |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
130 | G_DEFINE_DYNAMIC_TYPE_EXTENDED( |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
131 | PurpleXmppProtocol, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
132 | purple_xmpp_protocol, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
133 | PURPLE_TYPE_PROTOCOL, |
|
42579
f1ce6abbf4d1
Define all final types as such for protocols
Gary Kramlich <grim@reaperworld.com>
parents:
42546
diff
changeset
|
134 | G_TYPE_FLAG_FINAL, |
|
f1ce6abbf4d1
Define all final types as such for protocols
Gary Kramlich <grim@reaperworld.com>
parents:
42546
diff
changeset
|
135 | {}) |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
136 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
137 | static void |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
138 | purple_xmpp_protocol_init(G_GNUC_UNUSED PurpleXmppProtocol *protocol) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
139 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
140 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
141 | static void |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
142 | purple_xmpp_protocol_class_finalize(G_GNUC_UNUSED PurpleXmppProtocolClass *klass) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
143 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
144 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
145 | static void |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
146 | purple_xmpp_protocol_class_init(PurpleXmppProtocolClass *klass) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
147 | PurpleProtocolClass *protocol_class = PURPLE_PROTOCOL_CLASS(klass); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
148 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
149 | protocol_class->get_user_splits = purple_xmpp_protocol_get_user_splits; |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
150 | protocol_class->get_account_options = purple_xmpp_protocol_get_account_options; |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
151 | protocol_class->status_types = purple_xmpp_protocol_status_types; |
|
42546
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
152 | |
|
a8a644e3e561
start of the new xmpp's connection
Gary Kramlich <grim@reaperworld.com>
parents:
42529
diff
changeset
|
153 | protocol_class->create_connection = purple_xmpp_protocol_create_connection; |
|
42529
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
154 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
155 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
156 | /****************************************************************************** |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
157 | * Internal API |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
158 | *****************************************************************************/ |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
159 | void |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
160 | purple_xmpp_protocol_register(GPluginNativePlugin *plugin) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
161 | purple_xmpp_protocol_register_type(G_TYPE_MODULE(plugin)); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
162 | } |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
163 | |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
164 | PurpleProtocol * |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
165 | purple_xmpp_protocol_new(void) { |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
166 | return g_object_new( |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
167 | PURPLE_XMPP_TYPE_PROTOCOL, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
168 | "id", "prpl-xmpp", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
169 | "name", "XMPP", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
170 | "description", _("Modern Extensible Messaging and Presence Protocol."), |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
171 | "icon-name", "im-xmpp", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
172 | "icon-resource-path", "/im/pidgin/libpurple/protocols/xmpp/icons", |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
173 | "options", OPT_PROTO_PASSWORD_OPTIONAL, |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
174 | NULL); |
|
f00a798a38a6
Stub out our new modern XMPP implementation
Gary Kramlich <grim@reaperworld.com>
parents:
diff
changeset
|
175 | } |