xine-lib: xine-lib-1.2.12/include/xine/io_helper.h File Reference

xine-lib 1.2.12

Macros | Typedefs | Enumerations | Functions
io_helper.h File Reference
`#include "xine_internal.h"`

Go to the source code of this file.

## Macros
#define | XIO_READ_READY 1
#define | XIO_WRITE_READY 2
#define | XIO_READY 0
#define | XIO_ERROR 1
#define | XIO_ABORTED 2
#define | XIO_TIMEOUT 3

## Typedefs
typedef xio_handshake_status_t() | xio_handshake_cb_t(void *userdata, int fd)

## Enumerations
enum | xio_handshake_status_t { XIO_HANDSHAKE_OK = 1 , XIO_HANDSHAKE_TRY_SAME = 2 , XIO_HANDSHAKE_TRY_NEXT = 3 , XIO_HANDSHAKE_INTR = 4 }

## Functions
int | _x_io_select (xine_stream_t *stream, int fd, int state, int timeout_msec) XINE_USED
int | _x_io_tcp_connect (xine_stream_t *stream, const char *host, int port) XINE_USED
int | _x_io_tcp_handshake_connect (xine_stream_t *stream, const char *host, int port, xio_handshake_cb_t *handshake_cb, void *userdata) XINE_USED
int | _x_io_tcp_connect_finish (xine_stream_t *stream, int fd, int timeout_msec) XINE_USED
off_t | _x_io_tcp_read (xine_stream_t *stream, int s, void *buf, off_t todo) XINE_USED
ssize_t | _x_io_tcp_part_read (xine_stream_t *stream, int s, void *buf, size_t min, size_t max) XINE_USED
off_t | _x_io_tcp_write (xine_stream_t *stream, int s, const void *buf, off_t todo) XINE_USED
off_t | _x_io_file_read (xine_stream_t *stream, int fd, void *buf, off_t todo) XINE_USED
off_t | _x_io_file_write (xine_stream_t *stream, int fd, const void *buf, off_t todo) XINE_USED
int | _x_io_tcp_read_line (xine_stream_t *stream, int sock, char *str, int size) XINE_USED
int | _x_io_tcp_close (xine_stream_t *stream, int fd)

## Macro Definition Documentation

## ◆ XIO_ABORTED

#define XIO_ABORTED 2

## ◆ XIO_ERROR

#define XIO_ERROR 1

## ◆ XIO_READ_READY

#define XIO_READ_READY 1

## ◆ XIO_READY

#define XIO_READY 0

## ◆ XIO_TIMEOUT

#define XIO_TIMEOUT 3

## ◆ XIO_WRITE_READY

#define XIO_WRITE_READY 2

## Typedef Documentation

## ◆ xio_handshake_cb_t

typedef xio_handshake_status_t() xio_handshake_cb_t(void *userdata, int fd)

## Enumeration Type Documentation

## ◆ xio_handshake_status_t

enum xio_handshake_status_t

Enumerator
XIO_HANDSHAKE_OK |
XIO_HANDSHAKE_TRY_SAME |
XIO_HANDSHAKE_TRY_NEXT |
XIO_HANDSHAKE_INTR |

## Function Documentation

## ◆ _x_io_file_read()

off_t _x_io_file_read | ( | xine_stream_t * | stream,
|  | int | fd,
|  | void * | buf,
|  | off_t | todo
| ) |  |

References _x_assert, _x_io_select(), IF_EAGAIN, xine_private_t::network_timeout, NULL, xine_stream_s::xine, xio_err(), XIO_READ_READY, and XIO_READY.

## ◆ _x_io_file_write()

off_t _x_io_file_write | ( | xine_stream_t * | stream,
|  | int | fd,
|  | const void * | buf,
|  | off_t | todo
| ) |  |

References _x_assert, _x_io_select(), IF_EAGAIN, xine_private_t::network_timeout, NULL, xine_stream_s::xine, xio_err(), XIO_READY, and XIO_WRITE_READY.

## ◆ _x_io_select()

int _x_io_select | ( | xine_stream_t * | stream,
|  | int | fd,
|  | int | state,
|  | int | timeout_msec
| ) |  |

References _, _x_action_pending(), NULL, xine_stream_s::xine, xine_log(), XINE_LOG_MSG, XIO_ABORTED, XIO_ERROR, XIO_POLLING_INTERVAL, XIO_READ_READY, XIO_READY, XIO_TIMEOUT, and XIO_WRITE_READY.

Referenced by _gnutls_handshake(), _gnutls_part_read(), _gnutls_read(), _gnutls_shutdown(), _gnutls_write(), _wait_socket(), _x_io_file_read(), _x_io_file_write(), _x_io_tcp_connect_finish(), _x_io_tcp_handshake_connect(), _x_io_tcp_part_read(), _x_io_tcp_read(), _x_io_tcp_write(), file_input_read(), hls_live_wait(), http_plugin_handshake(), mms_tcp_connect(), mmsh_tcp_connect(), mpd_set_frag_index(), and stdin_plugin_wait().

## ◆ _x_io_tcp_close()

int _x_io_tcp_close | ( | xine_stream_t * | stream,
|  | int | fd
| ) |  |

