libpurple/protocols/jabber/facebook.c

Tue, 21 Jan 2014 01:48:42 +0530

author
Ankit Vani <a@nevitus.org>
date
Tue, 21 Jan 2014 01:48:42 +0530
branch
soc.2013.gobjectification.plugins
changeset 37004
c8dce7bef0e6
parent 36732
39a42632a4c8
child 37038
8832d14d7d0c
permissions
-rw-r--r--

Change protocol IDs to prpl-*

32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
1 /* purple
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
2 *
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
3 * Purple is the legal property of its developers, whose names are too numerous
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
4 * to list here. Please refer to the COPYRIGHT file distributed with this
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
5 * source distribution.
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
6 *
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
7 * This program is free software; you can redistribute it and/or modify
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
8 * it under the terms of the GNU General Public License as published by
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
9 * the Free Software Foundation; either version 2 of the License, or
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
10 * (at your option) any later version.
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
11 *
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
12 * This program is distributed in the hope that it will be useful,
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
15 * GNU General Public License for more details.
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
16 *
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
17 * You should have received a copy of the GNU General Public License
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
18 * along with this program; if not, write to the Free Software
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
20 *
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
21 */
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
22
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
23 #include "internal.h"
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
24 #include "chat.h"
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
25 #include "core.h"
36509
86e882c3cfdf Refactored libpurple according to the changes
Ankit Vani <a@nevitus.org>
parents: 36505
diff changeset
26 #include "plugins.h"
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
27
36665
5bef44ba334a Build a single library for jabber.
Ankit Vani <a@nevitus.org>
parents: 36653
diff changeset
28 #include "facebook.h"
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
29
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
30 static const char *
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
31 facebook_list_icon(PurpleAccount *a, PurpleBuddy *b)
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
32 {
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
33 return "facebook";
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
34 }
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
35
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
36 static void
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
37 facebook_protocol_init(PurpleProtocol *protocol)
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
38 {
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
39 PurpleAccountUserSplit *split;
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
40 PurpleAccountOption *option;
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
41 GList *encryption_values = NULL;
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
42
37004
c8dce7bef0e6 Change protocol IDs to prpl-*
Ankit Vani <a@nevitus.org>
parents: 36732
diff changeset
43 protocol->id = "prpl-facebook-xmpp";
36685
646c2ae00fdb Removed some spaces for better alignment
Ankit Vani <a@nevitus.org>
parents: 36684
diff changeset
44 protocol->name = "Facebook (XMPP)";
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
45
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
46 /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */
32929
2c6aa2ca6a52 Remove and replace the Default Domain UI hack.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32927
diff changeset
47 split = purple_account_user_split_new(_("Domain"), "chat.facebook.com", '@');
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
48 purple_account_user_split_set_reverse(split, FALSE);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
49 protocol->user_splits = g_list_append(protocol->user_splits, split);
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
50
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
51 split = purple_account_user_split_new(_("Resource"), "", '/');
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
52 purple_account_user_split_set_reverse(split, FALSE);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
53 protocol->user_splits = g_list_append(protocol->user_splits, split);
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
54
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
55 #define ADD_VALUE(list, desc, v) { \
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
56 PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); \
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
57 kvp->key = g_strdup((desc)); \
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
58 kvp->value = g_strdup((v)); \
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
59 list = g_list_prepend(list, kvp); \
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
60 }
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
61
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
62 ADD_VALUE(encryption_values, _("Require encryption"), "require_tls");
32932
0672f4626f75 Replace Facebook's UI hack for default connection security.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32930
diff changeset
63 ADD_VALUE(encryption_values, _("Use encryption if available"), "opportunistic_tls");
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
64 ADD_VALUE(encryption_values, _("Use old-style SSL"), "old_ssl");
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
65 #if 0
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
66 ADD_VALUE(encryption_values, "None", "none");
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
67 #endif
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
68 encryption_values = g_list_reverse(encryption_values);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
69
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
70 #undef ADD_VALUE
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
71
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
72 option = purple_account_option_list_new(_("Connection security"), "connection_security", encryption_values);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
73 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
74 option);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
75
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
76 option = purple_account_option_bool_new(
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
77 _("Allow plaintext auth over unencrypted streams"),
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
78 "auth_plain_in_clear", FALSE);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
79 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
80 option);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
81
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
82 option = purple_account_option_int_new(_("Connect port"), "port", 5222);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
83 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
84 option);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
85
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
86 option = purple_account_option_string_new(_("Connect server"),
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
87 "connect_server", NULL);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
88 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
89 option);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
90
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
91 option = purple_account_option_string_new(_("BOSH URL"),
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
92 "bosh_url", NULL);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
93 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
94 option);
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
95
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
96 /* this should probably be part of global smiley theme settings later on,
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
97 shared with MSN */
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
98 option = purple_account_option_bool_new(_("Show Custom Smileys"),
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
99 "custom_smileys", TRUE);
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
100 protocol->protocol_options = g_list_append(protocol->protocol_options,
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
101 option);
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
102 }
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
103
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
104 static void
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
105 facebook_protocol_class_init(PurpleProtocolClass *klass)
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
106 {
36732
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
107 klass->list_icon = facebook_list_icon;
36684
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
108 }
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
109
ecc74498e088 Refactored other protocols to use instance init
Ankit Vani <a@nevitus.org>
parents: 36678
diff changeset
110 static void
36729
7f9fac14ed60 Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents: 36714
diff changeset
111 facebook_protocol_client_iface_init(PurpleProtocolClientIface *client_iface)
36582
095b9c85c45c Refactored jabber to use the new protocol API.
Ankit Vani <a@nevitus.org>
parents: 36545
diff changeset
112 {
36732
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
113 client_iface->get_moods = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
114 }
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
115
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
116 static void
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
117 facebook_protocol_server_iface_init(PurpleProtocolServerIface *server_iface)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
118 {
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
119 server_iface->register_user = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
120 server_iface->unregister_user = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
121 server_iface->add_buddy = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
122 server_iface->remove_buddy = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
123 server_iface->alias_buddy = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
124 server_iface->group_buddy = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
125 server_iface->rename_group = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
126 }
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
127
36732
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
128 static void
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
129 facebook_protocol_privacy_iface_init(PurpleProtocolPrivacyIface *privacy_iface)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
130 {
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
131 privacy_iface->add_deny = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
132 privacy_iface->rem_deny = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
133 }
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
134
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
135 static void
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
136 facebook_protocol_attention_iface_init(PurpleProtocolAttentionIface *attention_iface)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
137 {
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
138 attention_iface->send = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
139 attention_iface->get_types = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
140 }
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
141
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
142 static void
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
143 facebook_protocol_media_iface_init(PurpleProtocolMediaIface *media_iface)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
144 {
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
145 media_iface->initiate_session = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
146 media_iface->get_caps = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
147 }
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
148
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
149 static void
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
150 facebook_protocol_xfer_iface_init(PurpleProtocolXferIface *xfer_iface)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
151 {
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
152 xfer_iface->can_receive = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
153 xfer_iface->send = NULL;
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
154 xfer_iface->new_xfer = NULL;
32926
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
155 }
6a06b6cea862 Since XMPP is already a split-prpl thing, make two new prpls for
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
diff changeset
156
36714
ec178f7d66da Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents: 36685
diff changeset
157 PURPLE_DEFINE_TYPE_EXTENDED(
ec178f7d66da Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents: 36685
diff changeset
158 FacebookProtocol, facebook_protocol, JABBER_TYPE_PROTOCOL, 0,
36732
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
159
36729
7f9fac14ed60 Temporarily replaced PurpleProtocolInterface with PurpleProtocolClientIface in protocols
Ankit Vani <a@nevitus.org>
parents: 36714
diff changeset
160 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CLIENT_IFACE,
36732
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
161 facebook_protocol_client_iface_init)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
162
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
163 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_SERVER_IFACE,
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
164 facebook_protocol_server_iface_init)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
165
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
166 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE,
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
167 facebook_protocol_privacy_iface_init)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
168
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
169 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_ATTENTION_IFACE,
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
170 facebook_protocol_attention_iface_init)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
171
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
172 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_MEDIA_IFACE,
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
173 facebook_protocol_media_iface_init)
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
174
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
175 PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_XFER_IFACE,
39a42632a4c8 Refactored jabber to use the new protocol interfaces
Ankit Vani <a@nevitus.org>
parents: 36729
diff changeset
176 facebook_protocol_xfer_iface_init)
36714
ec178f7d66da Refactored protocols to use the new type definition macros
Ankit Vani <a@nevitus.org>
parents: 36685
diff changeset
177 );

mercurial