|
MythTV master
|
#include <libmythprotoserver/sockethandler/filetransfer.h>
Public Member Functions | |
| FileTransfer (QString &filename, MythSocket *remote, MythSocketManager *parent, bool usereadahead, std::chrono::milliseconds timeout) | |
| FileTransfer (QString &filename, MythSocket *remote, MythSocketManager *parent, bool write) | |
| bool | isOpen (void) |
| bool | ReOpen (const QString &newFilename="") |
| void | Stop (void) |
| void | Pause (void) |
| void | Unpause (void) |
| int | RequestBlock (int size) |
| int | WriteBlock (int size) |
| long long | Seek (long long curpos, long long pos, int whence) |
| uint64_t | GetFileSize (void) |
| QString | GetFileName (void) |
| void | SetTimeout (bool fast) |
Public Member Functions inherited from SocketHandler | |
| SocketHandler (MythSocket *sock, MythSocketManager *parent, QString hostname) | |
| ~SocketHandler () override | |
| bool | DoesBlockShutdown (void) const |
| bool | GetsStandardEvents (void) const |
| bool | GetsSystemEvents (void) const |
| QString | GetHostname (void) const |
| MythSocket * | GetSocket (void) const |
| MythSocketManager * | GetParent (void) const |
| bool | WriteStringList (const QStringList &strlist) |
| bool | SendReceiveStringList (QStringList &strlist, uint min_reply_length=0) |
| void | BlockShutdown (bool block) |
| void | AllowStandardEvents (bool allow) |
| void | AllowSystemEvents (bool allow) |
Public Member Functions inherited from ReferenceCounter | |
| ReferenceCounter (const QString &debugName, bool logDebug=true) | |
| Creates reference counter with an initial value of 1. More... | |
| virtual int | IncrRef (void) |
| Increments reference count. More... | |
| virtual int | DecrRef (void) |
| Decrements reference count and deletes on 0. More... | |
Private Member Functions | |
| ~FileTransfer () override | |
Private Attributes | |
| volatile bool | m_readthreadlive {true} |
| bool | m_readsLocked {false} |
| QWaitCondition | m_readsUnlockedCond |
| ProgramInfo * | m_pginfo {nullptr} |
| MythMediaBuffer * | m_rbuffer {nullptr} |
| bool | m_ateof {false} |
| std::vector< char > | m_requestBuffer |
| QMutex | m_lock |
| bool | m_writemode {false} |
Additional Inherited Members | |
Static Public Member Functions inherited from ReferenceCounter | |
| static void | PrintDebug (void) |
| Print out any leaks if that level of debugging is enabled. More... | |
Protected Member Functions inherited from ReferenceCounter | |
| virtual | ~ReferenceCounter (void) |
| Called on destruction, will warn if object deleted with references in place. More... | |
Protected Attributes inherited from ReferenceCounter | |
| bool | m_logDebug |
| This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
| QAtomicInt | m_referenceCount {1} |
Definition at line 18 of file filetransfer.h.
| FileTransfer::FileTransfer | ( | QString & | filename, |
| MythSocket * | remote, | ||
| MythSocketManager * | parent, | ||
| bool | usereadahead, | ||
| std::chrono::milliseconds | timeout | ||
| ) |
Definition at line 12 of file filetransfer.cpp.
| FileTransfer::FileTransfer | ( | QString & | filename, |
| MythSocket * | remote, | ||
| MythSocketManager * | parent, | ||
| bool | write | ||
| ) |
Definition at line 22 of file filetransfer.cpp.
|
overrideprivate |
Definition at line 38 of file filetransfer.cpp.
| QString FileTransfer::GetFileName | ( | void | ) |
Definition at line 255 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
| uint64_t FileTransfer::GetFileSize | ( | void | ) |
Definition at line 247 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleAnnounce(), and FileServerHandler::HandleQueryFileTransfer().
| bool FileTransfer::isOpen | ( | void | ) |
Definition at line 55 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
| void FileTransfer::Pause | ( | void | ) |
Definition at line 89 of file filetransfer.cpp.
Referenced by Seek().
| bool FileTransfer::ReOpen | ( | const QString & | newFilename = "" | ) |
Definition at line 60 of file filetransfer.cpp.
| int FileTransfer::RequestBlock | ( | int | size | ) |
Definition at line 114 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
| long long FileTransfer::Seek | ( | long long | curpos, |
| long long | pos, | ||
| int | whence | ||
| ) |
Definition at line 215 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
| void FileTransfer::SetTimeout | ( | bool | fast | ) |
Definition at line 263 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
| void FileTransfer::Stop | ( | void | ) |
Definition at line 71 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer(), and ~FileTransfer().
| void FileTransfer::Unpause | ( | void | ) |
Definition at line 100 of file filetransfer.cpp.
Referenced by Seek().
| int FileTransfer::WriteBlock | ( | int | size | ) |
Definition at line 154 of file filetransfer.cpp.
Referenced by FileServerHandler::HandleQueryFileTransfer().
Definition at line 53 of file filetransfer.h.
Referenced by Seek().
|
private |
Definition at line 57 of file filetransfer.h.
Referenced by Pause(), RequestBlock(), Stop(), Unpause(), and WriteBlock().
|
private |
Definition at line 51 of file filetransfer.h.
Referenced by FileTransfer(), GetFileSize(), Pause(), RequestBlock(), Seek(), SetTimeout(), Stop(), Unpause(), WriteBlock(), and ~FileTransfer().
|
private |
Definition at line 52 of file filetransfer.h.
Referenced by FileTransfer(), GetFileName(), GetFileSize(), isOpen(), Pause(), ReOpen(), RequestBlock(), Seek(), SetTimeout(), Stop(), Unpause(), WriteBlock(), and ~FileTransfer().
Definition at line 48 of file filetransfer.h.
Referenced by Pause(), RequestBlock(), Stop(), and Unpause().
|
private |
Definition at line 49 of file filetransfer.h.
Referenced by RequestBlock(), and Unpause().
Definition at line 47 of file filetransfer.h.
Referenced by RequestBlock(), Seek(), and Stop().
|
private |
Definition at line 55 of file filetransfer.h.
Referenced by RequestBlock(), and WriteBlock().
Definition at line 59 of file filetransfer.h.
Referenced by ReOpen(), Stop(), and WriteBlock().