References sock_errno, sock_strerror, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by _abor(), _cdda_cddb_socket_close(), _dispose(), _ftp_connect(), _ftp_dispose(), _x_io_tcp_handshake_connect(), _x_tls_close(), _x_tls_connect(), get_media_packet(), http_close(), http_restart(), mms_close(), mms_connect(), mmsh_close(), mmsh_connect(), mmsh_connect_int(), pnm_close(), and rtsp_close().

## ◆ _x_io_tcp_connect()

int _x_io_tcp_connect | ( | xine_stream_t * | stream,
|  | const char * | host,
|  | int | port
| ) |  |

References _x_io_tcp_handshake_connect(), and NULL.

Referenced by _cdda_cddb_socket_open(), _connect(), _ssh_connect(), _x_tls_connect(), mms_tcp_connect(), mmsh_tcp_connect(), network_connect(), pnm_connect(), and rtsp_connect().

## ◆ _x_io_tcp_connect_finish()

int _x_io_tcp_connect_finish | ( | xine_stream_t * | stream,
|  | int | fd,
|  | int | timeout_msec
| ) |  |

References _, _x_io_select(), _x_message(), NULL, sock_errno, sock_strerror, xine_stream_s::xine, XINE_MSG_CONNECTION_REFUSED, XINE_VERBOSITY_DEBUG, XIO_ERROR, XIO_READY, XIO_WRITE_READY, and xprintf.

Referenced by _cdda_cddb_socket_open(), _connect(), and _ssh_connect().

## ◆ _x_io_tcp_handshake_connect()

int _x_io_tcp_handshake_connect | ( | xine_stream_t * | stream,
|  | const char * | host,
|  | int | port,
|  | xio_handshake_cb_t * | handshake_cb,
|  | void * | userdata
| ) |  |

References _x_io_select(), _x_io_tcp_close(), _x_message(), xine_private_t::ip_pref, xine_private_t::network_timeout, NULL, reportIP(), SOCK_EINPROGRESS, sock_errno, sock_strerror, xine_private_t::x, xine_stream_s::xine, XINE_MSG_CONNECTION_REFUSED, XINE_MSG_UNKNOWN_HOST, xine_socket_cloexec(), xine_uint32_2str(), XINE_VERBOSITY_DEBUG, XIO_ABORTED, XIO_HANDSHAKE_INTR, XIO_HANDSHAKE_OK, XIO_HANDSHAKE_TRY_NEXT, XIO_HANDSHAKE_TRY_SAME, XIO_READY, XIO_WRITE_READY, and xprintf.

Referenced by _x_io_tcp_connect(), and http_plugin_open().

## ◆ _x_io_tcp_part_read()

ssize_t _x_io_tcp_part_read | ( | xine_stream_t * | stream,
|  | int | s,
|  | void * | buf,
|  | size_t | min,
|  | size_t | max
| ) |  |

References _x_assert, _x_io_select(), IF_EAGAIN, xine_private_t::network_timeout, NULL, xine_stream_s::xine, xio_err(), XIO_READ_READY, XIO_READY, and XIO_TIMEOUT.

Referenced by _x_tls_part_read(), and gnutls_tcp_pull().

## ◆ _x_io_tcp_read()

off_t _x_io_tcp_read | ( | xine_stream_t * | stream,
|  | int | s,
|  | void * | buf,
|  | off_t | todo
| ) |  |

References _x_assert, _x_io_select(), IF_EAGAIN, xine_private_t::network_timeout, NULL, xine_stream_s::xine, xio_err(), XIO_READ_READY, and XIO_READY.

Referenced by _bio_read(), _ftp_read(), _x_io_tcp_read_line(), _x_tls_read(), get_answer(), get_asf_header(), get_chunk_header(), get_header(), get_media_packet(), get_packet_command(), get_packet_header(), gnutls_tcp_pull(), pnm_get_chunk(), pnm_get_headers(), pnm_get_stream_chunk(), rtsp_read_data(), vdr_main_read(), and XINE_FORMAT_PRINTF().

## ◆ _x_io_tcp_read_line()

int _x_io_tcp_read_line | ( | xine_stream_t * | stream,
|  | int | sock,
|  | char * | str,
|  | int | size
| ) |  |

References _x_io_tcp_read().

Referenced by _cdda_cddb_socket_read(), _get_files(), _x_tls_read_line(), rtsp_get(), and XINE_FORMAT_PRINTF().

## ◆ _x_io_tcp_write()

off_t _x_io_tcp_write | ( | xine_stream_t * | stream,
|  | int | s,
|  | const void * | buf,
|  | off_t | todo
| ) |  |

References _x_assert, _x_io_select(), IF_EAGAIN, xine_private_t::network_timeout, NULL, xine_stream_s::xine, xio_err(), XIO_READY, and XIO_WRITE_READY.

Referenced by _bio_write(), _cdda_cddb_send_command(), _x_tls_write(), gnutls_tcp_push(), pnm_get_stream_chunk(), pnm_send_request(), pnm_send_response(), rtsp_put(), send_command(), and XINE_FORMAT_PRINTF().