StreamingRingBuffer Class Reference

#include <streamingringbuffer.h>

Inheritance diagram for StreamingRingBuffer:
RingBuffer MThread

List of all members.

Public Member Functions

 StreamingRingBuffer (const QString &lfilename)
virtual ~StreamingRingBuffer ()
virtual bool IsOpen (void) const
 Returns true if open for either reading or writing.
virtual long long GetReadPosition (void) const
 Returns how far into the file we have read.
virtual bool OpenFile (const QString &lfilename, uint retry_ms=kDefaultOpenTimeout)
 Opens a file for reading.
virtual long long Seek (long long pos, int whence, bool has_lock)
 Seeks to a particular position in the file.
virtual long long GetRealFileSize (void) const
 Returns the size of the file we are reading/writing, or -1 if the query fails.
virtual bool IsStreamed (void)
virtual bool IsSeekingAllowed (void)
virtual bool IsBookmarkAllowed (void)

Protected Member Functions

virtual int safe_read (void *data, uint sz)

Private Attributes

URLContext * m_context
bool m_streamed
bool m_allowSeeks

Detailed Description

Definition at line 11 of file streamingringbuffer.h.


Constructor & Destructor Documentation

StreamingRingBuffer::StreamingRingBuffer ( const QString &  lfilename  ) 

Definition at line 9 of file streamingringbuffer.cpp.

StreamingRingBuffer::~StreamingRingBuffer (  )  [virtual]

Definition at line 17 of file streamingringbuffer.cpp.


Member Function Documentation

bool StreamingRingBuffer::IsOpen ( void   )  const [virtual]

Returns true if open for either reading or writing.

Implements RingBuffer.

Definition at line 25 of file streamingringbuffer.cpp.

long long StreamingRingBuffer::GetReadPosition ( void   )  const [virtual]

Returns how far into the file we have read.

Implements RingBuffer.

Definition at line 34 of file streamingringbuffer.cpp.

bool StreamingRingBuffer::OpenFile ( const QString &  lfilename,
uint  retry_ms = kDefaultOpenTimeout 
) [virtual]

Opens a file for reading.

Parameters:
lfilename Name of file to read
retry_ms How many ms to retry reading the file after the first try before giving up.

Implements RingBuffer.

Definition at line 39 of file streamingringbuffer.cpp.

Referenced by StreamingRingBuffer().

long long StreamingRingBuffer::Seek ( long long  pos,
int  whence,
bool  has_lock 
) [virtual]

Seeks to a particular position in the file.

Implements RingBuffer.

Definition at line 82 of file streamingringbuffer.cpp.

long long StreamingRingBuffer::GetRealFileSize ( void   )  const [virtual]

Returns the size of the file we are reading/writing, or -1 if the query fails.

Reimplemented from RingBuffer.

Definition at line 106 of file streamingringbuffer.cpp.

virtual bool StreamingRingBuffer::IsStreamed ( void   )  [inline, virtual]

Reimplemented from RingBuffer.

Definition at line 23 of file streamingringbuffer.h.

virtual bool StreamingRingBuffer::IsSeekingAllowed ( void   )  [inline, virtual]

Reimplemented from RingBuffer.

Definition at line 24 of file streamingringbuffer.h.

virtual bool StreamingRingBuffer::IsBookmarkAllowed ( void   )  [inline, virtual]

Reimplemented from RingBuffer.

Definition at line 25 of file streamingringbuffer.h.

int StreamingRingBuffer::safe_read ( void *  data,
uint  sz 
) [protected, virtual]

Implements RingBuffer.

Definition at line 99 of file streamingringbuffer.cpp.


Member Data Documentation

URLContext* StreamingRingBuffer::m_context [private]

Definition at line 32 of file streamingringbuffer.h.

Referenced by IsStreamed(), and OpenFile().

Definition at line 33 of file streamingringbuffer.h.

Referenced by IsSeekingAllowed(), and OpenFile().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends
Generated on Mon May 28 06:42:28 2012 for MythTV by  doxygen 1.6.3