1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 09:25:42 +02:00

Added new plugin "xfer" (used by irc plugin for DCC file and chat) (warning: initial commit, not working yet)

This commit is contained in:
Sebastien Helleu
2008-05-04 20:24:20 +02:00
parent ff526c3168
commit e7a16efa0c
55 changed files with 5721 additions and 4206 deletions
+4
View File
@@ -71,3 +71,7 @@ ENDIF(NOT DISABLE_SCRIPTS AND NOT DISABLE_PERL AND NOT DISABLE_PYTHON AND NOT DI
IF(NOT DISABLE_TRIGGER)
ADD_SUBDIRECTORY( trigger )
ENDIF(NOT DISABLE_TRIGGER)
IF(NOT DISABLE_XFER)
ADD_SUBDIRECTORY( xfer )
ENDIF(NOT DISABLE_XFER)
+5 -1
View File
@@ -80,6 +80,10 @@ if PLUGIN_TRIGGER
trigger_dir = trigger
endif
if PLUGIN_XFER
xfer_dir = xfer
endif
SUBDIRS = . $(alias_dir) $(aspell_dir) $(charset_dir) $(debug_dir) \
$(demo_dir) $(fifo_dir) $(irc_dir) $(logger_dir) $(script_dir) \
$(trigger_dir)
$(trigger_dir) $(xfer_dir)
+15 -6
View File
@@ -14,17 +14,26 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(irc MODULE irc.c irc.h irc-buffer.c irc-buffer.h irc-channel.c
irc-channel.h irc-color.c irc-color.h irc-command.c irc-command.h
irc-completion.c irc-completion.h irc-config.c irc-config.h irc-dcc.h
irc-debug.c irc-debug.h irc-display.c irc-display.h irc-input.c irc-input.h
irc-mode.c irc-mode.h irc-nick.c irc-nick.h irc-protocol.c irc-protocol.h
ADD_LIBRARY(irc MODULE
irc.c irc.h
irc-buffer.c irc-buffer.h
irc-channel.c irc-channel.h
irc-color.c irc-color.h
irc-command.c irc-command.h
irc-completion.c irc-completion.h
irc-config.c irc-config.h
irc-dcc.c irc-dcc.h
irc-debug.c irc-debug.h
irc-display.c irc-display.h
irc-input.c irc-input.h
irc-mode.c irc-mode.h
irc-nick.c irc-nick.h
irc-protocol.c irc-protocol.h
irc-server.c irc-server.h)
SET_TARGET_PROPERTIES(irc PROPERTIES PREFIX "")
CHECK_INCLUDE_FILES("regex.h" HAVE_REGEX_H)
CHECK_FUNCTION_EXISTS(regexec HAVE_REGEXEC)
CHECK_FUNCTION_EXISTS(uname HAVE_UNAME)
TARGET_LINK_LIBRARIES(irc)
+2 -3
View File
@@ -34,6 +34,7 @@ irc_la_SOURCES = irc.c \
irc-completion.h \
irc-config.c \
irc-config.h \
irc-dcc.c \
irc-dcc.h \
irc-debug.c \
irc-debug.h \
@@ -50,7 +51,5 @@ irc_la_SOURCES = irc.c \
irc-server.c \
irc-server.h
# irc-dcc.c
irc_la_LDFLAGS = -module
irc_la_LIBADD = $(GNUTLS_LFLAGS)
irc_la_LIBADD = $(IRC_LFLAGS) $(GNUTLS_LFLAGS)
+60 -6
View File
@@ -25,6 +25,9 @@
#include <ctype.h>
#include <sys/time.h>
#include <time.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include "../weechat-plugin.h"
#include "irc.h"
@@ -855,16 +858,29 @@ int
irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
char **argv, char **argv_eol)
{
struct sockaddr_in addr;
socklen_t length;
unsigned long address;
struct t_plugin_infolist *infolist;
struct t_plugin_infolist_item *item;
char plugin_id[128], str_address[128];
IRC_GET_SERVER_CHANNEL(buffer);
if (!ptr_server || !ptr_server->is_connected)
return WEECHAT_RC_ERROR;
/* make compiler happy */
/* make C compiler happy */
(void) data;
(void) argv_eol; // to remove!
if (argc > 1)
{
/* use the local interface, from the server socket */
memset (&addr, 0, sizeof (struct sockaddr_in));
length = sizeof (addr);
getsockname (ptr_server->sock, (struct sockaddr *) &addr, &length);
addr.sin_family = AF_INET;
address = ntohl (addr.sin_addr.s_addr);
/* DCC SEND file */
if (weechat_strcasecmp (argv[1], "send") == 0)
{
@@ -872,8 +888,28 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "dcc send");
}
//irc_dcc_send_request (ptr_server, IRC_DCC_FILE_SEND,
// argv[2], argv_eol[3]);
infolist = weechat_infolist_new ();
if (infolist)
{
item = weechat_infolist_new_item (infolist);
if (item)
{
snprintf (plugin_id, sizeof (plugin_id),
"irc_%x", (unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "file_send");
weechat_infolist_new_var_string (item, "protocol", "dcc");
weechat_infolist_new_var_string (item, "nick", argv[2]);
weechat_infolist_new_var_string (item, "filename", argv_eol[3]);
snprintf (str_address, sizeof (str_address),
"%lu", address);
weechat_infolist_new_var_string (item, "address", str_address);
weechat_hook_signal_send ("xfer_add",
WEECHAT_HOOK_SIGNAL_POINTER,
infolist);
}
weechat_infolist_free (infolist);
}
}
/* DCC CHAT */
else if (weechat_strcasecmp (argv[1], "chat") == 0)
@@ -882,8 +918,26 @@ irc_command_dcc (void *data, struct t_gui_buffer *buffer, int argc,
{
IRC_COMMAND_TOO_FEW_ARGUMENTS(ptr_server->buffer, "dcc chat");
}
//irc_dcc_send_request (ptr_server, IRC_DCC_CHAT_SEND,
// argv[2], NULL);
infolist = weechat_infolist_new ();
if (infolist)
{
item = weechat_infolist_new_item (infolist);
if (item)
{
snprintf (plugin_id, sizeof (plugin_id),
"irc_%x", (unsigned int)ptr_server);
weechat_infolist_new_var_string (item, "plugin_id", plugin_id);
weechat_infolist_new_var_string (item, "type", "chat_send");
weechat_infolist_new_var_string (item, "nick", argv[2]);
snprintf (str_address, sizeof (str_address),
"%lu", address);
weechat_infolist_new_var_string (item, "address", str_address);
weechat_hook_signal_send ("xfer_add",
WEECHAT_HOOK_SIGNAL_POINTER,
infolist);
}
weechat_infolist_free (infolist);
}
}
/* close DCC CHAT */
else if (weechat_strcasecmp (argv[1], "close") == 0)
File diff suppressed because it is too large Load Diff
+1 -14
View File
@@ -57,7 +57,7 @@ enum t_irc_config_server_option
#define IRC_CONFIG_SERVER_DEFAULT_AUTOREJOIN 0
extern char *irc_config_server_option_str[];
extern char *irc_config_server_option_string[];
extern struct t_config_file *irc_config;
extern struct t_config_option *irc_config_look_one_server_buffer;
@@ -82,19 +82,6 @@ extern struct t_config_option *irc_config_network_colors_receive;
extern struct t_config_option *irc_config_network_colors_send;
extern struct t_config_option *irc_config_network_send_unknown_commands;
extern struct t_config_option *irc_config_dcc_auto_accept_files;
extern struct t_config_option *irc_config_dcc_auto_accept_chats;
extern struct t_config_option *irc_config_dcc_timeout;
extern struct t_config_option *irc_config_dcc_blocksize;
extern struct t_config_option *irc_config_dcc_fast_send;
extern struct t_config_option *irc_config_dcc_port_range;
extern struct t_config_option *irc_config_dcc_own_ip;
extern struct t_config_option *irc_config_dcc_download_path;
extern struct t_config_option *irc_config_dcc_upload_path;
extern struct t_config_option *irc_config_dcc_convert_spaces;
extern struct t_config_option *irc_config_dcc_auto_rename;
extern struct t_config_option *irc_config_dcc_auto_resume;
extern struct t_config_option *irc_config_log_auto_log_server;
extern struct t_config_option *irc_config_log_auto_log_channel;
extern struct t_config_option *irc_config_log_auto_log_private;
+13 -1630
View File
File diff suppressed because it is too large Load Diff
+9 -15
View File
@@ -63,20 +63,16 @@ irc_debug_printf (struct t_irc_server *server, int send, int modified,
if (!irc_debug_buffer)
{
/* search for irc debug buffer */
irc_debug_buffer = weechat_buffer_search ("irc", "debug");
irc_debug_buffer = weechat_buffer_new ("irc", "debug",
NULL, NULL,
&irc_debug_buffer_close_cb, NULL);
/* failed to create buffer ? then exit */
if (!irc_debug_buffer)
{
irc_debug_buffer = weechat_buffer_new ("irc", "debug",
NULL, NULL,
&irc_debug_buffer_close_cb, NULL);
/* failed to create buffer ? then exit */
if (!irc_debug_buffer)
return;
weechat_buffer_set (irc_debug_buffer,
"title", _("IRC debug messages"));
}
return;
weechat_buffer_set (irc_debug_buffer,
"title", _("IRC debug messages"));
}
buf = weechat_iconv_to_internal (NULL, message);
@@ -144,8 +140,6 @@ irc_debug_signal_debug_dump_cb (void *data, char *signal, char *type_data,
irc_server_print_log ();
//irc_dcc_print_log ();
weechat_log_printf ("");
weechat_log_printf ("***** End of \"%s\" plugin dump *****",
weechat_plugin->name);
File diff suppressed because it is too large Load Diff
+2
View File
@@ -186,6 +186,8 @@ extern void irc_server_disconnect (struct t_irc_server *server, int reconnect);
extern void irc_server_disconnect_all ();
extern void irc_server_free (struct t_irc_server *server);
extern void irc_server_free_data (struct t_irc_server *server);
extern int irc_server_xfer_send_ready_cb (void *data, char *signal,
char *type_data, void *signal_data);
extern void irc_server_print_log ();
#endif /* irc-server.h */
+3 -33
View File
@@ -22,10 +22,6 @@
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_GNUTLS
#include <gnutls/gnutls.h>
#endif
#include "../weechat-plugin.h"
#include "irc.h"
#include "irc-command.h"
@@ -55,31 +51,6 @@ gnutls_certificate_credentials gnutls_xcred; /* gnutls client credentials */
#endif
/*
* irc_create_directories: create directories for IRC plugin
*/
void
irc_create_directories ()
{
char *weechat_dir, *dir1, *dir2;
/* create DCC download directory */
weechat_dir = weechat_info_get ("weechat_dir");
if (weechat_dir)
{
dir1 = weechat_string_replace (weechat_config_string (irc_config_dcc_download_path),
"~", getenv ("HOME"));
dir2 = weechat_string_replace (dir1, "%h", weechat_dir);
if (dir2)
(void) weechat_mkdir (dir2, 0700);
if (dir1)
free (dir1);
if (dir2)
free (dir2);
}
}
/*
* irc_signal_quit_cb: callback for "quit" signal
*/
@@ -128,14 +99,13 @@ weechat_plugin_init (struct t_weechat_plugin *plugin)
if (irc_config_read () < 0)
return WEECHAT_RC_ERROR;
irc_create_directories ();
irc_command_init ();
/* hook some signals */
irc_debug_init ();
weechat_hook_signal ("quit", &irc_signal_quit_cb, NULL);
weechat_hook_signal ("xfer_send_ready", &irc_server_xfer_send_ready_cb, NULL);
/* hook completions */
irc_completion_init ();
+11 -1
View File
@@ -38,6 +38,7 @@
#include "../core/wee-hook.h"
#include "../core/wee-list.h"
#include "../core/wee-log.h"
#include "../core/wee-network.h"
#include "../core/wee-string.h"
#include "../core/wee-utf8.h"
#include "../core/wee-util.h"
@@ -396,8 +397,17 @@ plugin_load (char *filename)
new_plugin->command = &plugin_api_command;
new_plugin->info_get = &plugin_api_info_get;
new_plugin->network_pass_proxy = &network_pass_proxy;
new_plugin->network_connect_to = &network_connect_to;
new_plugin->info_get = &plugin_api_info_get;
new_plugin->infolist_new = &plugin_infolist_new;
new_plugin->infolist_new_item = &plugin_infolist_new_item;
new_plugin->infolist_new_var_integer = &plugin_infolist_new_var_integer;
new_plugin->infolist_new_var_string = &plugin_infolist_new_var_string;
new_plugin->infolist_new_var_pointer = &plugin_infolist_new_var_pointer;
new_plugin->infolist_new_var_time = &plugin_infolist_new_var_time;
new_plugin->infolist_get = &plugin_api_infolist_get;
new_plugin->infolist_next = &plugin_api_infolist_next;
new_plugin->infolist_prev = &plugin_api_infolist_prev;
+36
View File
@@ -388,11 +388,29 @@ struct t_weechat_plugin
/* command */
void (*command) (struct t_weechat_plugin *plugin,
struct t_gui_buffer *buffer, char *command);
/* network */
int (*network_pass_proxy) (int sock, char *address, int port);
int (*network_connect_to) (int sock, unsigned long address, int port);
/* infos */
char *(*info_get) (struct t_weechat_plugin *plugin, char *info);
/* infolists */
struct t_plugin_infolist *(*infolist_new) ();
struct t_plugin_infolist_item *(*infolist_new_item) (struct t_plugin_infolist *list);
struct t_plugin_infolist_var *(*infolist_new_var_integer) (struct t_plugin_infolist_item *item,
char *name,
int value);
struct t_plugin_infolist_var *(*infolist_new_var_string) (struct t_plugin_infolist_item *item,
char *name,
char *value);
struct t_plugin_infolist_var *(*infolist_new_var_pointer) (struct t_plugin_infolist_item *item,
char *name,
void *pointer);
struct t_plugin_infolist_var *(*infolist_new_var_time) (struct t_plugin_infolist_item *item,
char *name,
time_t time);
struct t_plugin_infolist *(*infolist_get) (char *name, void *pointer,
char *arguments);
int (*infolist_next) (struct t_plugin_infolist *infolist);
@@ -792,11 +810,29 @@ extern int weechat_plugin_end (struct t_weechat_plugin *plugin);
#define weechat_command(__buffer, __command) \
weechat_plugin->command(weechat_plugin, __buffer, __command)
/* network */
#define weechat_network_pass_proxy(__sock, __address, __port) \
weechat_plugin->network_pass_proxy(__sock, __address, __port)
#define weechat_network_connect_to(__sock, __address, __port) \
weechat_plugin->network_connect_to(__sock, __address, __port)
/* infos */
#define weechat_info_get(__name) \
weechat_plugin->info_get(weechat_plugin, __name)
/* infolists */
#define weechat_infolist_new() \
weechat_plugin->infolist_new()
#define weechat_infolist_new_item(__list) \
weechat_plugin->infolist_new_item(__list)
#define weechat_infolist_new_var_integer(__item, __name, __value) \
weechat_plugin->infolist_new_var_integer(__item, __name, __value)
#define weechat_infolist_new_var_string(__item, __name, __value) \
weechat_plugin->infolist_new_var_string(__item, __name, __value)
#define weechat_infolist_new_var_pointer(__item, __name, __pointer) \
weechat_plugin->infolist_new_var_pointer(__item, __name, __pointer)
#define weechat_infolist_new_var_time(__item, __name, __time) \
weechat_plugin->infolist_new_var_time(__item, __name, __time)
#define weechat_infolist_get(__name, __pointer, __arguments) \
weechat_plugin->infolist_get(__name, __pointer, __arguments)
#define weechat_infolist_next(__list) \
+29
View File
@@ -0,0 +1,29 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
ADD_LIBRARY(xfer MODULE
xfer.c xfer.h
xfer-buffer.c xfer-buffer.h
xfer-chat.c xfer-chat.h
xfer-config.c xfer-config.h
xfer-dcc.c xfer-dcc.h
xfer-file.c xfer-file.h
xfer-network.c xfer-network.h)
SET_TARGET_PROPERTIES(xfer PROPERTIES PREFIX "")
TARGET_LINK_LIBRARIES(xfer)
INSTALL(TARGETS xfer LIBRARY DESTINATION lib/${PROJECT_NAME}/plugins)
+39
View File
@@ -0,0 +1,39 @@
# Copyright (c) 2003-2008 FlashCode <flashcode@flashtux.org>
#
# 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 3 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, see <http://www.gnu.org/licenses/>.
#
INCLUDES = -DLOCALEDIR=\"$(datadir)/locale\"
libdir = ${weechat_libdir}/plugins
lib_LTLIBRARIES = xfer.la
xfer_la_SOURCES = xfer.c \
xfer.h \
xfer-buffer.c \
xfer-buffer.h \
xfer-chat.c \
xfer-chat.h \
xfer-config.c \
xfer-config.h \
xfer-dcc.c \
xfer-dcc.h \
xfer-file.c \
xfer-file.h \
xfer-network.c \
xfer-network.h
xfer_la_LDFLAGS = -module
xfer_la_LIBADD = $(XFER_LFLAGS)
File diff suppressed because it is too large Load Diff
+28
View File
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_DISPLAY_H
#define __WEECHAT_XFER_DISPLAY_H 1
extern struct t_gui_buffer *xfer_buffer;
extern void xfer_buffer_open ();
extern void xfer_buffer_refresh (char *hotlist);
#endif /* xfer.h */
File diff suppressed because it is too large Load Diff
+24
View File
@@ -0,0 +1,24 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_CHAT_H
#define __WEECHAT_XFER_CHAT_H 1
#endif /* xfer-chat.h */
File diff suppressed because it is too large Load Diff
+52
View File
@@ -0,0 +1,52 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_CONFIG_H
#define __WEECHAT_XFER_CONFIG_H 1
#define XFER_CONFIG_NAME "xfer"
extern struct t_config_file *xfer_config;
extern struct t_config_option *xfer_config_look_auto_open_buffer;
extern struct t_config_option *xfer_config_color_text;
extern struct t_config_option *xfer_config_color_text_bg;
extern struct t_config_option *xfer_config_color_selected_bg;
extern struct t_config_option *xfer_config_color_status[];
extern struct t_config_option *xfer_config_network_timeout;
extern struct t_config_option *xfer_config_network_blocksize;
extern struct t_config_option *xfer_config_network_fast_send;
extern struct t_config_option *xfer_config_network_port_range;
extern struct t_config_option *xfer_config_network_own_ip;
extern struct t_config_option *xfer_config_file_download_path;
extern struct t_config_option *xfer_config_file_upload_path;
extern struct t_config_option *xfer_config_file_convert_spaces;
extern struct t_config_option *xfer_config_file_auto_rename;
extern struct t_config_option *xfer_config_file_auto_resume;
extern struct t_config_option *xfer_config_file_auto_accept_files;
extern struct t_config_option *xfer_config_file_auto_accept_chats;
extern int xfer_config_init ();
extern int xfer_config_read ();
extern int xfer_config_write ();
#endif /* xfer-config.h */
File diff suppressed because it is too large Load Diff
+26
View File
@@ -0,0 +1,26 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_DCC_H
#define __WEECHAT_XFER_DCC_H 1
extern void xfer_dcc_send_file_child (struct t_xfer *xfer);
extern void xfer_dcc_recv_file_child (struct t_xfer *xfer);
#endif /* xfer-dcc.h */
File diff suppressed because it is too large Load Diff
+27
View File
@@ -0,0 +1,27 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_FILE_H
#define __WEECHAT_XFER_FILE_H 1
extern int xfer_file_resume (struct t_xfer *xfer, char *filename);
extern void xfer_file_find_filename (struct t_xfer *xfer);
extern void xfer_file_calculate_speed (struct t_xfer *xfer, int ended);
#endif /* xfer-file.h */
File diff suppressed because it is too large Load Diff
+30
View File
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2003-2008 by FlashCode <flashcode@flashtux.org>
* See README for License detail, AUTHORS for developers list.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/
#ifndef __WEECHAT_XFER_NETWORK_H
#define __WEECHAT_XFER_NETWORK_H 1
extern int xfer_network_connect (struct t_xfer *xfer);
extern int xfer_network_create_pipe (struct t_xfer *xfer);
extern void xfer_network_write_pipe (struct t_xfer *xfer, int status,
int error);
extern void xfer_network_connect_init (struct t_xfer *xfer);
extern void xfer_network_child_kill (struct t_xfer *xfer);
#endif /* xfer-network.h */
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff