file.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <mvp_refmem.h>
#include <sys/socket.h>
#include <cmyth.h>
#include <cmyth_local.h>

Go to the source code of this file.

Functions

static void cmyth_file_destroy (cmyth_file_t file)
void cmyth_file_set_closed_callback (cmyth_file_t file, void(*callback)(cmyth_file_t))
cmyth_file_t cmyth_file_create (cmyth_conn_t control)
cmyth_conn_t cmyth_file_data (cmyth_file_t file)
cmyth_conn_t cmyth_file_control (cmyth_file_t file)
unsigned long long cmyth_file_start (cmyth_file_t file)
unsigned long long cmyth_file_length (cmyth_file_t file)
int cmyth_file_get_block (cmyth_file_t file, char *buf, unsigned long len)
int cmyth_file_select (cmyth_file_t file, struct timeval *timeout)
int cmyth_file_request_block (cmyth_file_t file, unsigned long len)
long long cmyth_file_seek (cmyth_file_t file, long long offset, int whence)


Function Documentation

cmyth_conn_t cmyth_file_control cmyth_file_t  file  ) 
 

Definition at line 206 of file file.c.

References cmyth_file::file_control, and ref_hold().

cmyth_file_t cmyth_file_create cmyth_conn_t  control  ) 
 

Definition at line 137 of file file.c.

References cmyth_dbg(), CMYTH_DBG_DEBUG, cmyth_file_destroy(), control, ref_alloc, ref_hold(), and ref_set_destroy().

cmyth_conn_t cmyth_file_data cmyth_file_t  file  ) 
 

Definition at line 177 of file file.c.

References cmyth_file::file_data, and ref_hold().

static void cmyth_file_destroy cmyth_file_t  file  )  [static]
 

Definition at line 44 of file file.c.

References cmyth_file::closed_callback, cmyth_dbg(), CMYTH_DBG_DEBUG, CMYTH_DBG_ERROR, cmyth_rcv_length, cmyth_rcv_long, cmyth_send_message, cmyth_file::file_control, cmyth_file::file_data, cmyth_file::file_id, mutex, and ref_release().

Referenced by cmyth_file_create().

int cmyth_file_get_block cmyth_file_t  file,
char *  buf,
unsigned long  len
 

Definition at line 281 of file file.c.

References cmyth_conn::conn_fd, cmyth_conn::conn_hang, and cmyth_file::file_data.

Referenced by mythtv_read(), and mythtv_seek().

unsigned long long cmyth_file_length cmyth_file_t  file  ) 
 

Definition at line 257 of file file.c.

References cmyth_file::file_length.

Referenced by mythtv_size().

int cmyth_file_request_block cmyth_file_t  file,
unsigned long  len
 

Definition at line 344 of file file.c.

References cmyth_dbg(), CMYTH_DBG_ERROR, cmyth_rcv_length, cmyth_rcv_long, cmyth_send_message, cmyth_conn::conn_tcp_rcvbuf, cmyth_file::file_control, cmyth_file::file_id, cmyth_file::file_pos, and mutex.

Referenced by control_start().

long long cmyth_file_seek cmyth_file_t  file,
long long  offset,
int  whence
 

Definition at line 422 of file file.c.

References cmyth_dbg(), CMYTH_DBG_ERROR, cmyth_rcv_length, cmyth_rcv_long_long, cmyth_send_message, cmyth_file::file_control, cmyth_file::file_id, cmyth_file::file_length, cmyth_file::file_pos, and mutex.

Referenced by mythtv_seek().

int cmyth_file_select cmyth_file_t  file,
struct timeval *  timeout
 

Definition at line 303 of file file.c.

References cmyth_conn::conn_fd, cmyth_conn::conn_hang, fd, and cmyth_file::file_data.

Referenced by mythtv_read(), and mythtv_seek().

void cmyth_file_set_closed_callback cmyth_file_t  file,
void(*)(cmyth_file_t callback
 

Definition at line 112 of file file.c.

References cmyth_file::closed_callback.

Referenced by mythtv_close_just_file().

unsigned long long cmyth_file_start cmyth_file_t  file  ) 
 

Definition at line 233 of file file.c.

References cmyth_file::file_start.


Generated on Fri Sep 10 03:13:22 2010 for mvpmc by  doxygen 1.4.6