xine-lib: xine-lib-1.2.12/src/input/input_smb.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Functions | Variables
input_smb.c File Reference
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/compat.h>`
`#include <xine/input_plugin.h>`
`#include <libsmbclient.h>`
`#include <sys/types.h>`
`#include <errno.h>`

## Data Structures
struct | smb_input_class_t
struct | smb_input_t

## Macros
#define | MAXFILES 65535
#define | S_N 0x0
#define | S_I 0x4
#define | S_F 0x8
#define | S_Z 0xC
#define | CMP 2
#define | LEN 3
#define | ISDIGIT(c) ((unsigned) (c) - '0' <= 9)

## Functions
static uint32_t | smb_plugin_get_capabilities (input_plugin_t *this_gen)
static off_t | smb_plugin_read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static buf_element_t * | smb_plugin_read_block (input_plugin_t *this_gen, fifo_buffer_t *fifo, off_t todo)
static off_t | smb_plugin_seek (input_plugin_t *this_gen, off_t offset, int origin)
static off_t | smb_plugin_get_current_pos (input_plugin_t *this_gen)
static off_t | smb_plugin_get_length (input_plugin_t *this_gen)
static const char * | smb_plugin_get_mrl (input_plugin_t *this_gen)
static uint32_t | smb_plugin_get_blocksize (input_plugin_t *this_gen)
static int | _strverscmp (const char *s1, const char *s2)
static int | _sortfiles_default (const xine_mrl_t *s1, const xine_mrl_t *s2)
static xine_mrl_t ** | smb_class_get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
static int | smb_plugin_get_optional_data (input_plugin_t *this_gen, void *data, int data_type)
static void | smb_plugin_dispose (input_plugin_t *this_gen)
static int | smb_plugin_open (input_plugin_t *this_gen)
static void | smb_class_dispose (input_class_t *this_gen)
static input_plugin_t * | smb_class_get_instance (input_class_t *class_gen, xine_stream_t *stream, const char *mrl)
static void | smb_auth (const char *srv, const char *shr, char *wg, int wglen, char *un, int unlen, char *pw, int pwlen)
static void * | init_input_class (xine_t *xine, const void *data)

## Variables
static const input_info_t | input_info_smb
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ CMP

#define CMP 2

## ◆ ISDIGIT

#define ISDIGIT | ( |  | c | ) | ((unsigned) (c) - '0' <= 9)

## ◆ LEN

#define LEN 3

## ◆ MAXFILES

#define MAXFILES 65535

## ◆ S_F

#define S_F 0x8

## ◆ S_I

#define S_I 0x4

## ◆ S_N

#define S_N 0x0

## ◆ S_Z

#define S_Z 0xC

## Function Documentation

## ◆ _sortfiles_default()

static int _sortfiles_default | ( | const xine_mrl_t * | s1,
|  | const xine_mrl_t * | s2
| ) |  |
| static

References _strverscmp(), and xine_mrl_s::mrl.

Referenced by smb_class_get_dir().

## ◆ _strverscmp()

static int _strverscmp | ( | const char * | s1,
|  | const char * | s2
| ) |  |
| static

References CMP, ISDIGIT, LEN, S_F, S_I, S_N, and S_Z.

Referenced by _sortfiles_default().

## ◆ init_input_class()

static void * init_input_class | ( | xine_t * | xine,
|  | const void * | data
| ) |  |
| static

References input_class_s::description, input_class_s::dispose, input_class_s::eject_media, input_class_s::get_autoplay_list, input_class_s::get_dir, input_class_s::get_instance, input_class_s::identifier, smb_input_class_t::input_class, N_, NULL, smb_auth(), smb_class_dispose(), smb_class_get_dir(), smb_class_get_instance(), xine_s::verbosity, smb_input_class_t::xine, and XINE_VERBOSITY_DEBUG.

## ◆ smb_auth()

static void smb_auth | ( | const char * | srv,
|  | const char * | shr,
|  | char * | wg,
|  | int | wglen,
|  | char * | un,
|  | int | unlen,
|  | char * | pw,
|  | int | pwlen
| ) |  |
| static

