Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Source Class Reference

#include <Source.h>

Inheritance diagram for Source:

Inheritance graph
[legend]
Collaboration diagram for Source:

Collaboration graph
[legend]
List of all members.

Detailed Description

A general data source.

Author:
Author
darkeye
Version:
Revision
1.2

Definition at line 57 of file Source.h.

Public Member Functions

virtual ~Source (void) throw ( Exception )
 Destructor.
virtual bool open (void)=0 throw ( Exception )
 Open the Source.
virtual bool isOpen (void) const =0 throw ()
 Check if the Source is open.
virtual bool canRead (unsigned int sec, unsigned int usec)=0 throw ( Exception )
 Check if the Source can be read from.
virtual unsigned int read (void *buf, unsigned int len)=0 throw ( Exception )
 Read from the Source.
virtual void close (void)=0 throw ( Exception )
 Close the Source.

Protected Member Functions

 Source (void) throw ( Exception )
 Default Constructor.
 Source (const Source &source) throw ( Exception )
 Copy Constructor.
virtual Sourceoperator= (const Source &source) throw ( Exception )
 Assignment operator.


Constructor & Destructor Documentation

Source::Source void   )  throw ( Exception ) [inline, protected]
 

Default Constructor.

Exceptions:
Exception 

Definition at line 69 of file Source.h.

Source::Source const Source source  )  throw ( Exception ) [inline, protected]
 

Copy Constructor.

Parameters:
source the object to copy.
Exceptions:
Exception 

Definition at line 80 of file Source.h.

virtual Source::~Source void   )  throw ( Exception ) [inline, virtual]
 

Destructor.

Exceptions:
Exception 

Definition at line 106 of file Source.h.


Member Function Documentation

virtual bool Source::canRead unsigned int  sec,
unsigned int  usec
throw ( Exception ) [pure virtual]
 

Check if the Source can be read from.

Blocks until the specified time for data to be available.

Parameters:
sec the maximum seconds to block.
usec micro seconds to block after the full seconds.
Returns:
true if the Source is ready to be read from, false otherwise.
Exceptions:
Exception 

Implemented in AlsaDspSource, JackDspSource, OssDspSource, SolarisDspSource, and TcpSocket.

Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin().

virtual void Source::close void   )  throw ( Exception ) [pure virtual]
 

Close the Source.

Exceptions:
Exception 

Implemented in AlsaDspSource, JackDspSource, OssDspSource, SolarisDspSource, and TcpSocket.

virtual bool Source::isOpen void   )  const throw () [pure virtual]
 

Check if the Source is open.

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

Implemented in AlsaDspSource, JackDspSource, OssDspSource, SolarisDspSource, and TcpSocket.

Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin().

virtual bool Source::open void   )  throw ( Exception ) [pure virtual]
 

Open the Source.

Returns:
true if opening was successful, false otherwise
Exceptions:
Exception 

Implemented in AlsaDspSource, JackDspSource, OssDspSource, SolarisDspSource, and TcpSocket.

virtual Source& Source::operator= const Source source  )  throw ( Exception ) [inline, protected, virtual]
 

Assignment operator.

Parameters:
source the object to assign to this one.
Returns:
a reference to this object.
Exceptions:
Exception 

Definition at line 92 of file Source.h.

Referenced by TcpSocket::operator=(), and AudioSource::operator=().

virtual unsigned int Source::read void *  buf,
unsigned int  len
throw ( Exception ) [pure virtual]
 

Read from the Source.

Parameters:
buf the buffer to read into.
len the number of bytes to read into buf
Returns:
the number of bytes read (may be less than len).
Exceptions:
Exception 

Implemented in AlsaDspSource, JackDspSource, OssDspSource, SolarisDspSource, and TcpSocket.

Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), and IceCast::sendLogin().


The documentation for this class was generated from the following file:
Generated on Fri May 19 15:36:49 2006 for DarkIce by  doxygen 1.4.4