class Sink

A general data sink More...

Contains pure virtuals
Definition#include <Sink.h>
InheritsReferable [public virtual ]
Inherited byAudioEncoder, BufferedSink, CastSink, FileCast, FileSink, IceCast, IceCast2, LameLibEncoder, ShoutCast, TcpSocket, VorbisLibEncoder
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

A general data sink

inline  Sink ( void )
throw ()

Sink

[protected]

Default constructor.

inline  Sink ( const Sink & sink )
throw ()

Sink

[protected]

Copy constructor.

Parameters:
sinkthe Sink to copy.

inline Sink &  operator= ( const Sink & sink )
throw ( Exception )

operator=

[protected virtual]

Assignment operator.

Parameters:
sinkthe Sink to assign this to.

Returns: a reference to this Sink.

Throws: Exception

inline  ~Sink ( void )
throw ( Exception )

~Sink

[virtual]

Destructor.

Throws: Exception

bool  open ( void )
throw ( Exception )

open

[pure virtual]

Open the sink.

Returns: true if opening was successfull, false otherwise.

Throws: Exception

bool  isOpen ( void )
throw ()

isOpen

[const pure virtual]

Check if the Sink is open.

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

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

canWrite

[pure virtual]

Check if the Sink is ready to accept data. 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 Sink is ready to accept data, false otherwise.

Throws: Exception

unsigned int  write ( const void * buf, unsigned int len )
throw ( Exception )

write

[pure virtual]

Write data to the Sink.

Parameters:
bufthe data to write.
lennumber of bytes to write from buf.

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

Throws: Exception

void  flush ( void )
throw ( Exception )

flush

[pure virtual]

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

Throws: Exception

void  close ( void )
throw ( Exception )

close

[pure virtual]

Close the Sink.

Throws: Exception