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

#include <StreamFileDataSource.h>

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

Public Member Functions

Creators
 StreamFileDataSource (Url url, int iFlags)
 
virtual ~StreamFileDataSource ()
 
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

 StreamFileDataSource (const StreamFileDataSource &rStreamFileDataSource)
 
StreamFileDataSourceoperator= (const StreamFileDataSource &rhs)
 
- 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

Url mUrl
 
OsFile * mpFile
 
OsMutex mFileGuard
 

Constructor & Destructor Documentation

StreamFileDataSource ( Url  url,
int  iFlags 
)
~StreamFileDataSource ( )
virtual
StreamFileDataSource ( const StreamFileDataSource rStreamFileDataSource)
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.

StreamFileDataSource & operator= ( const StreamFileDataSource rhs)
protected

Member Data Documentation

Url mUrl
private
OsFile* mpFile
private
OsMutex mFileGuard
private