xine-lib 1.2.11
|
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <libssh2.h>
#include <libssh2_sftp.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/input_plugin.h>
#include "net_buf_ctrl.h"
#include "http_helper.h"
#include "input_helper.h"
Data Structures | |
struct | ssh_input_plugin_t |
struct | sftp_input_class_t |
Macros | |
#define | LOG_MODULE "input_ssh" |
#define | LOG_VERBOSE |
#define | DEFAULT_SSH_PORT 22 |
Functions | |
static int | _wait_socket (ssh_input_plugin_t *this) |
static void | _emit_authentication_request (ssh_input_plugin_t *this) |
static int | _ssh_connect (ssh_input_plugin_t *this, const xine_url_t *url) |
static int | _sftp_session_init (ssh_input_plugin_t *this) |
static int | _scp_channel_init (ssh_input_plugin_t *this, const char *uri) |
static int | _sftp_open (ssh_input_plugin_t *this, const char *uri) |
static off_t | _scp_read (input_plugin_t *this_gen, void *buf_gen, off_t len) |
static off_t | _sftp_read (input_plugin_t *this_gen, void *buf_gen, off_t len) |
static off_t | _scp_get_length (input_plugin_t *this_gen) |
static off_t | _sftp_get_length (input_plugin_t *this_gen) |
static off_t | _get_current_pos (input_plugin_t *this_gen) |
static off_t | _scp_seek (input_plugin_t *this_gen, off_t offset, int origin) |
static off_t | _sftp_seek (input_plugin_t *this_gen, off_t offset, int origin) |
static const char * | _get_mrl (input_plugin_t *this_gen) |
static int | _get_optional_data (input_plugin_t *this_gen, void *data, int data_type) |
static void | _dispose (input_plugin_t *this_gen) |
static int | _scp_fill_preview (ssh_input_plugin_t *this) |
static int | _open_plugin (input_plugin_t *this_gen) |
static input_plugin_t * | _get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl) |
static void * | scp_init_class (xine_t *xine, const void *data) |
static ssh_input_plugin_t * | _open_input (sftp_input_class_t *this, xine_url_t *url, const char *mrl) |
static int | _read_dir (sftp_input_class_t *this, ssh_input_plugin_t *input, const char *mrl, const char *uri, int *nFiles) |
static xine_mrl_t ** | _get_dir (input_class_t *this_gen, const char *filename, int *nFiles) |
static void | _dispose_class_sftp (input_class_t *this_gen) |
static void * | sftp_init_class (xine_t *xine, const void *data) |
Variables | |
const input_info_t | input_info_sftp |
const input_info_t | input_info_scp |
const plugin_info_t xine_plugin_info[] | EXPORTED |
#define DEFAULT_SSH_PORT 22 |
#define LOG_MODULE "input_ssh" |
#define LOG_VERBOSE |
|
static |
References _x_freep(), _x_freep_wipe_string(), _x_io_tcp_close(), nbc_close, and NULL.
Referenced by _get_instance().
|
static |
References _x_input_free_mrls().
Referenced by sftp_init_class().
|
static |
References _x_message(), LOG_MODULE, NULL, XINE_MSG_AUTHENTICATION_NEEDED, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _ssh_connect().
|
static |
Referenced by _get_instance().
|
static |
References _open_input(), _read_dir(), _x_input_free_mrls(), _x_input_get_default_server_mrls(), _x_url_cleanup(), _x_url_parse2(), input(), LOG_MODULE, NULL, xine_url_t::uri, XINE_VERBOSITY_LOG, and xprintf.
Referenced by sftp_init_class().
|
static |
References _dispose(), _get_current_pos(), _get_mrl(), _get_optional_data(), _open_plugin(), _scp_get_length(), _scp_read(), _scp_seek(), _sftp_get_length(), _sftp_read(), _sftp_seek(), _x_input_default_get_blocksize(), _x_input_default_read_block(), _x_input_get_capabilities_preview(), _x_input_get_capabilities_seekable(), _x_mrl_remove_auth(), LOG_MODULE, nbc_init, NULL, xine_stream_s::xine, XINE_VERBOSITY_LOG, and xprintf.
Referenced by scp_init_class(), and sftp_init_class().
|
static |
Referenced by _get_instance().
|
static |
References INPUT_OPTIONAL_DATA_PREVIEW, and INPUT_OPTIONAL_UNSUPPORTED.
Referenced by _get_instance().
|
static |
References _sftp_session_init(), _ssh_connect(), input(), and NULL.
Referenced by _get_dir().
|
static |
References _scp_channel_init(), _scp_fill_preview(), _sftp_get_length(), _sftp_open(), _sftp_session_init(), _ssh_connect(), _x_freep_wipe_string(), _x_message(), _x_url_cleanup(), _x_url_parse2(), NULL, xine_url_t::proto, xine_url_t::uri, and XINE_MSG_GENERAL_WARNING.
Referenced by _get_instance().
|
static |
References _x_asprintf(), _x_input_alloc_mrls(), _x_input_get_show_hidden_files(), _x_input_realloc_mrls(), _x_input_sort_mrls(), input(), LOG_MODULE, xine_mrl_s::mrl, mrl_file, mrl_file_directory, mrl_file_normal, mrl_net, NULL, xine_mrl_s::origin, xine_mrl_s::size, xine_mrl_s::type, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_dir().
|
static |
References _wait_socket(), _x_action_pending(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _open_plugin().
|
static |
References _scp_read(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _open_plugin().
|
static |
Referenced by _get_instance().
|
static |
References _wait_socket(), _x_action_pending(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance(), and _scp_fill_preview().
|
static |
References _x_input_seek_preview().
Referenced by _get_instance().
|
static |
References _x_action_pending(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance(), and _open_plugin().
|
static |
References _wait_socket(), _x_action_pending(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _open_plugin().
|
static |
References _wait_socket(), _x_action_pending(), input_plugin_s::get_length, LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance().
|
static |
References LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _get_instance().
|
static |
References _wait_socket(), _x_action_pending(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.
Referenced by _open_input(), and _open_plugin().
|
static |
References _emit_authentication_request(), _x_action_pending(), _x_asprintf(), _x_io_tcp_connect(), _x_io_tcp_connect_finish(), DEFAULT_SSH_PORT, xine_url_t::host, LOG_MODULE, xine_url_t::password, xine_url_t::port, xine_url_t::user, xine_get_homedir(), XINE_VERBOSITY_LOG, XIO_READY, XIO_TIMEOUT, and xprintf.
Referenced by _open_input(), and _open_plugin().
|
static |
References _x_io_select(), XIO_READ_READY, and XIO_WRITE_READY.
Referenced by _scp_channel_init(), _scp_read(), _sftp_open(), _sftp_read(), and _sftp_session_init().
|
static |
References _get_instance(), input_class_s::get_instance, N_, and NULL.
|
static |
const plugin_info_t xine_plugin_info [] EXPORTED |
const input_info_t input_info_scp |
const input_info_t input_info_sftp |