This feature has more or less been stalkerware since its inception and the
only useful feature that came of it was offline message emulation which isn't
necessary for most networks nowadays.
Testing Done:
Compiled and ran locally.
Reviewed at https://reviews.imfreedom.org/r/322/
/* 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<glib/gi18n-lib.h>
#include"internal.h"
#include"glibcompat.h" /* for purple_g_stat on win32 */
#include<glib/gstdio.h>
#include"debug.h"
#include"enums.h"
#include"image-store.h"
#include"network.h"
#include"notify.h"
#include"prefs.h"
#include"proxy.h"
#include"purple-gio.h"
#include"request.h"
#include"util.h"
#include"xfer.h"
#define FT_INITIAL_BUFFER_SIZE 4096
#define FT_MAX_BUFFER_SIZE 65535
typedefstruct_PurpleXferPrivatePurpleXferPrivate;
staticPurpleXferUiOps*xfer_ui_ops=NULL;
staticGList*xfers;
/* Private data for a file transfer */
struct_PurpleXferPrivate{
PurpleXferTypetype;/* The type of transfer. */
PurpleAccount*account;/* The account. */
char*who;/* The person on the other end of the
transfer. */
char*message;/* A message sent with the request */
char*filename;/* The name sent over the network. */
char*local_filename;/* The name on the local hard drive. */
goffsetsize;/* The size of the file. */
FILE*dest_fp;/* The destination file pointer. */
char*remote_ip;/* The remote IP address. */
guint16local_port;/* The local port. */
guint16remote_port;/* The remote port. */
GSocketConnection*conn;/* The socket connection. */
intfd;/* The socket file descriptor. */
intwatcher;/* Watcher. */
goffsetbytes_sent;/* The number of bytes sent. */
gint64start_time;/* When the transfer of data began. */
gint64end_time;/* When the transfer of data ended. */
size_tcurrent_buffer_size;/* This gradually increases for fast