xine-lib 1.2.11
Data Structures | Macros | Functions
input_ftp.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <unistd.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/input_plugin.h>
#include "group_network.h"
#include "http_helper.h"
#include "input_helper.h"
#include "net_buf_ctrl.h"
#include "tls/xine_tls.h"

Data Structures

struct  ftp_input_plugin_t
 
struct  ftp_input_class_t
 

Macros

#define LOG_MODULE   "input_ftp"
 
#define LOG_VERBOSE
 
#define DEFAULT_FTP_PORT   21
 

Functions

static int _read_response (ftp_input_plugin_t *this)
 
static int _write_command (ftp_input_plugin_t *this, const char *cmd)
 
static int _send_command (ftp_input_plugin_t *this, const char *cmd)
 
static int _auth_tls (ftp_input_plugin_t *this, const char *host)
 
static int _connect (ftp_input_plugin_t *this, int *fd, const char *host, int port)
 
static int _login (ftp_input_plugin_t *this, const char *user, const char *pass)
 
static int _ftp_connect (ftp_input_plugin_t *this, xine_url_t *url)
 
static int _connect_data (ftp_input_plugin_t *this, char type)
 
static int _cwd (ftp_input_plugin_t *this, const char *dir)
 
static int _list (ftp_input_plugin_t *this)
 
static off_t _parse_off_t (const char *pt)
 
static int _ftp_size (ftp_input_plugin_t *this, const char *uri)
 
static int _abor (ftp_input_plugin_t *this)
 
static int _rest (ftp_input_plugin_t *this, off_t offset)
 
static int _retr (ftp_input_plugin_t *this, const char *uri, off_t offset)
 
static off_t _ftp_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
 
static off_t _ftp_get_length (input_plugin_t *this_gen)
 
static off_t _ftp_get_current_pos (input_plugin_t *this_gen)
 
static off_t _ftp_seek (input_plugin_t *this_gen, off_t offset, int origin)
 
static const char * _ftp_get_mrl (input_plugin_t *this_gen)
 
static int _ftp_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
 
static void _ftp_dispose (input_plugin_t *this_gen)
 
static int _fill_preview (ftp_input_plugin_t *this)
 
static int _ftp_open (input_plugin_t *this_gen)
 
static uint32_t _ftp_get_capabilities (input_plugin_t *this_gen)
 
static input_plugin_t_get_instance (input_class_t *cls_gen, xine_stream_t *stream, const char *mrl)
 
static xine_mrl_t ** _get_files (ftp_input_plugin_t *this, const char *uri, int *nFiles)
 
static xine_mrl_t ** _get_dir_common (input_class_t *this_gen, const char *filename, int *nFiles)
 
static xine_mrl_t ** _get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
 
static xine_mrl_t ** _get_dir_es (input_class_t *this_gen, const char *filename, int *nFiles)
 
static void _dispose_class (input_class_t *this_gen)
 
void * input_ftp_init_class (xine_t *xine, const void *data)
 
void * input_ftpes_init_class (xine_t *xine, const void *data)
 

Macro Definition Documentation

◆ DEFAULT_FTP_PORT

#define DEFAULT_FTP_PORT   21

◆ LOG_MODULE

#define LOG_MODULE   "input_ftp"

◆ LOG_VERBOSE

#define LOG_VERBOSE

Function Documentation

◆ _abor()

static int _abor ( ftp_input_plugin_t this)
static

◆ _auth_tls()

static int _auth_tls ( ftp_input_plugin_t this,
const char *  host 
)
static

References _send_command(), and _x_tls_handshake().

Referenced by _ftp_connect().

◆ _connect()

static int _connect ( ftp_input_plugin_t this,
int *  fd,
const char *  host,
int  port 
)
static

◆ _connect_data()

static int _connect_data ( ftp_input_plugin_t this,
char  type 
)
static

◆ _cwd()

static int _cwd ( ftp_input_plugin_t this,
const char *  dir 
)
static

◆ _dispose_class()

static void _dispose_class ( input_class_t this_gen)
static

◆ _fill_preview()

static int _fill_preview ( ftp_input_plugin_t this)
static

References _ftp_read(), LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _ftp_open().

◆ _ftp_connect()

static int _ftp_connect ( ftp_input_plugin_t this,
xine_url_t url 
)
static

◆ _ftp_dispose()

static void _ftp_dispose ( input_plugin_t this_gen)
static

◆ _ftp_get_capabilities()

static uint32_t _ftp_get_capabilities ( input_plugin_t this_gen)
static

◆ _ftp_get_current_pos()

static off_t _ftp_get_current_pos ( input_plugin_t this_gen)
static

Referenced by _get_instance().

◆ _ftp_get_length()

static off_t _ftp_get_length ( input_plugin_t this_gen)
static

Referenced by _get_instance().

◆ _ftp_get_mrl()

static const char * _ftp_get_mrl ( input_plugin_t this_gen)
static

Referenced by _get_instance().

◆ _ftp_get_optional_data()

static int _ftp_get_optional_data ( input_plugin_t this_gen,
void *  data,
int  data_type 
)
static

◆ _ftp_open()

static int _ftp_open ( input_plugin_t this_gen)
static

◆ _ftp_read()

static off_t _ftp_read ( input_plugin_t this_gen,
void *  buf_gen,
off_t  len 
)
static

◆ _ftp_seek()

static off_t _ftp_seek ( input_plugin_t this_gen,
off_t  offset,
int  origin 
)
static

◆ _ftp_size()

static int _ftp_size ( ftp_input_plugin_t this,
const char *  uri 
)
static

◆ _get_dir()

static xine_mrl_t ** _get_dir ( input_class_t this_gen,
const char *  filename,
int *  nFiles 
)
static

◆ _get_dir_common()

static xine_mrl_t ** _get_dir_common ( input_class_t this_gen,
const char *  filename,
int *  nFiles 
)
static

◆ _get_dir_es()

static xine_mrl_t ** _get_dir_es ( input_class_t this_gen,
const char *  filename,
int *  nFiles 
)
static

◆ _get_files()

static xine_mrl_t ** _get_files ( ftp_input_plugin_t this,
const char *  uri,
int *  nFiles 
)
static

◆ _get_instance()

static input_plugin_t * _get_instance ( input_class_t cls_gen,
xine_stream_t stream,
const char *  mrl 
)
static

◆ _list()

static int _list ( ftp_input_plugin_t this)
static

◆ _login()

static int _login ( ftp_input_plugin_t this,
const char *  user,
const char *  pass 
)
static

◆ _parse_off_t()

static off_t _parse_off_t ( const char *  pt)
static

Referenced by _ftp_size(), and _retr().

◆ _read_response()

static int _read_response ( ftp_input_plugin_t this)
static

References _x_tls_read_line(), and lprintf.

Referenced by _abor(), _ftp_connect(), and _send_command().

◆ _rest()

static int _rest ( ftp_input_plugin_t this,
off_t  offset 
)
static

References _send_command(), and _x_asprintf().

Referenced by _retr().

◆ _retr()

static int _retr ( ftp_input_plugin_t this,
const char *  uri,
off_t  offset 
)
static

◆ _send_command()

static int _send_command ( ftp_input_plugin_t this,
const char *  cmd 
)
static

◆ _write_command()

static int _write_command ( ftp_input_plugin_t this,
const char *  cmd 
)
static

◆ input_ftp_init_class()

void * input_ftp_init_class ( xine_t xine,
const void *  data 
)

◆ input_ftpes_init_class()

void * input_ftpes_init_class ( xine_t xine,
const void *  data 
)