#include <remotefile.h>
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 MythSocket * | getSocket (void) const |
| MythSocket * | getSocket (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 | |
| MythSocket * | openSocket (bool control) |
Private Attributes | |
| QString | path |
| bool | usereadahead |
| int | timeout_ms |
| long long | filesize |
| bool | timeoutisfast |
| long long | readposition |
| int | recordernum |
| QMutex | lock |
| MythSocket * | controlSock |
| MythSocket * | sock |
| QString | query |
| bool | writemode |
| QStringList | possibleauxfiles |
| QStringList | auxfiles |
Definition at line 14 of file remotefile.h.
| 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.
| RemoteFile::~RemoteFile | ( | ) |
Definition at line 40 of file remotefile.cpp.
| bool RemoteFile::Open | ( | void | ) |
Definition at line 179 of file remotefile.cpp.
Referenced by MusicSGIODevice::MusicSGIODevice(), MetadataDownload::readMXML(), MetadataDownload::readNFO(), and RemoteFile().
| bool RemoteFile::ReOpen | ( | QString | newFilename | ) |
Definition at line 198 of file remotefile.cpp.
Referenced by FileRingBuffer::ReOpen().
| void RemoteFile::Close | ( | void | ) |
Definition at line 229 of file remotefile.cpp.
Referenced by Open(), MetadataDownload::readMXML(), MetadataDownload::readNFO(), MusicSGIODevice::~MusicSGIODevice(), and ~RemoteFile().
| long long RemoteFile::Seek | ( | long long | pos, | |
| int | whence, | |||
| long long | curpos = -1 | |||
| ) |
Definition at line 400 of file remotefile.cpp.
Referenced by RingBuffer::ReadDirect(), FileRingBuffer::safe_read(), FileRingBuffer::Seek(), and MusicSGIODevice::seek().
| bool RemoteFile::DeleteFile | ( | const QString & | url | ) | [static] |
Definition at line 258 of file remotefile.cpp.
Referenced by ThemeChooser::customEvent(), NetTree::doDeleteVideo(), NetSearch::doDeleteVideo(), MetadataImageDownload::run(), and transUnlink().
| bool RemoteFile::Exists | ( | const QString & | url, | |
| struct stat * | fileinfo | |||
| ) | [static] |
Definition at line 292 of file remotefile.cpp.
Referenced by ThemeUpdateChecker::checkForUpdate(), RingBuffer::Create(), discover_program_info_type(), NetTree::doDownloadAndPlay(), NetSearch::doDownloadAndPlay(), Exists(), GetFileSize(), MetadataDownload::getMXMLPath(), MetadataDownload::getNFOPath(), mythfile_exists(), mythfile_stat(), MetadataImageDownload::run(), NetSearch::showMenu(), VideoSetupWizard::testHDVideo(), and VideoSetupWizard::testSDVideo().
| 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 | |||
| ) |
Definition at line 440 of file remotefile.cpp.
Referenced by MetadataImageDownload::run(), RingBuffer::Write(), and MusicSGIODevice::writeData().
| int RemoteFile::Read | ( | void * | data, | |
| int | size | |||
| ) |
Definition at line 525 of file remotefile.cpp.
Referenced by MusicSGIODevice::readData(), FileRingBuffer::safe_read(), and SaveAs().
| void RemoteFile::Reset | ( | void | ) |
Definition at line 373 of file remotefile.cpp.
Referenced by Seek().
| bool RemoteFile::SaveAs | ( | QByteArray & | data | ) |
Definition at line 632 of file remotefile.cpp.
Referenced by MythImage::Load(), MythUIHelper::LoadScaleImage(), MythUIHelper::LoadScalePixmap(), MetadataDownload::readMXML(), MetadataDownload::readNFO(), and RemoteFileDownloadThread::run().
| void RemoteFile::SetURL | ( | const QString & | url | ) | [inline] |
Definition at line 42 of file remotefile.h.
| void RemoteFile::SetTimeout | ( | bool | fast | ) |
Definition at line 643 of file remotefile.cpp.
| bool RemoteFile::isOpen | ( | void | ) | const [inline] |
Definition at line 45 of file remotefile.h.
Referenced by FileRingBuffer::FileRingBuffer(), FileRingBuffer::OpenFile(), and MetadataImageDownload::run().
| long long RemoteFile::GetFileSize | ( | void | ) | const [inline] |
Definition at line 47 of file remotefile.h.
Referenced by MusicSGIODevice::bytesAvailable(), FileRingBuffer::GetRealFileSize(), FileRingBuffer::Seek(), and MusicSGIODevice::size().
| const MythSocket* RemoteFile::getSocket | ( | void | ) | const [inline] |
Definition at line 50 of file remotefile.h.
| MythSocket* RemoteFile::getSocket | ( | void | ) | [inline] |
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().
QString RemoteFile::path [private] |
Definition at line 61 of file remotefile.h.
Referenced by openSocket(), and RemoteFile().
bool RemoteFile::usereadahead [private] |
Definition at line 62 of file remotefile.h.
Referenced by openSocket(), and RemoteFile().
int RemoteFile::timeout_ms [private] |
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().
bool RemoteFile::timeoutisfast [private] |
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().
int RemoteFile::recordernum [private] |
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().
MythSocket* RemoteFile::controlSock [private] |
Definition at line 70 of file remotefile.h.
Referenced by Close(), Open(), Read(), ReOpen(), Seek(), SetTimeout(), Write(), and ~RemoteFile().
MythSocket* RemoteFile::sock [private] |
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().
bool RemoteFile::writemode [private] |
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().
1.6.3