#include <streamingringbuffer.h>
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 |
Definition at line 11 of file streamingringbuffer.h.
| StreamingRingBuffer::StreamingRingBuffer | ( | const QString & | lfilename | ) |
Definition at line 9 of file streamingringbuffer.cpp.
| StreamingRingBuffer::~StreamingRingBuffer | ( | ) | [virtual] |
Definition at line 17 of file streamingringbuffer.cpp.
| 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.
| 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.
URLContext* StreamingRingBuffer::m_context [private] |
Definition at line 31 of file streamingringbuffer.h.
Referenced by GetRealFileSize(), IsOpen(), OpenFile(), safe_read(), Seek(), and ~StreamingRingBuffer().
bool StreamingRingBuffer::m_streamed [private] |
Definition at line 32 of file streamingringbuffer.h.
Referenced by IsStreamed(), and OpenFile().
bool StreamingRingBuffer::m_allowSeeks [private] |
Definition at line 33 of file streamingringbuffer.h.
Referenced by IsSeekingAllowed(), and OpenFile().
1.6.3