MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
FileTransfer Class Reference

#include <filetransfer.h>

Inheritance diagram for FileTransfer:
Inheritance graph
[legend]
Collaboration diagram for FileTransfer:
Collaboration graph
[legend]

Public Member Functions

 FileTransfer (QString &filename, MythSocket *remote, MythSocketManager *parent, bool usereadahead, int timeout_ms)
 
 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)
 
 FileTransfer (QString &filename, MythSocket *remote, bool usereadahead, int timeout_ms)
 
 FileTransfer (QString &filename, MythSocket *remote, bool write)
 
MythSocketgetSocket ()
 
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)
 
MythSocketGetSocket (void)
 
MythSocketManagerGetParent (void)
 
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
 
 ~FileTransfer () override
 

Private Attributes

volatile bool m_readthreadlive {true}
 
bool m_readsLocked {false}
 
QWaitCondition m_readsUnlockedCond
 
ProgramInfom_pginfo {nullptr}
 
MythMediaBufferm_rbuffer {nullptr}
 
bool m_ateof {false}
 
vector< char > m_requestBuffer
 
QMutex m_lock {QMutex::NonRecursive}
 
bool m_writemode {false}
 
MythSocketm_sock {nullptr}
 

Friends

class QObject
 

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}
 

Detailed Description

Definition at line 21 of file libs/libmythprotoserver/sockethandler/filetransfer.h.

Constructor & Destructor Documentation

◆ FileTransfer() [1/4]

FileTransfer::FileTransfer ( QString &  filename,
MythSocket remote,
MythSocketManager parent,
bool  usereadahead,
int  timeout_ms 
)

◆ FileTransfer() [2/4]

FileTransfer::FileTransfer ( QString &  filename,
MythSocket remote,
MythSocketManager parent,
bool  write 
)

◆ ~FileTransfer() [1/2]

FileTransfer::~FileTransfer ( )
overrideprivate

◆ FileTransfer() [3/4]

FileTransfer::FileTransfer ( QString &  filename,
MythSocket remote,
bool  usereadahead,
int  timeout_ms 
)

Definition at line 13 of file programs/mythbackend/filetransfer.cpp.

◆ FileTransfer() [4/4]

FileTransfer::FileTransfer ( QString &  filename,
MythSocket remote,
bool  write 
)

Definition at line 25 of file programs/mythbackend/filetransfer.cpp.

◆ ~FileTransfer() [2/2]

FileTransfer::~FileTransfer ( )
overrideprivate

Member Function Documentation

◆ isOpen() [1/2]

bool FileTransfer::isOpen ( void  )

◆ ReOpen() [1/2]

bool FileTransfer::ReOpen ( const QString &  newFilename = "")

◆ Stop() [1/2]

void FileTransfer::Stop ( void  )

◆ Pause() [1/2]

void FileTransfer::Pause ( void  )

Definition at line 88 of file libs/libmythprotoserver/sockethandler/filetransfer.cpp.

Referenced by Seek().

◆ Unpause() [1/2]

void FileTransfer::Unpause ( void  )

Definition at line 99 of file libs/libmythprotoserver/sockethandler/filetransfer.cpp.

Referenced by Seek().

◆ RequestBlock() [1/2]

int FileTransfer::RequestBlock ( int  size)

◆ WriteBlock() [1/2]

int FileTransfer::WriteBlock ( int  size)

◆ Seek() [1/2]

long long FileTransfer::Seek ( long long  curpos,
long long  pos,
int  whence 
)

◆ GetFileSize() [1/2]

uint64_t FileTransfer::GetFileSize ( void  )

◆ GetFileName() [1/2]

QString FileTransfer::GetFileName ( void  )

◆ SetTimeout() [1/2]

void FileTransfer::SetTimeout ( bool  fast)

◆ getSocket()

MythSocket* FileTransfer::getSocket ( )
inline

Definition at line 30 of file programs/mythbackend/filetransfer.h.

◆ isOpen() [2/2]

bool FileTransfer::isOpen ( void  )

◆ ReOpen() [2/2]

bool FileTransfer::ReOpen ( const QString &  newFilename = "")

◆ Stop() [2/2]

void FileTransfer::Stop ( void  )

◆ Pause() [2/2]

void FileTransfer::Pause ( void  )

◆ Unpause() [2/2]

void FileTransfer::Unpause ( void  )

◆ RequestBlock() [2/2]

int FileTransfer::RequestBlock ( int  size)

◆ WriteBlock() [2/2]

int FileTransfer::WriteBlock ( int  size)

◆ Seek() [2/2]

long long FileTransfer::Seek ( long long  curpos,
long long  pos,
int  whence 
)

◆ GetFileSize() [2/2]

uint64_t FileTransfer::GetFileSize ( void  )

◆ GetFileName() [2/2]

QString FileTransfer::GetFileName ( void  )

◆ SetTimeout() [2/2]

void FileTransfer::SetTimeout ( bool  fast)

Friends And Related Function Documentation

◆ QObject

friend class QObject
friend

Definition at line 23 of file programs/mythbackend/filetransfer.h.

Member Data Documentation

◆ m_readthreadlive

volatile bool FileTransfer::m_readthreadlive {true}
private

Definition at line 50 of file libs/libmythprotoserver/sockethandler/filetransfer.h.

Referenced by RequestBlock(), Seek(), and Stop().

◆ m_readsLocked

bool FileTransfer::m_readsLocked {false}
private

◆ m_readsUnlockedCond

QWaitCondition FileTransfer::m_readsUnlockedCond
private

Definition at line 52 of file libs/libmythprotoserver/sockethandler/filetransfer.h.

Referenced by RequestBlock(), and Unpause().

◆ m_pginfo

ProgramInfo * FileTransfer::m_pginfo {nullptr}
private

◆ m_rbuffer

MythMediaBuffer * FileTransfer::m_rbuffer {nullptr}
private

◆ m_ateof

bool FileTransfer::m_ateof {false}
private

Definition at line 56 of file libs/libmythprotoserver/sockethandler/filetransfer.h.

Referenced by Seek().

◆ m_requestBuffer

vector< char > FileTransfer::m_requestBuffer
private

◆ m_lock

QMutex FileTransfer::m_lock {QMutex::NonRecursive}
private

◆ m_writemode

bool FileTransfer::m_writemode {false}
private

Definition at line 62 of file libs/libmythprotoserver/sockethandler/filetransfer.h.

Referenced by ReOpen(), Stop(), and WriteBlock().

◆ m_sock

MythSocket* FileTransfer::m_sock {nullptr}
private

Definition at line 58 of file programs/mythbackend/filetransfer.h.


The documentation for this class was generated from the following files: