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

IceCast2 Class Reference

#include <IceCast2.h>

Inheritance diagram for IceCast2:

Inheritance graph
[legend]
Collaboration diagram for IceCast2:

Collaboration graph
[legend]
List of all members.

Detailed Description

Class representing output to an IceCast2 server with ice login.

Author:
Author
darkeye
Version:
Revision
1.6

Definition at line 59 of file IceCast2.h.

Public Types

enum  StreamFormat { mp3, mp2, oggVorbis, aac }
 Type for specifying the format of the stream. More...

Public Member Functions

 IceCast2 (TcpSocket *socket, const char *password, const char *mountPoint, StreamFormat format, unsigned int bitRate, const char *name=0, const char *description=0, const char *url=0, const char *genre=0, bool isPublic=false, Sink *streamDump=0, unsigned int bufferDuration=10) throw ( Exception )
 Constructor.
 IceCast2 (const IceCast2 &cs) throw ( Exception )
 Copy constructor.
virtual ~IceCast2 (void) throw ( Exception )
 Destructor.
virtual IceCast2operator= (const IceCast2 &cs) throw ( Exception )
 Assignment operator.
StreamFormat getFormat (void) const throw ()
 Get the format of the stream.
const char * getMountPoint (void) const throw ()
 Get the mount point of the stream on the server.
const char * getDescription (void) const throw ()
 Get the description of the stream.

Protected Member Functions

 IceCast2 (void) throw ( Exception )
 Default constructor.
virtual bool sendLogin (void) throw ( Exception )
 Log in to the server using the socket avialable.


Member Enumeration Documentation

enum IceCast2::StreamFormat
 

Type for specifying the format of the stream.

Enumerator:
mp3 
mp2 
oggVorbis 
aac 

Definition at line 66 of file IceCast2.h.


Constructor & Destructor Documentation

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

Default constructor.

Always throws an Exception.

Exceptions:
Exception 

Definition at line 117 of file IceCast2.h.

IceCast2::IceCast2 TcpSocket socket,
const char *  password,
const char *  mountPoint,
StreamFormat  format,
unsigned int  bitRate,
const char *  name = 0,
const char *  description = 0,
const char *  url = 0,
const char *  genre = 0,
bool  isPublic = false,
Sink streamDump = 0,
unsigned int  bufferDuration = 10
throw ( Exception ) [inline]
 

Constructor.

Parameters:
socket socket connection to the server.
password password to the server.
mountPoint mount point of the stream on the server.
format the format of the stream.
name name of the stream.
description description of the stream.
url URL associated with the stream.
genre genre of the stream.
bitRate bitrate of the stream (e.g. mp3 bitrate).
isPublic is the stream public?
streamDump an optional sink to dump the binary stream data to.
bufferDuration duration of the BufferedSink buffer in seconds.
Exceptions:
Exception 

Definition at line 154 of file IceCast2.h.

IceCast2::IceCast2 const IceCast2 cs  )  throw ( Exception ) [inline]
 

Copy constructor.

Parameters:
cs the IceCast2 to copy.

Definition at line 186 of file IceCast2.h.

References Exception::getDescription().

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

Destructor.

Exceptions:
Exception 

Definition at line 200 of file IceCast2.h.


Member Function Documentation

const char* IceCast2::getDescription void   )  const throw () [inline]
 

Get the description of the stream.

Returns:
the description of the stream.

Definition at line 253 of file IceCast2.h.

Referenced by sendLogin().

StreamFormat IceCast2::getFormat void   )  const throw () [inline]
 

Get the format of the stream.

Returns:
the format of the stream.

Definition at line 231 of file IceCast2.h.

const char* IceCast2::getMountPoint void   )  const throw () [inline]
 

Get the mount point of the stream on the server.

Returns:
the mount point of the stream on the server.

Definition at line 242 of file IceCast2.h.

Referenced by sendLogin().

virtual IceCast2& IceCast2::operator= const IceCast2 cs  )  throw ( Exception ) [inline, virtual]
 

Assignment operator.

Parameters:
cs the IceCast2 to assign this to.
Returns:
a reference to this IceCast2.
Exceptions:
Exception 

Definition at line 213 of file IceCast2.h.

References CastSink::operator=().

bool IceCast2::sendLogin void   )  throw ( Exception ) [protected, virtual]
 

Log in to the server using the socket avialable.

Returns:
true if login was successful, false otherwise.
Exceptions:
Exception 

Implements CastSink.

Definition at line 122 of file IceCast2.cpp.

References aac, Util::base64Encode(), Source::canRead(), Sink::flush(), CastSink::getBitRate(), getDescription(), CastSink::getGenre(), CastSink::getIsPublic(), getMountPoint(), CastSink::getName(), CastSink::getPassword(), CastSink::getSink(), CastSink::getSocket(), CastSink::getUrl(), Sink::isOpen(), Source::isOpen(), mp2, mp3, oggVorbis, Source::read(), responseOK, STRBUF_SIZE, Util::strCat(), Util::strCpy(), Util::strEq(), Util::strLen(), VERSION, and Sink::write().


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