Referenced by init_input_class().

## ◆ smb_class_dispose()

static void smb_class_dispose | ( | input_class_t * | this_gen | ) |
| static

References _x_freep(), MRL_ZERO, smb_input_class_t::mrls, and smb_input_class_t::mrls_allocated_entries.

Referenced by init_input_class().

## ◆ smb_class_get_dir()

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

References _sortfiles_default(), _x_asprintf(), _x_freep(), xine_mrl_s::link, MAXFILES, xine_mrl_s::mrl, mrl_file, mrl_file_directory, mrl_file_normal, MRL_ZERO, NULL, xine_mrl_s::origin, xine_mrl_s::size, xine_mrl_s::type, XINE_PATH_MAX, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by init_input_class().

## ◆ smb_class_get_instance()

static input_plugin_t * smb_class_get_instance | ( | input_class_t * | class_gen,
|  | xine_stream_t * | stream,
|  | const char * | mrl
| ) |  |
| static

References NULL, smb_plugin_dispose(), smb_plugin_get_blocksize(), smb_plugin_get_capabilities(), smb_plugin_get_current_pos(), smb_plugin_get_length(), smb_plugin_get_mrl(), smb_plugin_get_optional_data(), smb_plugin_open(), smb_plugin_read(), smb_plugin_read_block(), and smb_plugin_seek().

Referenced by init_input_class().

## ◆ smb_plugin_dispose()

static void smb_plugin_dispose | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_blocksize()

static uint32_t smb_plugin_get_blocksize | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_capabilities()

static uint32_t smb_plugin_get_capabilities | ( | input_plugin_t * | this_gen | ) |
| static

References INPUT_CAP_SEEKABLE.

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_current_pos()

static off_t smb_plugin_get_current_pos | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_length()

static off_t smb_plugin_get_length | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_mrl()

static const char * smb_plugin_get_mrl | ( | input_plugin_t * | this_gen | ) |
| static

Referenced by smb_class_get_instance().

## ◆ smb_plugin_get_optional_data()

static int smb_plugin_get_optional_data | ( | input_plugin_t * | this_gen,
|  | void * | data,
|  | int | data_type
| ) |  |
| static

References INPUT_OPTIONAL_UNSUPPORTED.

Referenced by smb_class_get_instance().

## ◆ smb_plugin_open()

static int smb_plugin_open | ( | input_plugin_t * | this_gen | ) |
| static

References input_plugin_s::input_class, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by smb_class_get_instance().

## ◆ smb_plugin_read()

static off_t smb_plugin_read | ( | input_plugin_t * | this_gen,
|  | void * | buf_gen,
|  | off_t | len
| ) |  |
| static

Referenced by smb_class_get_instance(), and smb_plugin_read_block().

## ◆ smb_plugin_read_block()

static buf_element_t * smb_plugin_read_block | ( | input_plugin_t * | this_gen,
|  | fifo_buffer_t * | fifo,
|  | off_t | todo
| ) |  |
| static

References BUF_DEMUX_BLOCK, fifo_buffer_s::buffer_pool_alloc, buf_element_s::content, buf_element_s::free_buffer, buf_element_s::max_size, buf_element_s::mem, NULL, buf_element_s::size, smb_plugin_read(), and buf_element_s::type.

Referenced by smb_class_get_instance().

## ◆ smb_plugin_seek()

static off_t smb_plugin_seek | ( | input_plugin_t * | this_gen,
|  | off_t | offset,
|  | int | origin
| ) |  |
| static

Referenced by smb_class_get_instance().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT, 18, "smb", XINE_VERSION_CODE, &input_info_smb,
init_input_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
input_info_smb
static const input_info_t input_info_smb
Definition: input_smb.c:548
init_input_class
static void * init_input_class(xine_t *xine, const void *data)
Definition: input_smb.c:513
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_INPUT
#define PLUGIN_INPUT
Definition: xine_plugin.h:30

## ◆ input_info_smb

const input_info_t input_info_smb
| static

Initial value:
= {
.priority = 0,
}