|
ELinks 0.20.0
|
#include <sys/types.h>#include "elinks.h"#include "dialogs/document.h"#include "dialogs/download.h"#include "dialogs/progress.h"#include "intl/libintl.h"#include "mime/mime.h"#include "network/connection.h"#include "network/state.h"#include "protocol/bittorrent/bencoding.h"#include "protocol/bittorrent/bittorrent.h"#include "protocol/bittorrent/common.h"#include "protocol/bittorrent/dialogs.h"#include "protocol/bittorrent/piececache.h"#include "protocol/uri.h"#include "session/download.h"#include "session/session.h"#include "terminal/draw.h"#include "util/conv.h"#include "util/string.h"
Data Structures | |
| struct | bittorrent_download_info |
Macros | |
| #define | BITTORRENT_QUERY_WIDGETS_COUNT 6 |
Functions | |
| static void | done_bittorrent_download_info (struct bittorrent_download_info *info) |
| static struct bittorrent_download_info * | init_bittorrent_download_info (struct bittorrent_meta *meta) |
| static void | add_bittorrent_meta_to_string (struct string *msg, struct bittorrent_meta *meta, struct terminal *term, int add_files) |
| void | set_bittorrent_files_for_deletion (struct download *download) |
| void | set_bittorrent_notify_on_completion (struct download *download, struct terminal *term) |
| void | notify_bittorrent_download_complete (struct bittorrent_connection *bittorrent) |
| widget_handler_status_T | dlg_show_bittorrent_info (struct dialog_data *dlg_data, struct widget_data *widget_data) |
| char * | get_bittorrent_message (struct download *download, struct terminal *term, int wide, int full, const char *separator) |
| void | draw_bittorrent_piece_progress (struct download *download, struct terminal *term, int x, int y, int width, char *text, struct color_pair *color) |
| void | bittorrent_message_dialog (struct session *ses, void *data) |
| static void | abort_bittorrent_download_query (struct dialog_data *dlg_data) |
| static widget_handler_status_T | bittorrent_download (struct dialog_data *dlg_data, struct widget_data *widget_data) |
| The download button handler. | |
| static widget_handler_status_T | tp_show_header (struct dialog_data *dlg_data, struct widget_data *widget_data) |
| static void | bittorrent_query_callback (void *data, struct connection_state state, struct bittorrent_const_string *response) |
| Build a dialog querying the user on how to handle a .torrent file. | |
| void | query_bittorrent_dialog (struct type_query *type_query) |
| #define BITTORRENT_QUERY_WIDGETS_COUNT 6 |
|
static |
|
static |
|
static |
The download button handler.
Basicly it redirects <uri> to bittorrent:<uri> and starts displaying the download.
bittorrent_query_callback() passes this function as a widget_handler_T to add_dlg_button().
| void bittorrent_message_dialog | ( | struct session * | ses, |
| void * | data ) |
|
static |
Build a dialog querying the user on how to handle a .torrent file.
query_bittorrent_dialog() passes this function as a bittorrent_fetch_callback_T to init_bittorrent_fetch().
| widget_handler_status_T dlg_show_bittorrent_info | ( | struct dialog_data * | dlg_data, |
| struct widget_data * | widget_data ) |
|
static |
| void draw_bittorrent_piece_progress | ( | struct download * | download, |
| struct terminal * | term, | ||
| int | x, | ||
| int | y, | ||
| int | width, | ||
| char * | text, | ||
| struct color_pair * | color ) |
| char * get_bittorrent_message | ( | struct download * | download, |
| struct terminal * | term, | ||
| int | wide, | ||
| int | full, | ||
| const char * | separator ) |
|
static |
| void notify_bittorrent_download_complete | ( | struct bittorrent_connection * | bittorrent | ) |
| void query_bittorrent_dialog | ( | struct type_query * | type_query | ) |
| void set_bittorrent_files_for_deletion | ( | struct download * | download | ) |
|