#include <filehandle.h>
Public Member Functions | |
virtual void | open (UpnpOpenFileMode mode)=0 |
virtual int | read (char *buf, size_t buflen)=0 |
virtual int | write (char *buf, size_t buflen)=0 |
virtual int | seek (off_t offset, int whence)=0 |
virtual void | close ()=0 |
This class is a pure virtual class to act as an interface for file handles used by the webserver.
virtual void cFileHandle::close | ( | ) | [pure virtual] |
Closes the open file
This will close open file handles and frees the memory obtained by it.
Implemented in cLiveReceiver, and cRecordingPlayer.
virtual void cFileHandle::open | ( | UpnpOpenFileMode | mode | ) | [pure virtual] |
Opens the file
Opens the file at the given mode. These can be:
mode | The file mode, i.e. one of the following
|
mode | The file mode, i.e. one of the following
|
Implemented in cLiveReceiver, and cRecordingPlayer.
virtual int cFileHandle::read | ( | char * | buf, | |
size_t | buflen | |||
) | [pure virtual] |
Reads from the file
Reads from the file a certain amount of bytes and stores them in a buffer
buf | The char buffer | |
buflen | The size of the buffer |
buf | The char buffer | |
buflen | The size of the buffer |
Implemented in cLiveReceiver, and cRecordingPlayer.
virtual int cFileHandle::seek | ( | off_t | offset, | |
int | whence | |||
) | [pure virtual] |
Seeks in the file
Seeks in the file where the offset is the relativ position depending on the second parameter. This means, in case of
offset | The byte offset in the file | |
whence | one of the following
|
offset | The byte offset in the file | |
whence | one of the following
|
Implemented in cLiveReceiver, and cRecordingPlayer.
virtual int cFileHandle::write | ( | char * | buf, | |
size_t | buflen | |||
) | [pure virtual] |
Writes to the file
Writes to the file a certain amount of bytes which are stored in a buffer
buf | The char buffer | |
buflen | The size of the buffer |
buf | The char buffer | |
buflen | The size of the buffer |
Implemented in cLiveReceiver, and cRecordingPlayer.