strigi/src/streams
Strigi::DataEventHandler Class Reference
Handler interface for handling data events. More...
#include <dataeventinputstream.h>
Public Member Functions | |
| virtual | ~DataEventHandler () |
| virtual bool | handleData (const char *data, uint32_t size)=0 |
| virtual void | handleEnd () |
Detailed Description
Handler interface for handling data events.
By passing an implementation of this class to a DataEventInputStream, it will receive the data as it is read from the DataEventInputStream.
See the DataEventInputStream documentation for more information.
Definition at line 37 of file dataeventinputstream.h.
Constructor & Destructor Documentation
| virtual Strigi::DataEventHandler::~DataEventHandler | ( | ) | [inline, virtual] |
Destructor.
Definition at line 40 of file dataeventinputstream.h.
Member Function Documentation
| virtual bool Strigi::DataEventHandler::handleData | ( | const char * | data, | |
| uint32_t | size | |||
| ) | [pure virtual] |
Handle a data event.
Each piece of data from an InputStream attached to a DataEventInputStream will be passed to this function (in order) as it is read from the DataEventInputStream.
When handleEnd is called, it is guaranteed that each element in the input stream has been passed in exactly one call to this function, and that the calls happened in the same order as the the data occurred in the InputStream.
You should not call this function yourself. It forms part of an interface for the use of a DataEventInputStream.
- Parameters:
-
data pointer to the data from the inputstream size the size of the data pointed to by data
- Returns:
truewhen the handler wants to receive more events false when the handler does not want any more events from this stream
| virtual void Strigi::DataEventHandler::handleEnd | ( | ) | [inline, virtual] |
Handle the end of the stream.
This function will be called exactly once, and notifies the DataEventHandler that all the data from the stream has been read and passed in exactly one call to handleData.
Definition at line 71 of file dataeventinputstream.h.
The documentation for this class was generated from the following file:
KDE 4.4 API Reference