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 (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 (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 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...
 
- Public Member Functions inherited from SocketHandler
 SocketHandler (MythSocket *sock, MythSocketManager *parent, QString hostname)
 
 ~SocketHandler ()
 
bool DoesBlockShutdown (void)
 
bool GetsStandardEvents (void)
 
bool GetsSystemEvents (void)
 
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)
 

Private Member Functions

 ~FileTransfer ()
 
 ~FileTransfer ()
 

Private Attributes

volatile bool readthreadlive
 
bool readsLocked
 
QWaitCondition readsUnlockedCond
 
ProgramInfopginfo
 
RingBufferrbuffer
 
bool ateof
 
vector< char > requestBuffer
 
QMutex lock
 
bool writemode
 
MythSocketsock
 

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
 

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 ( )
private

◆ FileTransfer() [3/4]

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

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

◆ FileTransfer() [4/4]

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

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

◆ ~FileTransfer() [2/2]

FileTransfer::~FileTransfer ( )
private

Member Function Documentation

◆ isOpen() [1/2]

bool FileTransfer::isOpen ( void  )

◆ ReOpen() [1/2]

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

◆ Stop() [1/2]

void FileTransfer::Stop ( void  )

◆ Pause() [1/2]

void FileTransfer::Pause ( void  )

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

Referenced by Seek().

◆ Unpause() [1/2]

void FileTransfer::Unpause ( void  )

Definition at line 105 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 ( 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

◆ readthreadlive

volatile bool FileTransfer::readthreadlive
private

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

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

◆ readsLocked

bool FileTransfer::readsLocked
private

◆ readsUnlockedCond

QWaitCondition FileTransfer::readsUnlockedCond
private

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

Referenced by RequestBlock(), and Unpause().

◆ pginfo

ProgramInfo * FileTransfer::pginfo
private

◆ rbuffer

RingBuffer * FileTransfer::rbuffer
private

◆ ateof

bool FileTransfer::ateof
private

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

Referenced by Seek().

◆ requestBuffer

vector< char > FileTransfer::requestBuffer
private

◆ lock

QMutex FileTransfer::lock
private

◆ writemode

bool FileTransfer::writemode
private

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

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

◆ sock

MythSocket* FileTransfer::sock
private

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


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