class Source

A general data source More...

Contains pure virtuals
Definition#include <Source.h>
InheritsReferable [public virtual ]
Inherited byAlsaDspSource, AudioSource, OssDspSource, SolarisDspSource, TcpSocket
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

A general data source

inline  Source ( void )
throw ( Exception )

Source

[protected]

Default Constructor.

Throws: Exception

inline  Source ( const Source & source )
throw ( Exception )

Source

[protected]

Copy Constructor.

Parameters:
sourcethe object to copy.

Throws: Exception

inline Source &  operator= ( const Source & source )
throw ( Exception )

operator=

[protected virtual]

Assignment operator.

Parameters:
sourcethe object to assign to this one.

Returns: a reference to this object.

Throws: Exception

inline  ~Source ( void )
throw ( Exception )

~Source

[virtual]

Destructor.

Throws: Exception

bool  open ( void )
throw ( Exception )

open

[pure virtual]

Open the Source.

Returns: true if opening was successful, false otherwise

Throws: Exception

bool  isOpen ( void )
throw ()

isOpen

[const pure virtual]

Check if the Source is open.

Returns: true if the Source is open, false otherwise.

bool  canRead ( unsigned int sec, unsigned int usec )
throw ( Exception )

canRead

[pure virtual]

Check if the Source can be read from. Blocks until the specified time for data to be available.

Parameters:
secthe maximum seconds to block.
usecmicro seconds to block after the full seconds.

Returns: true if the Source is ready to be read from, false otherwise.

Throws: Exception

unsigned int  read ( void * buf, unsigned int len )
throw ( Exception )

read

[pure virtual]

Read from the Source.

Parameters:
bufthe buffer to read into.
lenthe number of bytes to read into buf

Returns: the number of bytes read (may be less than len).

Throws: Exception

void  close ( void )
throw ( Exception )

close

[pure virtual]

Close the Source.

Throws: Exception