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

Sink Class Reference

#include <Sink.h>

Inheritance diagram for Sink:

Inheritance graph
[legend]
Collaboration diagram for Sink:

Collaboration graph
[legend]
List of all members.

Detailed Description

A general data sink.

Author:
Author
darkeye
Version:
Revision
1.4

Definition at line 57 of file Sink.h.

Public Member Functions

virtual ~Sink (void) throw ( Exception )
 Destructor.
virtual bool open (void)=0 throw ( Exception )
 Open the sink.
virtual bool isOpen (void) const =0 throw ()
 Check if the Sink is open.
virtual bool canWrite (unsigned int sec, unsigned int usec)=0 throw ( Exception )
 Check if the Sink is ready to accept data.
virtual unsigned int write (const void *buf, unsigned int len)=0 throw ( Exception )
 Write data to the Sink.
virtual void flush (void)=0 throw ( Exception )
 Flush all data that was written to the Sink to the underlying construct.
virtual void close (void)=0 throw ( Exception )
 Close the Sink.

Protected Member Functions

 Sink (void) throw ()
 Default constructor.
 Sink (const Sink &sink) throw ()
 Copy constructor.
virtual Sinkoperator= (const Sink &sink) throw ( Exception )
 Assignment operator.


Constructor & Destructor Documentation

Sink::Sink void   )  throw () [inline, protected]
 

Default constructor.

Definition at line 68 of file Sink.h.

Sink::Sink const Sink sink  )  throw () [inline, protected]
 

Copy constructor.

Parameters:
sink the Sink to copy.

Definition at line 78 of file Sink.h.

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

Destructor.

Exceptions:
Exception 

Definition at line 104 of file Sink.h.


Member Function Documentation

virtual bool Sink::canWrite unsigned int  sec,
unsigned int  usec
throw ( Exception ) [pure virtual]
 

Check if the Sink is ready to accept data.

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 Sink is ready to accept data, false otherwise.
Exceptions:
Exception 

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

Referenced by CastSink::canWrite(), and MultiThreadedConnector::sinkThread().

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

Close the Sink.

Exceptions:
Exception 

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

Referenced by CastSink::close(), and MultiThreadedConnector::sinkThread().

virtual void Sink::flush void   )  throw ( Exception ) [pure virtual]
 

Flush all data that was written to the Sink to the underlying construct.

Exceptions:
Exception 

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

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

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

Check if the Sink is open.

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

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

Referenced by BufferedSink::isOpen(), ShoutCast::sendLogin(), IceCast2::sendLogin(), IceCast::sendLogin(), and MultiThreadedConnector::sinkThread().

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

Open the sink.

Returns:
true if opening was successfull, false otherwise.
Exceptions:
Exception 

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

Referenced by BufferedSink::open(), and MultiThreadedConnector::sinkThread().

virtual Sink& Sink::operator= const Sink sink  )  throw ( Exception ) [inline, protected, virtual]
 

Assignment operator.

Parameters:
sink the Sink to assign this to.
Returns:
a reference to this Sink.
Exceptions:
Exception 

Definition at line 90 of file Sink.h.

Referenced by TcpSocket::operator=(), FileSink::operator=(), CastSink::operator=(), and BufferedSink::operator=().

virtual unsigned int Sink::write const void *  buf,
unsigned int  len
throw ( Exception ) [pure virtual]
 

Write data to the Sink.

Parameters:
buf the data to write.
len number of bytes to write from buf.
Returns:
the number of bytes written (may be less than len).
Exceptions:
Exception 

Implemented in BufferedSink, CastSink, FaacEncoder, FileCast, FileSink, LameLibEncoder, TcpSocket, and VorbisLibEncoder.

Referenced by ShoutCast::sendLogin(), IceCast2::sendLogin(), IceCast::sendLogin(), MultiThreadedConnector::sinkThread(), and CastSink::write().


The documentation for this class was generated from the following file:
Generated on Sat Oct 22 13:17:07 2005 for DarkIce by  doxygen 1.4.4