An interface to simplify asynchronously reading a resource_istream
.
More...
#include <openvrml/browser.h>
Public Member Functions |
virtual | ~stream_listener ()=0 throw () |
| Destroy.
|
void | stream_available (const std::string &uri, const std::string &media_type) |
| Called once the stream is available for use.
|
void | data_available (const std::vector< unsigned char > &data) |
| Called when data is available.
|
Detailed Description
An interface to simplify asynchronously reading a resource_istream
.
Constructor & Destructor Documentation
openvrml::stream_listener::~stream_listener |
( |
| ) |
throw () |
|
pure virtual |
Member Function Documentation
void openvrml::stream_listener::stream_available |
( |
const std::string & |
uri, |
|
|
const std::string & |
media_type |
|
) |
| |
Called once the stream is available for use.
This function calls do_stream_available
.
- Parameters
-
[in] | uri | the URI associated with the stream. |
[in] | media_type | the MIME media type for the stream. |
void openvrml::stream_listener::data_available |
( |
const std::vector< unsigned char > & |
data | ) |
|
void openvrml::stream_listener::do_stream_available |
( |
const std::string & |
uri, |
|
|
const std::string & |
media_type |
|
) |
| |
|
privatepure virtual |
Called by stream_available
.
Concrete stream_listeners
must override this function.
- Parameters
-
[in] | uri | the URI associated with the stream. |
[in] | media_type | the MIME media type for the stream. |
void openvrml::stream_listener::do_data_available |
( |
const std::vector< unsigned char > & |
data | ) |
|
|
privatepure virtual |