MythTV  0.26-pre
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
RemoteFile Class Reference

#include <remotefile.h>

List of all members.

Public Member Functions

 RemoteFile (const QString &url="", bool write=false, bool usereadahead=true, int timeout_ms=2000, const QStringList *possibleAuxiliaryFiles=NULL)
 ~RemoteFile ()
bool Open ()
bool ReOpen (QString newFilename)
void Close (void)
long long Seek (long long pos, int whence, long long curpos=-1)
int Write (const void *data, int size)
int Read (void *data, int size)
void Reset (void)
bool SaveAs (QByteArray &data)
void SetURL (const QString &url)
void SetTimeout (bool fast)
bool isOpen (void) const
long long GetFileSize (void) const
const MythSocketgetSocket (void) const
MythSocketgetSocket (void)
QStringList GetAuxiliaryFiles (void) const

Static Public Member Functions

static bool DeleteFile (const QString &url)
static bool Exists (const QString &url, struct stat *fileinfo)
static bool Exists (const QString &url)
static QString GetFileHash (const QString &url)
static QDateTime LastModified (const QString &url)

Private Member Functions

MythSocketopenSocket (bool control)

Private Attributes

QString path
bool usereadahead
int timeout_ms
long long filesize
bool timeoutisfast
long long readposition
int recordernum
QMutex lock
MythSocketcontrolSock
MythSocketsock
QString query
bool writemode
QStringList possibleauxfiles
QStringList auxfiles

Detailed Description

Definition at line 14 of file remotefile.h.


Constructor & Destructor Documentation

RemoteFile::RemoteFile ( const QString &  url = "",
bool  write = false,
bool  usereadahead = true,
int  timeout_ms = 2000,
const QStringList *  possibleAuxiliaryFiles = NULL 
)

Definition at line 14 of file remotefile.cpp.

Definition at line 40 of file remotefile.cpp.


Member Function Documentation

bool RemoteFile::ReOpen ( QString  newFilename)

Definition at line 198 of file remotefile.cpp.

Referenced by FileRingBuffer::ReOpen().

long long RemoteFile::Seek ( long long  pos,
int  whence,
long long  curpos = -1 
)
bool RemoteFile::DeleteFile ( const QString &  url) [static]
bool RemoteFile::Exists ( const QString &  url,
struct stat *  fileinfo 
) [static]
bool RemoteFile::Exists ( const QString &  url) [static]

Definition at line 286 of file remotefile.cpp.

QString RemoteFile::GetFileHash ( const QString &  url) [static]

Definition at line 345 of file remotefile.cpp.

Referenced by UpdateHashes(), and VideoMetadata::VideoFileHash().

QDateTime RemoteFile::LastModified ( const QString &  url) [static]

Definition at line 672 of file remotefile.cpp.

Referenced by MythUIHelper::LoadCacheImage().

int RemoteFile::Write ( const void data,
int  size 
)
int RemoteFile::Read ( void data,
int  size 
)

Definition at line 525 of file remotefile.cpp.

Referenced by MusicSGIODevice::readData(), FileRingBuffer::safe_read(), and SaveAs().

Definition at line 373 of file remotefile.cpp.

Referenced by Seek().

bool RemoteFile::SaveAs ( QByteArray &  data)
void RemoteFile::SetURL ( const QString &  url) [inline]

Definition at line 42 of file remotefile.h.

Definition at line 643 of file remotefile.cpp.

bool RemoteFile::isOpen ( void  ) const [inline]
long long RemoteFile::GetFileSize ( void  ) const [inline]
const MythSocket* RemoteFile::getSocket ( void  ) const [inline]

Definition at line 50 of file remotefile.h.

Definition at line 52 of file remotefile.h.

QStringList RemoteFile::GetAuxiliaryFiles ( void  ) const [inline]

Definition at line 55 of file remotefile.h.

Referenced by FileRingBuffer::OpenFile().

MythSocket * RemoteFile::openSocket ( bool  control) [private]

Definition at line 49 of file remotefile.cpp.

Referenced by Open().


Member Data Documentation

QString RemoteFile::path [private]

Definition at line 61 of file remotefile.h.

Referenced by openSocket(), and RemoteFile().

Definition at line 62 of file remotefile.h.

Referenced by openSocket(), and RemoteFile().

Definition at line 63 of file remotefile.h.

Referenced by openSocket(), and RemoteFile().

long long RemoteFile::filesize [private]

Definition at line 64 of file remotefile.h.

Referenced by openSocket(), and SaveAs().

Definition at line 65 of file remotefile.h.

Referenced by SetTimeout().

long long RemoteFile::readposition [private]

Definition at line 66 of file remotefile.h.

Referenced by Seek().

Definition at line 67 of file remotefile.h.

Referenced by Close(), openSocket(), Read(), ReOpen(), Seek(), SetTimeout(), and Write().

QMutex RemoteFile::lock [mutable, private]

Definition at line 69 of file remotefile.h.

Referenced by Close(), Open(), Read(), ReOpen(), Reset(), Seek(), SetTimeout(), and Write().

Definition at line 70 of file remotefile.h.

Referenced by Close(), Open(), Read(), ReOpen(), Seek(), SetTimeout(), Write(), and ~RemoteFile().

Definition at line 71 of file remotefile.h.

Referenced by Close(), Open(), Read(), ReOpen(), Reset(), Seek(), SetTimeout(), Write(), and ~RemoteFile().

QString RemoteFile::query [private]

Definition at line 72 of file remotefile.h.

Referenced by Close(), Read(), ReOpen(), Seek(), SetTimeout(), and Write().

Definition at line 74 of file remotefile.h.

Referenced by openSocket(), RemoteFile(), and Write().

QStringList RemoteFile::possibleauxfiles [private]

Definition at line 76 of file remotefile.h.

Referenced by openSocket(), and RemoteFile().

QStringList RemoteFile::auxfiles [private]

Definition at line 77 of file remotefile.h.

Referenced by openSocket().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends