/soc/2015/jgeboski/facebook: ef82ac226e4b: jabber: removed expli...
James Geboski <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: ef82ac226e4b098ac6f995d46728ac4c8240a577 Author: James Geboski <[email protected]> Date: 2015-05-30 06:02 -0400 Branch: facebook URL: https://hg.pidgin.im/soc/2015/jgeboski/facebook/rev/ef82ac226e4b Description: jabber: removed explicit Facebook support The XMPP service provided by Facebook was deprecated long ago, and is in the process of being shutdown. In order to make way for the proper Messenger protocol implementation, and to prevent from confusing users, this explicit support should be yanked. diffstat: libpurple/protocols/jabber/Makefile.am | 4 - libpurple/protocols/jabber/Makefile.mingw | 2 - libpurple/protocols/jabber/facebook.c | 213 --------------------------- libpurple/protocols/jabber/facebook.h | 54 ------ libpurple/protocols/jabber/facebook_roster.c | 135 ----------------- libpurple/protocols/jabber/facebook_roster.h | 35 ---- libpurple/protocols/jabber/jabber.c | 16 +- libpurple/protocols/jabber/jabber.h | 5 - libpurple/protocols/jabber/roster.c | 8 - pidgin/plugins/xmppconsole.c | 2 +- po/POTFILES.in | 2 - po/af.po | 3 - po/am.po | 3 - po/ar.po | 3 - po/as.po | 3 - po/ast.po | 3 - po/az.po | 3 - po/[email protected] | 3 - po/bg.po | 3 - po/bn.po | 3 - po/bn_IN.po | 3 - po/br.po | 4 - po/brx.po | 4 - po/bs.po | 3 - po/ca.po | 3 - po/[email protected] | 3 - po/cs.po | 3 - po/da.po | 3 - po/dz.po | 3 - po/el.po | 3 - po/en_AU.po | 3 - po/en_CA.po | 3 - po/en_GB.po | 3 - po/eo.po | 3 - po/es.po | 9 - po/es_AR.po | 4 - po/et.po | 3 - po/eu.po | 3 - po/fa.po | 3 - po/fi.po | 3 - po/fr.po | 3 - po/ga.po | 3 - po/gl.po | 3 - po/gu.po | 3 - po/he.po | 3 - po/hi.po | 3 - po/hr.po | 3 - po/hu.po | 3 - po/hy.po | 4 - po/id.po | 3 - po/it.po | 3 - po/ja.po | 3 - po/ka.po | 3 - po/kk.po | 3 - po/km.po | 3 - po/kn.po | 3 - po/ko.po | 3 - po/ks.po | 4 - po/ku.po | 3 - po/ku_IQ.po | 3 - po/lt.po | 3 - po/lv.po | 3 - po/mai.po | 3 - po/mhr.po | 3 - po/mk.po | 3 - po/ml.po | 3 - po/mn.po | 3 - po/mr.po | 3 - po/ms_MY.po | 4 - po/my_MM.po | 3 - po/nb.po | 3 - po/ne.po | 3 - po/nl.po | 3 - po/nn.po | 3 - po/oc.po | 3 - po/or.po | 3 - po/pa.po | 3 - po/pl.po | 12 - po/ps.po | 3 - po/pt.po | 3 - po/pt_BR.po | 3 - po/ro.po | 3 - po/ru.po | 3 - po/sd.po | 4 - po/si.po | 3 - po/sk.po | 3 - po/sl.po | 3 - po/sq.po | 3 - po/sr.po | 3 - po/[email protected] | 3 - po/sv.po | 3 - po/sw.po | 3 - po/ta.po | 3 - po/te.po | 3 - po/th.po | 3 - po/tr.po | 3 - po/tt.po | 3 - po/uk.po | 3 - po/ur.po | 3 - po/uz.po | 4 - po/vi.po | 3 - po/xh.po | 3 - po/zh_CN.po | 3 - po/zh_HK.po | 3 - po/zh_TW.po | 3 - 105 files changed, 3 insertions(+), 778 deletions(-) diffs (truncated from 1985 to 300 lines): diff --git a/libpurple/protocols/jabber/Makefile.am b/libpurple/protocols/jabber/Makefile.am --- a/libpurple/protocols/jabber/Makefile.am +++ b/libpurple/protocols/jabber/Makefile.am @@ -27,10 +27,6 @@ JABBERSOURCES = \ data.h \ disco.c \ disco.h \ - facebook.c \ - facebook.h \ - facebook_roster.c \ - facebook_roster.h \ google/gmail.c \ google/gmail.h \ google/google.c \ diff --git a/libpurple/protocols/jabber/Makefile.mingw b/libpurple/protocols/jabber/Makefile.mingw --- a/libpurple/protocols/jabber/Makefile.mingw +++ b/libpurple/protocols/jabber/Makefile.mingw @@ -62,8 +62,6 @@ C_SRC = \ chat.c \ data.c \ disco.c \ - facebook.c \ - facebook_roster.c \ google/gmail.c \ google/google.c \ google/google_presence.c \ diff --git a/libpurple/protocols/jabber/facebook.c b/libpurple/protocols/jabber/facebook.c deleted file mode 100644 --- a/libpurple/protocols/jabber/facebook.c +++ /dev/null @@ -1,213 +0,0 @@ -/* purple - * - * Purple is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - * - */ - -#include "internal.h" -#include "chat.h" -#include "core.h" -#include "plugins.h" - -#include "facebook.h" - -static const char * -facebook_list_icon(PurpleAccount *a, PurpleBuddy *b) -{ - return "facebook"; -} - -static void -facebook_login(PurpleAccount *account) -{ - PurpleConnection *gc; - JabberStream *js; - - jabber_login(account); - - gc = purple_account_get_connection(account); - if (!gc) - return; - - purple_connection_set_flags(gc, 0); - - js = purple_connection_get_protocol_data(gc); - if (!js) - return; - - js->server_caps |= JABBER_CAP_FACEBOOK; -} - -static void -facebook_protocol_init(PurpleProtocol *protocol) -{ - PurpleAccountUserSplit *split; - PurpleAccountOption *option; - GList *encryption_values = NULL; - - protocol->id = "prpl-facebook-xmpp"; - protocol->name = "Facebook (XMPP)"; - protocol->options = 0; - purple_protocol_override(protocol, PURPLE_PROTOCOL_OVERRIDE_ICON_SPEC); - - /* Translators: 'domain' is used here in the context of Internet domains, e.g. pidgin.im */ - split = purple_account_user_split_new(_("Domain"), "chat.facebook.com", '@'); - purple_account_user_split_set_reverse(split, FALSE); - purple_account_user_split_set_constant(split, TRUE); - protocol->user_splits = g_list_append(protocol->user_splits, split); - - split = purple_account_user_split_new(_("Resource"), "", '/'); - purple_account_user_split_set_reverse(split, FALSE); - purple_account_user_split_set_constant(split, TRUE); - protocol->user_splits = g_list_append(protocol->user_splits, split); - -#define ADD_VALUE(list, desc, v) { \ - PurpleKeyValuePair *kvp = g_new0(PurpleKeyValuePair, 1); \ - kvp->key = g_strdup((desc)); \ - kvp->value = g_strdup((v)); \ - list = g_list_prepend(list, kvp); \ -} - - ADD_VALUE(encryption_values, _("Require encryption"), "require_tls"); - ADD_VALUE(encryption_values, _("Use encryption if available"), "opportunistic_tls"); - ADD_VALUE(encryption_values, _("Use old-style SSL"), "old_ssl"); -#if 0 - ADD_VALUE(encryption_values, "None", "none"); -#endif - encryption_values = g_list_reverse(encryption_values); - -#undef ADD_VALUE - - option = purple_account_option_list_new(_("Connection security"), "connection_security", encryption_values); - protocol->account_options = g_list_append(protocol->account_options, - option); - - option = purple_account_option_string_new(_("BOSH URL"), - "bosh_url", NULL); - protocol->account_options = g_list_append(protocol->account_options, - option); -} - -static void -facebook_protocol_class_init(PurpleProtocolClass *klass) -{ - klass->login = facebook_login; - klass->list_icon = facebook_list_icon; -} - -static void -facebook_protocol_client_iface_init(PurpleProtocolClientIface *client_iface) -{ - client_iface->get_actions = NULL; - client_iface->find_blist_chat = NULL; - client_iface->blist_node_menu = NULL; - client_iface->get_moods = NULL; -} - -static void -facebook_protocol_server_iface_init(PurpleProtocolServerIface *server_iface) -{ - server_iface->register_user = NULL; - server_iface->unregister_user = NULL; - server_iface->set_info = NULL; - server_iface->add_buddy = NULL; - server_iface->remove_buddy = NULL; - server_iface->alias_buddy = NULL; - server_iface->group_buddy = NULL; - server_iface->rename_group = NULL; - server_iface->set_buddy_icon = NULL; -} - -static void -facebook_protocol_chat_iface_init(PurpleProtocolChatIface *chat_iface) -{ - chat_iface->info = NULL; - chat_iface->info_defaults = NULL; - chat_iface->join = NULL; - chat_iface->get_name = NULL; - chat_iface->invite = NULL; - chat_iface->leave = NULL; - chat_iface->send = NULL; - chat_iface->get_user_real_name = NULL; - chat_iface->set_topic = NULL; -} - -static void -facebook_protocol_privacy_iface_init(PurpleProtocolPrivacyIface *privacy_iface) -{ - privacy_iface->add_deny = NULL; - privacy_iface->rem_deny = NULL; -} - -static void -facebook_protocol_roomlist_iface_init(PurpleProtocolRoomlistIface *roomlist_iface) -{ - roomlist_iface->get_list = NULL; - roomlist_iface->cancel = NULL; -} - -static void -facebook_protocol_attention_iface_init(PurpleProtocolAttentionIface *attention_iface) -{ - attention_iface->send = NULL; - attention_iface->get_types = NULL; -} - -static void -facebook_protocol_media_iface_init(PurpleProtocolMediaIface *media_iface) -{ - media_iface->initiate_session = NULL; - media_iface->get_caps = NULL; -} - -static void -facebook_protocol_xfer_iface_init(PurpleProtocolXferIface *xfer_iface) -{ - xfer_iface->can_receive = NULL; - xfer_iface->send = NULL; - xfer_iface->new_xfer = NULL; -} - -PURPLE_DEFINE_TYPE_EXTENDED( - FacebookProtocol, facebook_protocol, JABBER_TYPE_PROTOCOL, 0, - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CLIENT_IFACE, - facebook_protocol_client_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_SERVER_IFACE, - facebook_protocol_server_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_CHAT_IFACE, - facebook_protocol_chat_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_PRIVACY_IFACE, - facebook_protocol_privacy_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_ROOMLIST_IFACE, - facebook_protocol_roomlist_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_ATTENTION_IFACE, - facebook_protocol_attention_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_MEDIA_IFACE, - facebook_protocol_media_iface_init) - - PURPLE_IMPLEMENT_INTERFACE_STATIC(PURPLE_TYPE_PROTOCOL_XFER_IFACE, - facebook_protocol_xfer_iface_init) -); diff --git a/libpurple/protocols/jabber/facebook.h b/libpurple/protocols/jabber/facebook.h deleted file mode 100644 --- a/libpurple/protocols/jabber/facebook.h +++ /dev/null @@ -1,54 +0,0 @@ -/* purple - * - * Purple is the legal property of its developers, whose names are too numerous - * to list here. Please refer to the COPYRIGHT file distributed with this - * source distribution. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA - * - */ -#ifndef _FACEBOOK_H_ -#define _FACEBOOK_H_ - -#include "jabber.h" - -#define FACEBOOK_TYPE_PROTOCOL (facebook_protocol_get_type()) -#define FACEBOOK_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), FACEBOOK_TYPE_PROTOCOL, FacebookProtocol)) -#define FACEBOOK_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), FACEBOOK_TYPE_PROTOCOL, FacebookProtocolClass)) -#define FACEBOOK_IS_PROTOCOL(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), FACEBOOK_TYPE_PROTOCOL)) -#define FACEBOOK_IS_PROTOCOL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), FACEBOOK_TYPE_PROTOCOL)) -#define FACEBOOK_PROTOCOL_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), FACEBOOK_TYPE_PROTOCOL, FacebookProtocolClass)) - -typedef struct _FacebookProtocol -{ - JabberProtocol parent; -} FacebookProtocol; - -typedef struct _FacebookProtocolClass -{ - JabberProtocolClass parent_class; -} FacebookProtocolClass; - -/** - * Registers the FacebookProtocol type in the type system. - */ -void facebook_protocol_register_type(PurplePlugin *plugin); - -/** - * Returns the GType for the FacebookProtocol object. - */