sipxmedialib  Version 3.3
Protected Member Functions | Private Attributes | List of all members
StreamBufferDataSource Class Reference

#include <StreamBufferDataSource.h>

Inheritance diagram for StreamBufferDataSource:
Inheritance graph
[legend]
Collaboration diagram for StreamBufferDataSource:
Collaboration graph
[legend]

Public Member Functions

Creators
 StreamBufferDataSource (UtlString *pBuffer, int iFlags)
 
virtual ~StreamBufferDataSource ()
 
Manipulators
virtual OsStatus open ()
 Opens the data source. More...
 
virtual OsStatus close ()
 Closes the data source. More...
 
virtual OsStatus destroyAndDelete ()
 Destroys and deletes the data source object. More...
 
virtual OsStatus read (char *szBuffer, int iLength, int &iLengthRead)
 
virtual OsStatus peek (char *szBuffer, int iLength, int &iLengthRead)
 
virtual OsStatus seek (unsigned int iLocation)
 
Accessors

param iLocation - The desired seek location

virtual OsStatus getLength (int &iLength)
 Gets the length of the stream (if available) More...
 
virtual OsStatus getPosition (int &iPosition)
 Gets the current position within the stream. More...
 
virtual OsStatus toString (UtlString &string)
 Renders a string describing this data source. More...
 
- Public Member Functions inherited from StreamDataSource
 StreamDataSource (int iFlags=0)
 Constructors a StreamDataSource given optional flags. More...
 
virtual ~StreamDataSource ()
 Destructor. More...
 
virtual OsStatus interrupt ()
 Interrupts any time consuming operation. More...
 
void setListener (StreamDataSourceListener *pListener)
 
int getFlags ()
 Gets the flags specified at time of construction. More...
 

Protected Member Functions

StreamBufferDataSourceoperator= (const StreamBufferDataSource &rhs)
 
 StreamBufferDataSource (const StreamBufferDataSource &rStreamBufferDataSource)
 
- Protected Member Functions inherited from StreamDataSource
 StreamDataSource (const StreamDataSource &rStreamDataSource)
 Copy constructor (not supported) More...
 
StreamDataSourceoperator= (const StreamDataSource &rhs)
 Assignment operator (not supported) More...
 
void fireEvent (StreamDataSourceEvent event)
 Fires a data source event to the interested consumer. More...
 

Private Attributes

UtlString * mpBuffer
 
int miPosition
 

Constructor & Destructor Documentation

StreamBufferDataSource ( UtlString *  pBuffer,
int  iFlags 
)
~StreamBufferDataSource ( )
virtual
StreamBufferDataSource ( const StreamBufferDataSource rStreamBufferDataSource)
protected

Member Function Documentation

OsStatus open ( )
virtual

Opens the data source.

Implements StreamDataSource.

OsStatus close ( )
virtual

Closes the data source.

Implements StreamDataSource.

OsStatus destroyAndDelete ( )
virtual

Destroys and deletes the data source object.

Implements StreamDataSource.

OsStatus read ( char *  szBuffer,
int  iLength,
int &  iLengthRead 
)
virtual

Reads iLength bytes of data from the data source and places the data into the passed szBuffer buffer.

Parameters
szBuffer- Buffer to place data
iLength- Max length to read
iLengthRead- The actual amount of data read.

Implements StreamDataSource.

OsStatus peek ( char *  szBuffer,
int  iLength,
int &  iLengthRead 
)
virtual

param szBuffer - Buffer to place data param iLength - Max length to read param iLengthRead - The actual amount of data read.

Implements StreamDataSource.

OsStatus seek ( unsigned int  iLocation)
virtual

param szBuffer - Buffer to place data param iLength - Max length to read param iLengthRead - The actual amount of data read.

Implements StreamDataSource.

OsStatus getLength ( int &  iLength)
virtual

Gets the length of the stream (if available)

Implements StreamDataSource.

OsStatus getPosition ( int &  iPosition)
virtual

Gets the current position within the stream.

Implements StreamDataSource.

OsStatus toString ( UtlString &  string)
virtual

Renders a string describing this data source.

Implements StreamDataSource.

StreamBufferDataSource & operator= ( const StreamBufferDataSource rhs)
protected

Member Data Documentation

UtlString* mpBuffer
private
int miPosition
private