xine-lib: xine-lib-1.2.13/src/input/input_nfs.c File Reference

xine-lib 1.2.13-20230125hg15249

Data Structures | Macros | Functions | Variables
input_nfs.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <stdint.h>`
`#include <errno.h>`
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <fcntl.h>`
`#include <nfsc/libnfs.h>`
`#include <nfsc/libnfs-raw-mount.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/input_plugin.h>`
`#include "input_helper.h"`

## Data Structures
struct | nfs_input_plugin_t
struct | nfs_input_class_t

## Macros
#define | LOG_MODULE "input_nfs"
#define | LOG_VERBOSE
#define | PLUGIN(ptr) xine_container_of(ptr, nfs_input_plugin_t, input_plugin)
#define | CLASS(ptr) xine_container_of(ptr, nfs_input_class_t, input_class)

## Functions
static int | _parse_url (nfs_input_plugin_t *this, int full)
static int | _mount (nfs_input_plugin_t *this)
static off_t | _read (input_plugin_t *this_gen, void *buf_gen, off_t len)
static off_t | _get_length (input_plugin_t *this_gen)
static off_t | _get_current_pos (input_plugin_t *this_gen)
static off_t | _seek (input_plugin_t *this_gen, off_t offset, int origin)
static const char * | _get_mrl (input_plugin_t *this_gen)
static void | _dispose (input_plugin_t *this_gen)
static int | _open (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_servers (xine_t *xine, int *nFiles)
static xine_mrl_t ** | _get_exports (xine_t *xine, const char *server, int *nFiles)
static int | _is_export (const char *server, const char *path)
static xine_mrl_t ** | _get_files (nfs_input_plugin_t *this, int *nFiles)
static xine_mrl_t ** | _get_dir (input_class_t *this_gen, const char *filename, int *nFiles)
static void | _dispose_class (input_class_t *this_gen)
static void * | nfs_init_class (xine_t *xine, const void *data)

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

## Macro Definition Documentation

## ◆ CLASS

#define CLASS | ( |  | ptr | ) | xine_container_of(ptr, nfs_input_class_t, input_class)

Referenced by _dispose_class(), and _get_dir().

## ◆ LOG_MODULE

#define LOG_MODULE "input_nfs"

Referenced by _get_exports(), _get_files(), _get_length(), _get_servers(), _mount(), _open(), _parse_url(), _read(), and _seek().

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## ◆ PLUGIN

#define PLUGIN | ( |  | ptr | ) | xine_container_of(ptr, nfs_input_plugin_t, input_plugin)

Referenced by _dispose(), _get_current_pos(), _get_dir(), _get_length(), _get_mrl(), _open(), _read(), and _seek().

## Function Documentation

## ◆ _dispose()

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

References _x_freep(), and PLUGIN.

Referenced by _get_instance().

## ◆ _dispose_class()

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

References _x_input_free_mrls(), and CLASS.

Referenced by nfs_init_class().

## ◆ _get_current_pos()

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

References PLUGIN.

Referenced by _get_instance().

## ◆ _get_dir()

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

References _get_exports(), _get_files(), _get_instance(), _get_servers(), _parse_url(), _x_input_free_mrls(), _x_input_sort_mrls(), CLASS, input(), NULL, and PLUGIN.

Referenced by nfs_init_class().

## ◆ _get_exports()

static xine_mrl_t ** _get_exports | ( | xine_t * | xine,
|  | const char * | server,
|  | int * | nFiles )
| static

References _x_asprintf(), _x_input_alloc_mrls(), LOG_MODULE, mrl_file, mrl_file_directory, mrl_net, xine_mrl_s::origin, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_dir().

## ◆ _get_files()

static xine_mrl_t ** _get_files | ( | nfs_input_plugin_t * | this,
|  | int * | nFiles )
| static

References _is_export(), _mount(), _x_asprintf(), _x_input_alloc_mrls(), _x_input_get_show_hidden_files(), _x_input_realloc_mrls(), LOG_MODULE, xine_mrl_s::mrl, mrl_file, mrl_file_blockdev, mrl_file_chardev, mrl_file_directory, mrl_file_normal, mrl_file_symlink, mrl_net, NULL, xine_mrl_s::origin, xine_mrl_s::type, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_dir().

## ◆ _get_instance()

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

References _dispose(), _get_current_pos(), _get_length(), _get_mrl(), _open(), _read(), _seek(), _x_input_default_get_blocksize(), _x_input_default_get_optional_data(), _x_input_default_read_block(), _x_input_get_capabilities_seekable(), NULL, and nfs_input_class_t::xine.

Referenced by _get_dir(), and nfs_init_class().

## ◆ _get_length()

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

References LOG_MODULE, PLUGIN, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_instance().

## ◆ _get_mrl()

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

References PLUGIN.

Referenced by _get_instance().

## ◆ _get_servers()

static xine_mrl_t ** _get_servers | ( | xine_t * | xine,
|  | int * | nFiles )
| static

References _x_asprintf(), _x_input_free_mrls(), _x_input_get_default_server_mrls(), _x_input_realloc_mrls(), xine_s::config, LOG_MODULE, mrl_file, mrl_file_directory, mrl_net, xine_mrl_s::origin, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _get_dir().

## ◆ _is_export()

static int _is_export | ( | const char * | server,
|  | const char * | path )
| static

Referenced by _get_files().

## ◆ _mount()

static int _mount | ( | nfs_input_plugin_t * | this | ) |
| static

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

Referenced by _get_files(), and _open().

## ◆ _open()

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

References _mount(), LOG_MODULE, PLUGIN, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_instance().

## ◆ _parse_url()

static int _parse_url | ( | nfs_input_plugin_t * | this,
|  | int | full )
| static

References LOG_MODULE, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_dir(), and _mount().

## ◆ _read()

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

References _x_action_pending(), LOG_MODULE, PLUGIN, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_instance().

## ◆ _seek()

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

References LOG_MODULE, PLUGIN, XINE_VERBOSITY_LOG, and xprintf.

Referenced by _get_instance().

## ◆ nfs_init_class()

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

References _dispose_class(), _get_dir(), _get_instance(), _x_input_register_show_hidden_files(), xine_s::config, N_, and NULL.

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_INPUT, 18, "NFS", XINE_VERSION_CODE, &input_info_nfs, nfs_init_class },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
nfs_init_class
static void * nfs_init_class(xine_t *xine, const void *data)
Definition input_nfs.c:560
input_info_nfs
static const input_info_t input_info_nfs
Definition input_nfs.c:589
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_nfs

const input_info_t input_info_nfs
| static

Initial value:
= {
.priority = 10,
}