/pidgin/main: 3dcb9b9b7c11: Drop libgadu legacy API compatibilit...
Tomasz Wasilczyk <[email protected]>
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: 3dcb9b9b7c11f610ab1ec968bb7574548af77ce9 Author: Tomasz Wasilczyk <[email protected]> Date: 2014-06-18 11:40 +0200 Branch: default URL: https://hg.pidgin.im/pidgin/main/rev/3dcb9b9b7c11 Description: Drop libgadu legacy API compatibility code diffstat: libpurple/protocols/gg/Makefile.am | 2 - libpurple/protocols/gg/Makefile.mingw | 1 - libpurple/protocols/gg/account.c | 6 -- libpurple/protocols/gg/chat.c | 12 ----- libpurple/protocols/gg/chat.h | 2 - libpurple/protocols/gg/deprecated.c | 67 --------------------------------- libpurple/protocols/gg/deprecated.h | 37 ------------------ libpurple/protocols/gg/gg.c | 45 ---------------------- libpurple/protocols/gg/gg.h | 6 -- libpurple/protocols/gg/libgadu-events.c | 2 - libpurple/protocols/gg/libgadu-events.h | 2 - libpurple/protocols/gg/libgaduw.c | 10 +--- libpurple/protocols/gg/message-prpl.c | 27 +----------- libpurple/protocols/gg/status.c | 6 -- libpurple/protocols/gg/tcpsocket.c | 11 ----- 15 files changed, 6 insertions(+), 230 deletions(-) diffs (truncated from 603 to 300 lines): diff --git a/libpurple/protocols/gg/Makefile.am b/libpurple/protocols/gg/Makefile.am --- a/libpurple/protocols/gg/Makefile.am +++ b/libpurple/protocols/gg/Makefile.am @@ -67,8 +67,6 @@ GGSOURCES = \ blist.h \ chat.c \ chat.h \ - deprecated.c \ - deprecated.h \ edisc.c \ edisc.h \ gg.c \ diff --git a/libpurple/protocols/gg/Makefile.mingw b/libpurple/protocols/gg/Makefile.mingw --- a/libpurple/protocols/gg/Makefile.mingw +++ b/libpurple/protocols/gg/Makefile.mingw @@ -49,7 +49,6 @@ C_SRC = \ avatar.c \ blist.c \ chat.c \ - deprecated.c \ edisc.c \ gg.c \ html.c \ diff --git a/libpurple/protocols/gg/account.c b/libpurple/protocols/gg/account.c --- a/libpurple/protocols/gg/account.c +++ b/libpurple/protocols/gg/account.c @@ -32,7 +32,6 @@ #include <libgadu.h> #include <debug.h> -#include "deprecated.h" #include "purplew.h" #include "utils.h" #include "libgaduw.h" @@ -72,11 +71,6 @@ void ggp_account_token_request(PurpleCon purple_debug_info("gg", "ggp_account_token_request: " "requesting token...\n"); - if (!ggp_deprecated_setup_proxy(gc)) { - callback(gc, NULL, user_data); - return; - } - h = gg_token(TRUE); if (!h) { diff --git a/libpurple/protocols/gg/chat.c b/libpurple/protocols/gg/chat.c --- a/libpurple/protocols/gg/chat.c +++ b/libpurple/protocols/gg/chat.c @@ -33,8 +33,6 @@ #include "utils.h" #include "message-prpl.h" -#if GGP_ENABLE_GG11 - typedef struct _ggp_chat_local_info ggp_chat_local_info; struct _ggp_chat_session_data @@ -611,13 +609,3 @@ PurpleRoomlist * ggp_chat_roomlist_get_l purple_timeout_add(1, ggp_chat_roomlist_get_list_finish, roomlist); return roomlist; } - -#else -void ggp_chat_setup(PurpleConnection *gc) -{ -} - -void ggp_chat_cleanup(PurpleConnection *gc) -{ -} -#endif diff --git a/libpurple/protocols/gg/chat.h b/libpurple/protocols/gg/chat.h --- a/libpurple/protocols/gg/chat.h +++ b/libpurple/protocols/gg/chat.h @@ -38,7 +38,6 @@ typedef struct _ggp_chat_session_data gg void ggp_chat_setup(PurpleConnection *gc); void ggp_chat_cleanup(PurpleConnection *gc); -#if GGP_ENABLE_GG11 void ggp_chat_got_event(PurpleConnection *gc, const struct gg_event *ev); GList * ggp_chat_info(PurpleConnection *gc); @@ -55,6 +54,5 @@ void ggp_chat_got_message(PurpleConnecti const char *message, time_t time, uin_t who); PurpleRoomlist * ggp_chat_roomlist_get_list(PurpleConnection *gc); -#endif #endif /* _GGP_CHAT_H */ diff --git a/libpurple/protocols/gg/deprecated.c b/libpurple/protocols/gg/deprecated.c deleted file mode 100644 --- a/libpurple/protocols/gg/deprecated.c +++ /dev/null @@ -1,67 +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. - * - * Rewritten from scratch during Google Summer of Code 2012 - * by Tomek Wasilczyk (http://www.wasilczyk.pl). - * - * Previously implemented by: - * - Arkadiusz Miskiewicz <[email protected]> - first implementation (2001); - * - Bartosz Oler <[email protected]> - reimplemented during GSoC 2005; - * - Krzysztof Klinikowski <[email protected]> - some parts (2009-2011). - * - * 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 "deprecated.h" - -#include <libgadu.h> - -#include "gg.h" - -gboolean ggp_deprecated_setup_proxy(PurpleConnection *gc) -{ -#if ! GGP_ENABLE_GG11 - PurpleProxyInfo *gpi = purple_proxy_get_setup(purple_connection_get_account(gc)); - - if ((purple_proxy_info_get_proxy_type(gpi) != PURPLE_PROXY_NONE) && - (purple_proxy_info_get_host(gpi) == NULL || - purple_proxy_info_get_port(gpi) <= 0)) - { - gg_proxy_enabled = 0; - purple_notify_error(NULL, NULL, _("Invalid proxy settings"), - _("Either the host name or port number specified for " - "your given proxy type is invalid."), - purple_request_cpar_from_connection(gc)); - return FALSE; - } - - if (purple_proxy_info_get_proxy_type(gpi) == PURPLE_PROXY_NONE) { - gg_proxy_enabled = 0; - return TRUE; - } - - gg_proxy_enabled = 1; - /* TODO: memleak */ - gg_proxy_host = g_strdup(purple_proxy_info_get_host(gpi)); - gg_proxy_port = purple_proxy_info_get_port(gpi); - gg_proxy_username = g_strdup(purple_proxy_info_get_username(gpi)); - gg_proxy_password = g_strdup(purple_proxy_info_get_password(gpi)); -#endif - - return TRUE; -} diff --git a/libpurple/protocols/gg/deprecated.h b/libpurple/protocols/gg/deprecated.h deleted file mode 100644 --- a/libpurple/protocols/gg/deprecated.h +++ /dev/null @@ -1,37 +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. - * - * Rewritten from scratch during Google Summer of Code 2012 - * by Tomek Wasilczyk (http://www.wasilczyk.pl). - * - * Previously implemented by: - * - Arkadiusz Miskiewicz <[email protected]> - first implementation (2001); - * - Bartosz Oler <[email protected]> - reimplemented during GSoC 2005; - * - Krzysztof Klinikowski <[email protected]> - some parts (2009-2011). - * - * 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 _GGP_DEPRECATED_H -#define _GGP_DEPRECATED_H - -#include <internal.h> - -gboolean ggp_deprecated_setup_proxy(PurpleConnection *gc); - -#endif /* _GGP_DEPRECATED_H */ diff --git a/libpurple/protocols/gg/gg.c b/libpurple/protocols/gg/gg.c --- a/libpurple/protocols/gg/gg.c +++ b/libpurple/protocols/gg/gg.c @@ -44,7 +44,6 @@ #include "blist.h" #include "utils.h" #include "resolver-purple.h" -#include "deprecated.h" #include "purplew.h" #include "libgadu-events.h" #include "multilogon.h" @@ -317,12 +316,10 @@ static void ggp_callback_recv(gpointer _ return; } -#if GGP_ENABLE_GG11 if (purple_debug_is_verbose()) { purple_debug_misc("gg", "ggp_callback_recv: got event %s", gg_debug_event(ev->type)); } -#endif purple_input_remove(info->inpa); info->inpa = purple_input_add(info->session->fd, @@ -342,9 +339,7 @@ static void ggp_callback_recv(gpointer _ ggp_message_got(gc, &ev->event.msg); break; case GG_EVENT_ACK: -#if GGP_ENABLE_GG11 case GG_EVENT_ACK110: -#endif break; case GG_EVENT_IMAGE_REPLY: ggp_image_recv(gc, &ev->event.image_reply); @@ -367,11 +362,9 @@ static void ggp_callback_recv(gpointer _ case GG_EVENT_USER_DATA: ggp_events_user_data(gc, &ev->event.user_data); break; -#if GGP_ENABLE_GG11 case GG_EVENT_JSON_EVENT: ggp_events_json(gc, &ev->event.json_event); break; -#endif case GG_EVENT_USERLIST100_VERSION: ggp_roster_version(gc, &ev->event.userlist100_version); break; @@ -384,7 +377,6 @@ static void ggp_callback_recv(gpointer _ case GG_EVENT_MULTILOGON_INFO: ggp_multilogon_info(gc, &ev->event.multilogon_info); break; -#if GGP_ENABLE_GG11 case GG_EVENT_IMTOKEN: purple_debug_info("gg", "gg11: got IMTOKEN\n"); g_free(info->imtoken); @@ -401,7 +393,6 @@ static void ggp_callback_recv(gpointer _ case GG_EVENT_CHAT_INVITE_ACK: ggp_chat_got_event(gc, ev); break; -#endif case GG_EVENT_DISCONNECT: ggp_servconn_remote_disconnect(gc); break; @@ -455,14 +446,12 @@ void ggp_async_login_handler(gpointer _g case GG_STATE_TLS_NEGOTIATION: purple_debug_info("gg", "GG_STATE_TLS_NEGOTIATION\n"); break; -#if GGP_ENABLE_GG11 case GG_STATE_RESOLVING_HUB: purple_debug_info("gg", "GG_STATE_RESOLVING_HUB\n"); break; case GG_STATE_READING_HUB: purple_debug_info("gg", "GG_STATE_READING_HUB\n"); break; -#endif default: purple_debug_error("gg", "unknown state = %d\n", info->session->state); @@ -497,13 +486,11 @@ void ggp_async_login_handler(gpointer _g break; case GG_EVENT_CONN_SUCCESS: { -#if GGP_ENABLE_GG11 purple_debug_info("gg", "GG_EVENT_CONN_SUCCESS:" " successfully connected to %s\n", info->session->connect_host); ggp_servconn_add_server(info->session-> connect_host); -#endif purple_input_remove(info->inpa); info->inpa = purple_input_add(info->session->fd, PURPLE_INPUT_READ, @@ -566,13 +553,11 @@ void ggp_async_login_handler(gpointer _g _("Error connecting to master " "server")); break; -#if GGP_ENABLE_GG11