diff --git a/src/AlsaDspSource.cpp b/src/AlsaDspSource.cpp index 7ef6a0c..880e4a9 100644 --- a/src/AlsaDspSource.cpp +++ b/src/AlsaDspSource.cpp @@ -78,7 +78,7 @@ AlsaDspSource :: isBigEndian ( void ) const throw () * Initialize the object *----------------------------------------------------------------------------*/ void -AlsaDspSource :: init ( const char * name ) throw ( Exception ) +AlsaDspSource :: init ( const char * name ) { pcmName = Util::strDup( name); captureHandle = 0; @@ -91,7 +91,7 @@ AlsaDspSource :: init ( const char * name ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -AlsaDspSource :: strip ( void ) throw ( Exception ) +AlsaDspSource :: strip ( void ) { if ( isOpen() ) { close(); @@ -105,7 +105,7 @@ AlsaDspSource :: strip ( void ) throw ( Exception ) * Open the audio source *----------------------------------------------------------------------------*/ bool -AlsaDspSource :: open ( void ) throw ( Exception ) +AlsaDspSource :: open ( void ) { unsigned int u; snd_pcm_format_t format; @@ -214,7 +214,7 @@ AlsaDspSource :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool AlsaDspSource :: canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { if ( !isOpen() ) { return false; @@ -242,7 +242,7 @@ AlsaDspSource :: canRead ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int AlsaDspSource :: read ( void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { snd_pcm_sframes_t ret; @@ -274,7 +274,7 @@ AlsaDspSource :: read ( void * buf, * Close the audio source *----------------------------------------------------------------------------*/ void -AlsaDspSource :: close ( void ) throw ( Exception ) +AlsaDspSource :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/AlsaDspSource.h b/src/AlsaDspSource.h index 3d0965c..7ce2deb 100644 --- a/src/AlsaDspSource.h +++ b/src/AlsaDspSource.h @@ -108,7 +108,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline - AlsaDspSource ( void ) throw ( Exception ) + AlsaDspSource ( void ) { throw Exception( __FILE__, __LINE__); } @@ -120,7 +120,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - init ( const char * name ) throw ( Exception ); + init ( const char * name ); /** * De-iitialize the object @@ -128,7 +128,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); public: @@ -148,7 +148,6 @@ class AlsaDspSource : public AudioSource, public virtual Reporter int sampleRate = 44100, int bitsPerSample = 16, int channel = 2 ) - throw ( Exception ) : AudioSource( sampleRate, bitsPerSample, channel) { init( name); @@ -161,7 +160,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline - AlsaDspSource ( const AlsaDspSource & ds ) throw ( Exception ) + AlsaDspSource ( const AlsaDspSource & ds ) : AudioSource( ds ) { init( ds.pcmName); @@ -173,7 +172,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual - ~AlsaDspSource ( void ) throw ( Exception ) + ~AlsaDspSource ( void ) { strip(); } @@ -186,7 +185,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual AlsaDspSource & - operator= ( const AlsaDspSource & ds ) throw ( Exception ) + operator= ( const AlsaDspSource & ds ) { if ( this != &ds ) { strip(); @@ -216,7 +215,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @see #read */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the AlsaDspSource is open. @@ -242,7 +241,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Read from the AlsaDspSource. @@ -255,7 +254,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Close the AlsaDspSource. @@ -263,7 +262,7 @@ class AlsaDspSource : public AudioSource, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); /** * Returns the buffer size in useconds. diff --git a/src/AudioEncoder.h b/src/AudioEncoder.h index bff2d63..fdc51f7 100644 --- a/src/AudioEncoder.h +++ b/src/AudioEncoder.h @@ -145,7 +145,7 @@ class AudioEncoder : public Sink, public virtual Referable unsigned int outBitrate, double outQuality, unsigned int outSampleRate, - unsigned int outChannel ) throw ( Exception ) + unsigned int outChannel ) { this->sink = sink; this->inSampleRate = inSampleRate; @@ -169,7 +169,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { } @@ -182,7 +182,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ inline - AudioEncoder ( void ) throw ( Exception ) + AudioEncoder ( void ) { throw Exception( __FILE__, __LINE__); } @@ -215,7 +215,6 @@ class AudioEncoder : public Sink, public virtual Referable double outQuality, unsigned int outSampleRate = 0, unsigned int outChannel = 0 ) - throw ( Exception ) { init ( sink, inSampleRate, @@ -252,7 +251,6 @@ class AudioEncoder : public Sink, public virtual Referable double outQuality, unsigned int outSampleRate = 0, unsigned int outChannel = 0 ) - throw ( Exception) { init( sink, as->getSampleRate(), @@ -272,7 +270,7 @@ class AudioEncoder : public Sink, public virtual Referable * @param encoder the AudioEncoder to copy. */ inline - AudioEncoder ( const AudioEncoder & encoder ) throw ( Exception ) + AudioEncoder ( const AudioEncoder & encoder ) { init ( encoder.sink.get(), encoder.inSampleRate, @@ -294,7 +292,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ inline virtual AudioEncoder & - operator= ( const AudioEncoder & encoder ) throw ( Exception ) + operator= ( const AudioEncoder & encoder ) { if ( this != &encoder ) { strip(); @@ -323,7 +321,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ inline virtual - ~AudioEncoder ( void ) throw ( Exception ) + ~AudioEncoder ( void ) { strip(); } @@ -456,7 +454,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ virtual bool - start ( void ) throw ( Exception ) = 0; + start ( void ) = 0; /** * Stop encoding. Stops the encoding running in the background. @@ -464,7 +462,7 @@ class AudioEncoder : public Sink, public virtual Referable * @exception Exception */ virtual void - stop ( void ) throw ( Exception ) = 0; + stop ( void ) = 0; /** * Cut what the sink has been doing so far, and start anew. diff --git a/src/AudioSource.cpp b/src/AudioSource.cpp index 2387396..57ef6bc 100644 --- a/src/AudioSource.cpp +++ b/src/AudioSource.cpp @@ -65,7 +65,6 @@ AudioSource :: createDspSource( const char * deviceName, int sampleRate, int bitsPerSample, int channel) - throw ( Exception ) { if ( Util::strEq( deviceName, "/dev/tty", 8) ) { diff --git a/src/AudioSource.h b/src/AudioSource.h index 0230d42..72e99c4 100644 --- a/src/AudioSource.h +++ b/src/AudioSource.h @@ -130,7 +130,7 @@ class AudioSource : public Source, public virtual Reporter inline void init ( unsigned int sampleRate, unsigned int bitsPerSample, - unsigned int channel ) throw ( Exception ) + unsigned int channel ) { this->sampleRate = sampleRate; this->bitsPerSample = bitsPerSample; @@ -143,7 +143,7 @@ class AudioSource : public Source, public virtual Reporter * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { } @@ -165,7 +165,6 @@ class AudioSource : public Source, public virtual Reporter AudioSource ( unsigned int sampleRate = 44100, unsigned int bitsPerSample = 16, unsigned int channel = 2 ) - throw ( Exception ) { init ( sampleRate, bitsPerSample, channel); } @@ -177,7 +176,7 @@ class AudioSource : public Source, public virtual Reporter * @exception Exception */ inline - AudioSource ( const AudioSource & as ) throw ( Exception ) + AudioSource ( const AudioSource & as ) : Source( as ) { init ( as.sampleRate, as.bitsPerSample, as.channel); @@ -191,7 +190,7 @@ class AudioSource : public Source, public virtual Reporter * @exception Exception */ inline virtual AudioSource & - operator= ( const AudioSource & as ) throw ( Exception ) + operator= ( const AudioSource & as ) { if ( this != &as ) { strip(); @@ -211,7 +210,7 @@ class AudioSource : public Source, public virtual Reporter * @exception Exception */ virtual inline - ~AudioSource ( void ) throw ( Exception ) + ~AudioSource ( void ) { } @@ -296,7 +295,7 @@ class AudioSource : public Source, public virtual Reporter const char * paSourceName, int sampleRate = 44100, int bitsPerSample = 16, - int channel = 2) throw ( Exception ); + int channel = 2); }; diff --git a/src/BufferedSink.cpp b/src/BufferedSink.cpp index 460baed..90d1df5 100644 --- a/src/BufferedSink.cpp +++ b/src/BufferedSink.cpp @@ -82,7 +82,7 @@ static const char fileid[] = "$Id$"; void BufferedSink :: init ( Sink * sink, unsigned int size, - unsigned int chunkSize ) throw ( Exception ) + unsigned int chunkSize ) { if ( !sink ) { throw Exception( __FILE__, __LINE__, "no sink"); @@ -108,7 +108,6 @@ BufferedSink :: init ( Sink * sink, * Copy Constructor *----------------------------------------------------------------------------*/ BufferedSink :: BufferedSink ( const BufferedSink & buffer ) - throw ( Exception ) { init( buffer.sink.get(), buffer.bufferSize, buffer.chunkSize); @@ -124,7 +123,7 @@ BufferedSink :: BufferedSink ( const BufferedSink & buffer ) * De-initalize the object *----------------------------------------------------------------------------*/ void -BufferedSink :: strip ( void ) throw ( Exception ) +BufferedSink :: strip ( void ) { if ( isOpen() ) { close(); @@ -140,7 +139,6 @@ BufferedSink :: strip ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ BufferedSink & BufferedSink :: operator= ( const BufferedSink & buffer ) - throw ( Exception ) { if ( this != &buffer ) { strip(); @@ -168,7 +166,7 @@ BufferedSink :: operator= ( const BufferedSink & buffer ) *----------------------------------------------------------------------------*/ unsigned int BufferedSink :: store ( const void * buffer, - unsigned int bufferSize ) throw ( Exception ) + unsigned int bufferSize ) { const unsigned char * buf; unsigned int size; @@ -271,7 +269,7 @@ BufferedSink :: store ( const void * buffer, *----------------------------------------------------------------------------*/ unsigned int BufferedSink :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { unsigned int length = 0; unsigned int soFar = 0; @@ -420,7 +418,7 @@ BufferedSink :: write ( const void * buf, * Close the sink, lose all pending data *----------------------------------------------------------------------------*/ void -BufferedSink :: close ( void ) throw ( Exception ) +BufferedSink :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/BufferedSink.h b/src/BufferedSink.h index 2445c38..67e618e 100644 --- a/src/BufferedSink.h +++ b/src/BufferedSink.h @@ -132,7 +132,7 @@ class BufferedSink : public Sink, public virtual Reporter void init ( Sink * sink, unsigned int size, - unsigned int chunkSize ) throw ( Exception ); + unsigned int chunkSize ); /** * De-initialize the object. @@ -140,7 +140,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); /** * Slide a pointer in the internal buffer by offset. If the pointer @@ -196,7 +196,7 @@ class BufferedSink : public Sink, public virtual Reporter * @see #chunkSize */ inline bool - align ( void ) throw ( Exception ) + align ( void ) { char b[] = { 0 }; @@ -226,7 +226,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ inline - BufferedSink ( void ) throw ( Exception ) + BufferedSink ( void ) { throw Exception( __FILE__, __LINE__); } @@ -253,7 +253,7 @@ class BufferedSink : public Sink, public virtual Reporter */ unsigned int store ( const void * buffer, - unsigned int bufferSize ) throw ( Exception ); + unsigned int bufferSize ); public: @@ -270,7 +270,7 @@ class BufferedSink : public Sink, public virtual Reporter inline BufferedSink ( Sink * sink, unsigned int size, - unsigned int chunkSize = 1 ) throw ( Exception ) + unsigned int chunkSize = 1 ) { init( sink, size, chunkSize); } @@ -281,7 +281,7 @@ class BufferedSink : public Sink, public virtual Reporter * @param buffer the object to copy. * @exception Exception */ - BufferedSink ( const BufferedSink & buffer ) throw ( Exception ); + BufferedSink ( const BufferedSink & buffer ); /** * Destructor. @@ -289,7 +289,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual - ~BufferedSink ( void ) throw ( Exception ) + ~BufferedSink ( void ) { strip(); } @@ -302,7 +302,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ virtual BufferedSink & - operator= ( const BufferedSink & bs ) throw ( Exception ); + operator= ( const BufferedSink & bs ); /** * Get the peak usage of the internal buffer. @@ -322,7 +322,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual bool - open ( void ) throw ( Exception ) + open ( void ) { bOpen = sink->open(); openAttempts = 0; @@ -351,7 +351,7 @@ class BufferedSink : public Sink, public virtual Reporter */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { return true; } @@ -370,7 +370,7 @@ class BufferedSink : public Sink, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Flush all data that was written to the BufferedSink to the @@ -379,7 +379,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual void - flush ( void ) throw ( Exception ) + flush ( void ) { unsigned char b[1]; @@ -404,7 +404,7 @@ class BufferedSink : public Sink, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/CastSink.cpp b/src/CastSink.cpp index aa5c14c..adf0465 100644 --- a/src/CastSink.cpp +++ b/src/CastSink.cpp @@ -62,7 +62,6 @@ CastSink :: init ( TcpSocket * socket, const char * url, const char * genre, bool isPublic ) - throw ( Exception ) { this->socket = socket; this->streamDump = streamDump; @@ -79,7 +78,7 @@ CastSink :: init ( TcpSocket * socket, * De-initialize the object *----------------------------------------------------------------------------*/ void -CastSink :: strip ( void ) throw ( Exception ) +CastSink :: strip ( void ) { if ( isOpen() ) { close(); @@ -104,7 +103,7 @@ CastSink :: strip ( void ) throw ( Exception ) * Open the connection *----------------------------------------------------------------------------*/ bool -CastSink :: open ( void ) throw ( Exception ) +CastSink :: open ( void ) { if ( isOpen() ) { return false; diff --git a/src/CastSink.h b/src/CastSink.h index 79b934f..85de102 100644 --- a/src/CastSink.h +++ b/src/CastSink.h @@ -123,8 +123,7 @@ class CastSink : public Sink, public virtual Reporter const char * name, const char * url, const char * genre, - bool isPublic) - throw ( Exception ); + bool isPublic); /** * De-initalize the object. @@ -132,7 +131,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -143,7 +142,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ inline - CastSink ( void ) throw ( Exception ) + CastSink ( void ) { throw Exception( __FILE__, __LINE__); } @@ -155,7 +154,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ virtual bool - sendLogin ( void ) throw ( Exception ) = 0; + sendLogin ( void ) = 0; /** * Get the Sink underneath this CastSink. @@ -205,7 +204,6 @@ class CastSink : public Sink, public virtual Reporter const char * genre = 0, bool isPublic = false, Sink * streamDump = 0) - throw ( Exception ) { init( socket, streamDump, @@ -223,7 +221,7 @@ class CastSink : public Sink, public virtual Reporter * @param cs the CastSink to copy. */ inline - CastSink( const CastSink & cs ) throw ( Exception ) + CastSink( const CastSink & cs ) : Sink( cs ) { init( cs.socket.get(), @@ -242,7 +240,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual - ~CastSink( void ) throw ( Exception ) + ~CastSink( void ) { strip(); } @@ -255,7 +253,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual CastSink & - operator= ( const CastSink & cs ) throw ( Exception ) + operator= ( const CastSink & cs ) { if ( this != &cs ) { strip(); @@ -280,7 +278,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the CastSink is open. @@ -308,7 +306,7 @@ class CastSink : public Sink, public virtual Reporter */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { return getSink()->canWrite( sec, usec); } @@ -323,7 +321,7 @@ class CastSink : public Sink, public virtual Reporter */ inline virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { if ( streamDump != 0 ) { streamDump->write( buf, len); @@ -338,7 +336,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual void - flush ( void ) throw ( Exception ) + flush ( void ) { if ( streamDump != 0 ) { streamDump->flush(); @@ -366,7 +364,7 @@ class CastSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual void - close ( void ) throw ( Exception ) + close ( void ) { if ( streamDump != 0 ) { streamDump->close(); diff --git a/src/ConfigSection.cpp b/src/ConfigSection.cpp index dc84119..e4566cc 100644 --- a/src/ConfigSection.cpp +++ b/src/ConfigSection.cpp @@ -68,7 +68,7 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ bool ConfigSection :: add ( const char * key, - const char * value ) throw ( Exception ) + const char * value ) { if ( !key || !value ) { throw Exception( __FILE__, __LINE__, "no key or value"); @@ -87,7 +87,7 @@ ConfigSection :: add ( const char * key, * Get a value for a key *----------------------------------------------------------------------------*/ const char * -ConfigSection :: get ( const char * key ) const throw ( Exception ) +ConfigSection :: get ( const char * key ) const { if ( !key ) { throw Exception( __FILE__, __LINE__, "no key"); @@ -109,7 +109,6 @@ ConfigSection :: getForSure ( const char * key, const char * message1, const char * message2, int code ) const - throw ( Exception ) { const char * value; @@ -125,7 +124,7 @@ ConfigSection :: getForSure ( const char * key, * Add a configuration line *----------------------------------------------------------------------------*/ bool -ConfigSection :: addLine ( const char * line ) throw ( Exception ) +ConfigSection :: addLine ( const char * line ) { if ( !line ) { throw Exception( __FILE__, __LINE__, "no line"); diff --git a/src/ConfigSection.h b/src/ConfigSection.h index 2a42ec2..adc2bc8 100644 --- a/src/ConfigSection.h +++ b/src/ConfigSection.h @@ -93,7 +93,7 @@ class ConfigSection : public virtual Referable * @exception Exception */ inline - ConfigSection ( void ) throw ( Exception ) + ConfigSection ( void ) { } @@ -103,7 +103,7 @@ class ConfigSection : public virtual Referable * @exception Exception */ inline virtual - ~ConfigSection ( void ) throw ( Exception ) + ~ConfigSection ( void ) { } @@ -132,7 +132,7 @@ class ConfigSection : public virtual Referable */ virtual bool add ( const char * key, - const char * value ) throw ( Exception ); + const char * value ); /** * Get a value for a key. @@ -142,7 +142,7 @@ class ConfigSection : public virtual Referable * @exception Exception */ virtual const char * - get ( const char * key ) const throw ( Exception ); + get ( const char * key ) const; /** * Get a value for a key, or throw an Exception. @@ -158,8 +158,7 @@ class ConfigSection : public virtual Referable getForSure ( const char * key, const char * message1 = 0, const char * message2 = 0, - int code = 0 ) const - throw ( Exception ); + int code = 0 ) const; /** * Add a line of configuration information. @@ -169,7 +168,7 @@ class ConfigSection : public virtual Referable * @exception Exception */ virtual bool - addLine ( const char * line ) throw ( Exception ); + addLine ( const char * line ); }; diff --git a/src/Connector.cpp b/src/Connector.cpp index f2b9139..090d84a 100644 --- a/src/Connector.cpp +++ b/src/Connector.cpp @@ -53,7 +53,7 @@ static const char fileid[] = "$Id$"; * Initialize the object *----------------------------------------------------------------------------*/ void -Connector :: init ( Source * source ) throw ( Exception ) +Connector :: init ( Source * source ) { this->source = source; this->sinks = 0; @@ -65,7 +65,7 @@ Connector :: init ( Source * source ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -Connector :: strip ( void ) throw ( Exception ) +Connector :: strip ( void ) { source = 0; @@ -84,7 +84,7 @@ Connector :: strip ( void ) throw ( Exception ) /*------------------------------------------------------------------------------ * Constructor *----------------------------------------------------------------------------*/ -Connector :: Connector ( const Connector & connector ) throw ( Exception ) +Connector :: Connector ( const Connector & connector ) { unsigned int u; @@ -100,7 +100,7 @@ Connector :: Connector ( const Connector & connector ) throw ( Exception ) * Assignment operator *----------------------------------------------------------------------------*/ Connector & -Connector :: operator= ( const Connector & connector ) throw ( Exception ) +Connector :: operator= ( const Connector & connector ) { if ( this != &connector ) { unsigned int u; @@ -124,7 +124,7 @@ Connector :: operator= ( const Connector & connector ) throw ( Exception ) * Attach a sink to the connector *----------------------------------------------------------------------------*/ void -Connector :: attach ( Sink * sink ) throw ( Exception ) +Connector :: attach ( Sink * sink ) { if ( !sinks ) { @@ -153,7 +153,7 @@ Connector :: attach ( Sink * sink ) throw ( Exception ) * Detach a sink to the connector *----------------------------------------------------------------------------*/ bool -Connector :: detach ( Sink * sink ) throw ( Exception ) +Connector :: detach ( Sink * sink ) { if ( numSinks == 0 ) { @@ -214,7 +214,7 @@ Connector :: detach ( Sink * sink ) throw ( Exception ) * Open the source and all the sinks if needed *----------------------------------------------------------------------------*/ bool -Connector :: open ( void ) throw ( Exception ) +Connector :: open ( void ) { unsigned int u; @@ -256,7 +256,7 @@ unsigned int Connector :: transfer ( unsigned long bytes, unsigned int bufSize, unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { unsigned int u; unsigned long b; @@ -345,7 +345,7 @@ Connector :: cut ( void ) throw () * Close the source and all the sinks if needed *----------------------------------------------------------------------------*/ void -Connector :: close ( void ) throw ( Exception ) +Connector :: close ( void ) { unsigned int u; diff --git a/src/Connector.h b/src/Connector.h index 5183a38..c82e00f 100644 --- a/src/Connector.h +++ b/src/Connector.h @@ -68,7 +68,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ void - init ( Source * source ) throw ( Exception ); + init ( Source * source ); /** * De-initialize the object. @@ -76,7 +76,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -102,7 +102,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ inline - Connector ( void ) throw ( Exception ) + Connector ( void ) { throw Exception( __FILE__, __LINE__); } @@ -115,7 +115,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ virtual bool - detach ( Sink * sink ) throw ( Exception ); + detach ( Sink * sink ); public: @@ -127,7 +127,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ inline - Connector ( Source * source ) throw ( Exception ) + Connector ( Source * source ) { init( source); } @@ -141,7 +141,7 @@ class Connector : public virtual Referable, public virtual Reporter */ inline Connector ( Source * source, - Sink * sink ) throw ( Exception ) + Sink * sink ) { init( source); attach( sink); @@ -153,7 +153,7 @@ class Connector : public virtual Referable, public virtual Reporter * @param connector the object to copy. * @exception Exception */ - Connector ( const Connector & connector ) throw ( Exception ); + Connector ( const Connector & connector ); /** * Destructor. @@ -161,7 +161,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ inline virtual - ~Connector( void ) throw ( Exception ) + ~Connector( void ) { strip(); } @@ -174,7 +174,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ virtual Connector & - operator= ( const Connector & connector ) throw ( Exception ); + operator= ( const Connector & connector ); /** * Get the number of Sinks in the Connector. @@ -195,7 +195,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ virtual void - attach ( Sink * sink ) throw ( Exception ); + attach ( Sink * sink ); /** * Open the connector. Opens the Source and the Sinks if necessary. @@ -204,7 +204,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Transfer a given amount of data from the Source to all the @@ -232,7 +232,7 @@ class Connector : public virtual Referable, public virtual Reporter transfer ( unsigned long bytes, unsigned int bufSize, unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Signal to each sink we have that they need to cut what they are @@ -249,7 +249,7 @@ class Connector : public virtual Referable, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/DarkIce.cpp b/src/DarkIce.cpp index 1c570a9..949b800 100644 --- a/src/DarkIce.cpp +++ b/src/DarkIce.cpp @@ -137,7 +137,7 @@ static const char fileid[] = "$Id$"; * Initialize the object *----------------------------------------------------------------------------*/ void -DarkIce :: init ( const Config & config ) throw ( Exception ) +DarkIce :: init ( const Config & config ) { unsigned int bufferSecs; const ConfigSection * cs; @@ -214,7 +214,6 @@ DarkIce :: init ( const Config & config ) throw ( Exception ) void DarkIce :: configIceCast ( const Config & config, unsigned int bufferSecs ) - throw ( Exception ) { // look for IceCast encoder output streams, // sections [icecast-0], [icecast-1], ... @@ -428,7 +427,6 @@ DarkIce :: configIceCast ( const Config & config, void DarkIce :: configIceCast2 ( const Config & config, unsigned int bufferSecs ) - throw ( Exception ) { // look for IceCast2 encoder output streams, // sections [icecast2-0], [icecast2-1], ... @@ -743,7 +741,6 @@ DarkIce :: configIceCast2 ( const Config & config, void DarkIce :: configShoutCast ( const Config & config, unsigned int bufferSecs ) - throw ( Exception ) { // look for Shoutcast encoder output streams, // sections [shoutcast-0], [shoutcast-1], ... @@ -931,7 +928,6 @@ DarkIce :: configShoutCast ( const Config & config, *----------------------------------------------------------------------------*/ void DarkIce :: configFileCast ( const Config & config ) - throw ( Exception ) { // look for FileCast encoder output streams, // sections [file-0], [file-1], ... @@ -1175,7 +1171,7 @@ DarkIce :: configFileCast ( const Config & config ) * Set POSIX real-time scheduling *----------------------------------------------------------------------------*/ void -DarkIce :: setRealTimeScheduling ( void ) throw ( Exception ) +DarkIce :: setRealTimeScheduling ( void ) { // Only if the OS has the POSIX real-time scheduling functions implemented. #if defined( HAVE_SCHED_GETSCHEDULER ) && defined( HAVE_SCHED_GETPARAM ) @@ -1232,7 +1228,7 @@ DarkIce :: setRealTimeScheduling ( void ) throw ( Exception ) * WARNING: make sure you don't call this before setRealTimeScheduling!! *----------------------------------------------------------------------------*/ void -DarkIce :: setOriginalScheduling ( void ) throw ( Exception ) +DarkIce :: setOriginalScheduling ( void ) { // Only if the OS has the POSIX real-time scheduling functions implemented. #if defined( HAVE_SCHED_GETSCHEDULER ) && defined( HAVE_SCHED_GETPARAM ) @@ -1263,7 +1259,7 @@ DarkIce :: setOriginalScheduling ( void ) throw ( Exception ) * Run the encoder *----------------------------------------------------------------------------*/ bool -DarkIce :: encode ( void ) throw ( Exception ) +DarkIce :: encode ( void ) { unsigned int len; unsigned long bytes; @@ -1288,7 +1284,7 @@ DarkIce :: encode ( void ) throw ( Exception ) * Run *----------------------------------------------------------------------------*/ int -DarkIce :: run ( void ) throw ( Exception ) +DarkIce :: run ( void ) { reportEvent( 3, "encoding"); diff --git a/src/DarkIce.h b/src/DarkIce.h index 49ae2a5..1021386 100644 --- a/src/DarkIce.h +++ b/src/DarkIce.h @@ -147,7 +147,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ void - init ( const Config & config ) throw ( Exception ); + init ( const Config & config ); /** * Look for the icecast stream outputs from the config file. @@ -160,7 +160,7 @@ class DarkIce : public virtual Referable, public virtual Reporter */ void configIceCast ( const Config & config, - unsigned int bufferSecs ) throw ( Exception ); + unsigned int bufferSecs ); /** * Look for the icecast2 stream outputs from the config file. @@ -173,7 +173,7 @@ class DarkIce : public virtual Referable, public virtual Reporter */ void configIceCast2 ( const Config & config, - unsigned int bufferSecs ) throw ( Exception ); + unsigned int bufferSecs ); /** * Look for the shoutcast stream outputs from the config file. @@ -186,7 +186,7 @@ class DarkIce : public virtual Referable, public virtual Reporter */ void configShoutCast ( const Config & config, - unsigned int bufferSecs ) throw ( Exception ); + unsigned int bufferSecs ); /** * Look for file outputs from the config file. @@ -197,8 +197,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ void - configFileCast ( const Config & config ) - throw ( Exception ); + configFileCast ( const Config & config ); /** * Set POSIX real-time scheduling for the encoding process, @@ -207,7 +206,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ void - setRealTimeScheduling ( void ) throw ( Exception ); + setRealTimeScheduling ( void ); /** * Set the scheduling that was before setting real-time scheduling. @@ -216,7 +215,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ void - setOriginalScheduling ( void ) throw ( Exception ); + setOriginalScheduling ( void ); /** * Start encoding. Spawns all encoders, opens the dsp and @@ -226,7 +225,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ bool - encode ( void ) throw ( Exception ); + encode ( void ); /** * Start shouting. fork()-s a process for each output, reads @@ -236,7 +235,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ bool - shout ( unsigned int ) throw ( Exception ); + shout ( unsigned int ); protected: @@ -247,7 +246,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ inline - DarkIce ( void ) throw ( Exception ) + DarkIce ( void ) { throw Exception( __FILE__, __LINE__); } @@ -263,7 +262,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ inline - DarkIce ( const Config & config ) throw ( Exception ) + DarkIce ( const Config & config ) { init( config); } @@ -274,7 +273,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ inline virtual - ~DarkIce ( void ) throw ( Exception ) + ~DarkIce ( void ) { } @@ -299,7 +298,7 @@ class DarkIce : public virtual Referable, public virtual Reporter * @exception Exception */ virtual int - run ( void ) throw ( Exception ); + run ( void ); /** * Signal to each sink we have that they need to cut what they are diff --git a/src/DarkIceConfig.cpp b/src/DarkIceConfig.cpp index c3d3a4e..83943c3 100644 --- a/src/DarkIceConfig.cpp +++ b/src/DarkIceConfig.cpp @@ -73,7 +73,7 @@ static const char fileid[] = "$Id$"; * Get a value for a key *----------------------------------------------------------------------------*/ const ConfigSection * -Config :: get ( const char * key ) const throw ( Exception ) +Config :: get ( const char * key ) const { if ( !key ) { throw Exception( __FILE__, __LINE__, "no key"); @@ -91,7 +91,7 @@ Config :: get ( const char * key ) const throw ( Exception ) * Add a configuration line *----------------------------------------------------------------------------*/ bool -Config :: addLine ( const char * line ) throw ( Exception ) +Config :: addLine ( const char * line ) { if ( !line ) { throw Exception( __FILE__, __LINE__, "no line"); @@ -150,7 +150,7 @@ Config :: addLine ( const char * line ) throw ( Exception ) * Add a configuration line *----------------------------------------------------------------------------*/ void -Config :: read ( std::istream & is ) throw ( Exception ) +Config :: read ( std::istream & is ) { char line[LINE_SIZE]; unsigned int num; diff --git a/src/DarkIceConfig.h b/src/DarkIceConfig.h index d3d41fa..e8627ac 100644 --- a/src/DarkIceConfig.h +++ b/src/DarkIceConfig.h @@ -111,7 +111,7 @@ class Config : public virtual Referable * @exception Exception */ inline - Config ( void ) throw ( Exception ) + Config ( void ) { } @@ -123,7 +123,7 @@ class Config : public virtual Referable * @exception Exception */ inline - Config ( std::istream & is ) throw ( Exception ) + Config ( std::istream & is ) { read( is ); } @@ -134,7 +134,7 @@ class Config : public virtual Referable * @exception Exception */ inline virtual - ~Config ( void ) throw ( Exception ) + ~Config ( void ) { } @@ -160,7 +160,7 @@ class Config : public virtual Referable * @exception Exception */ inline virtual void - reset ( void ) throw ( Exception ) + reset ( void ) { table.clear(); currentSection = ""; @@ -174,7 +174,7 @@ class Config : public virtual Referable * @exception Exception */ virtual bool - addLine ( const char * line ) throw ( Exception ); + addLine ( const char * line ); /** * Read a line of confiugration information. @@ -184,7 +184,7 @@ class Config : public virtual Referable * @exception Exception */ virtual void - read ( std::istream & is ) throw ( Exception ); + read ( std::istream & is ); /** * Get a ConfigSection by name. @@ -194,7 +194,7 @@ class Config : public virtual Referable * @exception Exception */ virtual const ConfigSection * - get ( const char * key ) const throw ( Exception ); + get ( const char * key ) const; }; diff --git a/src/FaacEncoder.cpp b/src/FaacEncoder.cpp index 873c560..a68b798 100644 --- a/src/FaacEncoder.cpp +++ b/src/FaacEncoder.cpp @@ -64,7 +64,6 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ bool FaacEncoder :: open ( void ) - throw ( Exception ) { if ( isOpen() ) { close(); @@ -143,7 +142,7 @@ FaacEncoder :: open ( void ) *----------------------------------------------------------------------------*/ unsigned int FaacEncoder :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { if ( !isOpen() || len == 0 ) { return 0; @@ -249,7 +248,6 @@ FaacEncoder :: write ( const void * buf, *----------------------------------------------------------------------------*/ void FaacEncoder :: flush ( void ) - throw ( Exception ) { if ( !isOpen() ) { return; @@ -263,7 +261,7 @@ FaacEncoder :: flush ( void ) * Close the encoding session *----------------------------------------------------------------------------*/ void -FaacEncoder :: close ( void ) throw ( Exception ) +FaacEncoder :: close ( void ) { if ( isOpen() ) { flush(); diff --git a/src/FaacEncoder.h b/src/FaacEncoder.h index 1b222c0..00b86b5 100644 --- a/src/FaacEncoder.h +++ b/src/FaacEncoder.h @@ -131,7 +131,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline void - init ( int lowpass) throw (Exception) + init ( int lowpass) { this->faacOpen = false; this->lowpass = lowpass; @@ -216,7 +216,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { if ( converter ) { #ifdef HAVE_SRC_LIB @@ -238,7 +238,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline - FaacEncoder ( void ) throw ( Exception ) + FaacEncoder ( void ) { throw Exception( __FILE__, __LINE__); } @@ -279,7 +279,6 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter unsigned int outSampleRate = 0, unsigned int outChannel = 0, int lowpass = 0) - throw ( Exception ) : AudioEncoder ( sink, inSampleRate, @@ -323,7 +322,6 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter unsigned int outSampleRate = 0, unsigned int outChannel = 0, int lowpass = 0) - throw ( Exception ) : AudioEncoder ( sink, as, @@ -343,7 +341,6 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter */ inline FaacEncoder ( const FaacEncoder & encoder ) - throw ( Exception ) : AudioEncoder( encoder ) { init( encoder.lowpass); @@ -356,7 +353,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual - ~FaacEncoder ( void ) throw ( Exception ) + ~FaacEncoder ( void ) { if ( isOpen() ) { close(); @@ -372,7 +369,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual FaacEncoder & - operator= ( const FaacEncoder & encoder ) throw ( Exception ) + operator= ( const FaacEncoder & encoder ) { if ( this != &encoder ) { strip(); @@ -417,7 +414,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual bool - start ( void ) throw ( Exception ) + start ( void ) { return open(); } @@ -428,7 +425,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual void - stop ( void ) throw ( Exception ) + stop ( void ) { return close(); } @@ -440,7 +437,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the encoding session is open. @@ -464,7 +461,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { if ( !isOpen() ) { return false; @@ -486,7 +483,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Flush all data that was written to the encoder to the underlying @@ -495,7 +492,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - flush ( void ) throw ( Exception ); + flush ( void ); /** * Close the encoding session. @@ -503,7 +500,7 @@ class FaacEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/FileCast.cpp b/src/FileCast.cpp index 34c01bd..432d67e 100644 --- a/src/FileCast.cpp +++ b/src/FileCast.cpp @@ -73,7 +73,7 @@ static const char fileid[] = "$Id$"; * Open the connection *----------------------------------------------------------------------------*/ bool -FileCast :: open ( void ) throw ( Exception ) +FileCast :: open ( void ) { if ( isOpen() ) { return false; diff --git a/src/FileCast.h b/src/FileCast.h index 45258aa..e548c57 100644 --- a/src/FileCast.h +++ b/src/FileCast.h @@ -74,7 +74,6 @@ class FileCast : public CastSink */ inline void init ( FileSink * targetFile ) - throw ( Exception ) { this->targetFile = targetFile; } @@ -85,7 +84,7 @@ class FileCast : public CastSink * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { if ( isOpen() ) { close(); @@ -101,7 +100,7 @@ class FileCast : public CastSink * @exception Exception */ inline - FileCast ( void ) throw ( Exception ) + FileCast ( void ) { throw Exception( __FILE__, __LINE__); } @@ -114,7 +113,7 @@ class FileCast : public CastSink * @exception Exception */ inline virtual bool - sendLogin ( void ) throw ( Exception ) + sendLogin ( void ) { return true; } @@ -130,7 +129,6 @@ class FileCast : public CastSink */ inline FileCast ( FileSink * targetFile ) - throw ( Exception ) : CastSink( 0, 0, 0) { init( targetFile ); @@ -142,7 +140,7 @@ class FileCast : public CastSink * @param cs the FileCast to copy. */ inline - FileCast( const FileCast & cs ) throw ( Exception ) + FileCast( const FileCast & cs ) { init( targetFile.get() ); } @@ -153,7 +151,7 @@ class FileCast : public CastSink * @exception Exception */ inline virtual - ~FileCast( void ) throw ( Exception ) + ~FileCast( void ) { strip(); } @@ -166,7 +164,7 @@ class FileCast : public CastSink * @exception Exception */ inline virtual FileCast & - operator= ( const FileCast & cs ) throw ( Exception ) + operator= ( const FileCast & cs ) { if ( this != &cs ) { strip(); @@ -182,7 +180,7 @@ class FileCast : public CastSink * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the FileCast is open. @@ -207,7 +205,7 @@ class FileCast : public CastSink */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { return targetFile->canWrite( sec, usec); } @@ -222,7 +220,7 @@ class FileCast : public CastSink */ inline virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { return targetFile->write( buf, len); } @@ -233,7 +231,7 @@ class FileCast : public CastSink * @exception Exception */ inline virtual void - flush ( void ) throw ( Exception ) + flush ( void ) { return targetFile->flush(); } @@ -255,7 +253,7 @@ class FileCast : public CastSink * @exception Exception */ inline virtual void - close ( void ) throw ( Exception ) + close ( void ) { return targetFile->close(); } diff --git a/src/FileSink.cpp b/src/FileSink.cpp index e3c2000..b528c3d 100644 --- a/src/FileSink.cpp +++ b/src/FileSink.cpp @@ -119,7 +119,7 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ void FileSink :: init ( const char * configName, - const char * name ) throw ( Exception ) + const char * name ) { this->configName = Util::strDup(configName); fileName = Util::strDup(name); @@ -131,7 +131,7 @@ FileSink :: init ( const char * configName, * De-initialize the object *----------------------------------------------------------------------------*/ void -FileSink :: strip ( void) throw ( Exception ) +FileSink :: strip ( void) { if ( isOpen() ) { close(); @@ -144,7 +144,7 @@ FileSink :: strip ( void) throw ( Exception ) /*------------------------------------------------------------------------------ * Copy Constructor *----------------------------------------------------------------------------*/ -FileSink :: FileSink ( const FileSink & fs ) throw ( Exception ) +FileSink :: FileSink ( const FileSink & fs ) : Sink( fs ) { int fd; @@ -164,7 +164,7 @@ FileSink :: FileSink ( const FileSink & fs ) throw ( Exception ) * Assignment operator *----------------------------------------------------------------------------*/ FileSink & -FileSink :: operator= ( const FileSink & fs ) throw ( Exception ) +FileSink :: operator= ( const FileSink & fs ) { if ( this != &fs ) { int fd; @@ -210,7 +210,7 @@ FileSink :: exists ( void ) const throw () * Create a file, truncate if already exists *----------------------------------------------------------------------------*/ bool -FileSink :: create ( void ) throw ( Exception ) +FileSink :: create ( void ) { int fd; @@ -234,7 +234,7 @@ FileSink :: create ( void ) throw ( Exception ) * Open the file *----------------------------------------------------------------------------*/ bool -FileSink :: open ( void ) throw ( Exception ) +FileSink :: open ( void ) { if ( isOpen() ) { return false; @@ -254,7 +254,7 @@ FileSink :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool FileSink :: canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timespec timespec; @@ -290,7 +290,7 @@ FileSink :: canWrite ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int FileSink :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { ssize_t ret; @@ -320,7 +320,7 @@ FileSink :: write ( const void * buf, * - $PID is the current process id *----------------------------------------------------------------------------*/ std::string -FileSink :: getArchiveFileName ( void ) throw ( Exception ) +FileSink :: getArchiveFileName ( void ) { pid_t pid = getpid(); std::stringstream metaFileName; @@ -370,7 +370,7 @@ FileSink :: cut ( void ) throw () * Close the FileSink *----------------------------------------------------------------------------*/ void -FileSink :: close ( void ) throw ( Exception ) +FileSink :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/FileSink.h b/src/FileSink.h index 26f39ee..2645e72 100644 --- a/src/FileSink.h +++ b/src/FileSink.h @@ -79,7 +79,7 @@ class FileSink : public Sink, public virtual Reporter */ void init ( const char * configName, - const char * name ) throw ( Exception ); + const char * name ); /** * De-initialize the object. @@ -87,7 +87,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); /** * Get the file name to where to move the data saved so far. @@ -97,7 +97,7 @@ class FileSink : public Sink, public virtual Reporter * @throws Exception on file operation errors */ std::string - getArchiveFileName( void ) throw ( Exception ); + getArchiveFileName( void ); protected: @@ -113,7 +113,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ inline - FileSink ( void ) throw ( Exception ) + FileSink ( void ) { throw Exception( __FILE__, __LINE__); } @@ -131,7 +131,7 @@ class FileSink : public Sink, public virtual Reporter */ inline FileSink( const char * configName, - const char * name ) throw ( Exception ) + const char * name ) { init( configName, name); } @@ -142,7 +142,7 @@ class FileSink : public Sink, public virtual Reporter * @param fsink the FileSink to copy. * @exception Exception */ - FileSink( const FileSink & fsink ) throw ( Exception ); + FileSink( const FileSink & fsink ); /** * Destructor. @@ -150,7 +150,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual - ~FileSink( void ) throw ( Exception ) + ~FileSink( void ) { strip(); } @@ -163,7 +163,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ virtual FileSink & - operator= ( const FileSink & fs ) throw ( Exception ); + operator= ( const FileSink & fs ); /** * Get the file name this FileSink represents. @@ -192,7 +192,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ virtual bool - create ( void ) throw ( Exception ); + create ( void ); /** * Open the file. Truncates the file. @@ -201,7 +201,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the FileSink is open. @@ -225,7 +225,7 @@ class FileSink : public Sink, public virtual Reporter */ virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Write data to the FileSink. @@ -237,7 +237,7 @@ class FileSink : public Sink, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * This is a no-op in this FileSink. @@ -245,7 +245,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ inline virtual void - flush ( void ) throw ( Exception ) + flush ( void ) { } @@ -263,7 +263,7 @@ class FileSink : public Sink, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/IceCast.cpp b/src/IceCast.cpp index 839e1b4..6f9d03a 100644 --- a/src/IceCast.cpp +++ b/src/IceCast.cpp @@ -88,7 +88,6 @@ void IceCast :: init ( const char * mountPoint, const char * description, const char * remoteDumpFile ) - throw ( Exception ) { this->mountPoint = Util::strDup( mountPoint); this->description = description ? Util::strDup( description) : 0; @@ -100,7 +99,7 @@ IceCast :: init ( const char * mountPoint, * De-initialize the object *----------------------------------------------------------------------------*/ void -IceCast :: strip ( void ) throw ( Exception ) +IceCast :: strip ( void ) { delete[] mountPoint; if ( description ) { @@ -116,7 +115,7 @@ IceCast :: strip ( void ) throw ( Exception ) * Log in to the IceCast server *----------------------------------------------------------------------------*/ bool -IceCast :: sendLogin ( void ) throw ( Exception ) +IceCast :: sendLogin ( void ) { Sink * sink = getSink(); Source * source = getSocket(); diff --git a/src/IceCast.h b/src/IceCast.h index 5d3eb1d..3e61610 100644 --- a/src/IceCast.h +++ b/src/IceCast.h @@ -86,8 +86,7 @@ class IceCast : public CastSink void init ( const char * mountPoint, const char * description, - const char * remoteDumpFile ) - throw ( Exception ); + const char * remoteDumpFile ); /** * De-initalize the object. @@ -95,7 +94,7 @@ class IceCast : public CastSink * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -106,7 +105,7 @@ class IceCast : public CastSink * @exception Exception */ inline - IceCast ( void ) throw ( Exception ) + IceCast ( void ) { throw Exception( __FILE__, __LINE__); } @@ -118,7 +117,7 @@ class IceCast : public CastSink * @exception Exception */ virtual bool - sendLogin ( void ) throw ( Exception ); + sendLogin ( void ); public: @@ -154,7 +153,6 @@ class IceCast : public CastSink bool isPublic = false, const char * remoteDumpFile = 0, Sink * streamDump = 0 ) - throw ( Exception ) : CastSink( socket, password, bitRate, @@ -173,7 +171,7 @@ class IceCast : public CastSink * @param cs the IceCast to copy. */ inline - IceCast( const IceCast & cs ) throw ( Exception ) + IceCast( const IceCast & cs ) : CastSink( cs ) { init( cs.getMountPoint(), @@ -187,7 +185,7 @@ class IceCast : public CastSink * @exception Exception */ inline virtual - ~IceCast( void ) throw ( Exception ) + ~IceCast( void ) { strip(); } @@ -200,7 +198,7 @@ class IceCast : public CastSink * @exception Exception */ inline virtual IceCast & - operator= ( const IceCast & cs ) throw ( Exception ) + operator= ( const IceCast & cs ) { if ( this != &cs ) { strip(); diff --git a/src/IceCast2.cpp b/src/IceCast2.cpp index 58a1c4d..274f11a 100644 --- a/src/IceCast2.cpp +++ b/src/IceCast2.cpp @@ -91,7 +91,6 @@ void IceCast2 :: init ( StreamFormat format, const char * mountPoint, const char * description ) - throw ( Exception ) { this->format = format; this->mountPoint = Util::strDup( mountPoint); @@ -103,7 +102,7 @@ IceCast2 :: init ( StreamFormat format, * De-initialize the object *----------------------------------------------------------------------------*/ void -IceCast2 :: strip ( void ) throw ( Exception ) +IceCast2 :: strip ( void ) { delete[] mountPoint; if ( description ) { @@ -116,7 +115,7 @@ IceCast2 :: strip ( void ) throw ( Exception ) * Log in to the IceCast2 server *----------------------------------------------------------------------------*/ bool -IceCast2 :: sendLogin ( void ) throw ( Exception ) +IceCast2 :: sendLogin ( void ) { Sink * sink = getSink(); Source * source = getSocket(); diff --git a/src/IceCast2.h b/src/IceCast2.h index 9719815..7b6b695 100644 --- a/src/IceCast2.h +++ b/src/IceCast2.h @@ -94,8 +94,7 @@ class IceCast2 : public CastSink void init ( StreamFormat format, const char * mountPoint, - const char * description ) - throw ( Exception ); + const char * description ); /** * De-initalize the object. @@ -103,7 +102,7 @@ class IceCast2 : public CastSink * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -114,7 +113,7 @@ class IceCast2 : public CastSink * @exception Exception */ inline - IceCast2 ( void ) throw ( Exception ) + IceCast2 ( void ) { throw Exception( __FILE__, __LINE__); } @@ -126,7 +125,7 @@ class IceCast2 : public CastSink * @exception Exception */ virtual bool - sendLogin ( void ) throw ( Exception ); + sendLogin ( void ); public: @@ -162,7 +161,6 @@ class IceCast2 : public CastSink const char * genre = 0, bool isPublic = false, Sink * streamDump = 0 ) - throw ( Exception ) : CastSink( socket, password, bitRate, @@ -181,7 +179,7 @@ class IceCast2 : public CastSink * @param cs the IceCast2 to copy. */ inline - IceCast2( const IceCast2 & cs ) throw ( Exception ) + IceCast2( const IceCast2 & cs ) : CastSink( cs ) { init( cs.getFormat(), @@ -195,7 +193,7 @@ class IceCast2 : public CastSink * @exception Exception */ inline virtual - ~IceCast2( void ) throw ( Exception ) + ~IceCast2( void ) { strip(); } @@ -208,7 +206,7 @@ class IceCast2 : public CastSink * @exception Exception */ inline virtual IceCast2 & - operator= ( const IceCast2 & cs ) throw ( Exception ) + operator= ( const IceCast2 & cs ) { if ( this != &cs ) { strip(); diff --git a/src/LameLibEncoder.cpp b/src/LameLibEncoder.cpp index 688c2aa..05cab13 100644 --- a/src/LameLibEncoder.cpp +++ b/src/LameLibEncoder.cpp @@ -64,7 +64,6 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ bool LameLibEncoder :: open ( void ) - throw ( Exception ) { if ( isOpen() ) { close(); @@ -275,7 +274,7 @@ LameLibEncoder :: open ( void ) *----------------------------------------------------------------------------*/ unsigned int LameLibEncoder :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { if ( !isOpen() || len == 0 ) { return 0; @@ -349,7 +348,6 @@ LameLibEncoder :: write ( const void * buf, *----------------------------------------------------------------------------*/ void LameLibEncoder :: flush ( void ) - throw ( Exception ) { if ( !isOpen() ) { return; @@ -380,7 +378,7 @@ LameLibEncoder :: flush ( void ) * Close the encoding session *----------------------------------------------------------------------------*/ void -LameLibEncoder :: close ( void ) throw ( Exception ) +LameLibEncoder :: close ( void ) { if ( isOpen() ) { flush(); diff --git a/src/LameLibEncoder.h b/src/LameLibEncoder.h index d744c95..4f502d9 100644 --- a/src/LameLibEncoder.h +++ b/src/LameLibEncoder.h @@ -105,7 +105,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter */ inline void init ( int lowpass, - int highpass ) throw ( Exception ) + int highpass ) { this->lameGlobalFlags = NULL; this->lowpass = lowpass; @@ -140,7 +140,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { } @@ -153,7 +153,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline - LameLibEncoder ( void ) throw ( Exception ) + LameLibEncoder ( void ) { throw Exception( __FILE__, __LINE__); } @@ -199,7 +199,6 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter unsigned int outChannel = 0, int lowpass = 0, int highpass = 0 ) - throw ( Exception ) : AudioEncoder ( sink, inSampleRate, @@ -248,7 +247,6 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter unsigned int outChannel = 0, int lowpass = 0, int highpass = 0 ) - throw ( Exception ) : AudioEncoder ( sink, as, @@ -268,7 +266,6 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter */ inline LameLibEncoder ( const LameLibEncoder & encoder ) - throw ( Exception ) : AudioEncoder( encoder ) { init( encoder.lowpass, encoder.highpass ); @@ -281,7 +278,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual - ~LameLibEncoder ( void ) throw ( Exception ) + ~LameLibEncoder ( void ) { if ( isOpen() ) { close(); @@ -297,7 +294,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual LameLibEncoder & - operator= ( const LameLibEncoder & encoder ) throw ( Exception ) + operator= ( const LameLibEncoder & encoder ) { if ( this != &encoder ) { strip(); @@ -338,7 +335,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual bool - start ( void ) throw ( Exception ) + start ( void ) { return open(); } @@ -349,7 +346,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual void - stop ( void ) throw ( Exception ) + stop ( void ) { return close(); } @@ -361,7 +358,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the encoding session is open. @@ -385,7 +382,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { if ( !isOpen() ) { return false; @@ -407,7 +404,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Flush all data that was written to the encoder to the underlying @@ -416,7 +413,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - flush ( void ) throw ( Exception ); + flush ( void ); /** * Close the encoding session. @@ -424,7 +421,7 @@ class LameLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/MultiThreadedConnector.cpp b/src/MultiThreadedConnector.cpp index 40c34fa..61ac11e 100644 --- a/src/MultiThreadedConnector.cpp +++ b/src/MultiThreadedConnector.cpp @@ -65,7 +65,7 @@ static const char fileid[] = "$Id$"; * Initialize the object *----------------------------------------------------------------------------*/ void -MultiThreadedConnector :: init ( bool reconnect ) throw ( Exception ) +MultiThreadedConnector :: init ( bool reconnect ) { this->reconnect = reconnect; @@ -79,7 +79,7 @@ MultiThreadedConnector :: init ( bool reconnect ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -MultiThreadedConnector :: strip ( void ) throw ( Exception ) +MultiThreadedConnector :: strip ( void ) { if ( threads ) { delete[] threads; @@ -96,7 +96,6 @@ MultiThreadedConnector :: strip ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ MultiThreadedConnector :: MultiThreadedConnector ( const MultiThreadedConnector & connector ) - throw ( Exception ) : Connector( connector) { reconnect = connector.reconnect; @@ -118,7 +117,6 @@ MultiThreadedConnector :: MultiThreadedConnector ( *----------------------------------------------------------------------------*/ MultiThreadedConnector & MultiThreadedConnector :: operator= ( const MultiThreadedConnector & connector ) - throw ( Exception ) { if ( this != &connector ) { Connector::operator=( connector); @@ -145,7 +143,7 @@ MultiThreadedConnector :: operator= ( const MultiThreadedConnector & connector ) * Create the sink threads *----------------------------------------------------------------------------*/ bool -MultiThreadedConnector :: open ( void ) throw ( Exception ) +MultiThreadedConnector :: open ( void ) { unsigned int i; size_t st; @@ -214,7 +212,6 @@ MultiThreadedConnector :: transfer ( unsigned long bytes, unsigned int bufSize, unsigned int sec, unsigned int usec ) - throw ( Exception ) { unsigned int b; @@ -364,7 +361,7 @@ MultiThreadedConnector :: cut ( void ) throw () * Close the source and all the sinks if needed *----------------------------------------------------------------------------*/ void -MultiThreadedConnector :: close ( void ) throw ( Exception ) +MultiThreadedConnector :: close ( void ) { unsigned int i; diff --git a/src/MultiThreadedConnector.h b/src/MultiThreadedConnector.h index eef1345..5b56512 100644 --- a/src/MultiThreadedConnector.h +++ b/src/MultiThreadedConnector.h @@ -188,7 +188,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ void - init ( bool reconnect ) throw ( Exception ); + init ( bool reconnect ); /** * De-initialize the object. @@ -196,7 +196,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -206,7 +206,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ inline - MultiThreadedConnector ( void ) throw ( Exception ) + MultiThreadedConnector ( void ) { throw Exception( __FILE__, __LINE__); } @@ -226,7 +226,6 @@ class MultiThreadedConnector : public virtual Connector inline MultiThreadedConnector ( Source * source, bool reconnect ) - throw ( Exception ) : Connector( source ) { init(reconnect); @@ -246,7 +245,6 @@ class MultiThreadedConnector : public virtual Connector MultiThreadedConnector ( Source * source, Sink * sink, bool reconnect ) - throw ( Exception ) : Connector( source, sink) { init(reconnect); @@ -258,8 +256,7 @@ class MultiThreadedConnector : public virtual Connector * @param connector the object to copy. * @exception Exception */ - MultiThreadedConnector ( const MultiThreadedConnector & connector ) - throw ( Exception ); + MultiThreadedConnector ( const MultiThreadedConnector & connector ); /** * Destructor. @@ -267,7 +264,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ inline virtual - ~MultiThreadedConnector( void ) throw ( Exception ) + ~MultiThreadedConnector( void ) { strip(); } @@ -280,8 +277,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ virtual MultiThreadedConnector & - operator= ( const MultiThreadedConnector & connector ) - throw ( Exception ); + operator= ( const MultiThreadedConnector & connector ); /** * Open the connector. Opens the Source and the Sinks if necessary. @@ -290,7 +286,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Transfer a given amount of data from the Source to all the @@ -318,7 +314,7 @@ class MultiThreadedConnector : public virtual Connector transfer ( unsigned long bytes, unsigned int bufSize, unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Signal to each sink we have that they need to cut what they are @@ -335,7 +331,7 @@ class MultiThreadedConnector : public virtual Connector * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); /** * This is the worker function for each thread. diff --git a/src/OssDspSource.cpp b/src/OssDspSource.cpp index 23493a8..46b77de 100644 --- a/src/OssDspSource.cpp +++ b/src/OssDspSource.cpp @@ -140,7 +140,7 @@ OssDspSource :: isBigEndian ( void ) const throw () * Initialize the object *----------------------------------------------------------------------------*/ void -OssDspSource :: init ( const char * name ) throw ( Exception ) +OssDspSource :: init ( const char * name ) { fileName = Util::strDup( name); fileDescriptor = 0; @@ -152,7 +152,7 @@ OssDspSource :: init ( const char * name ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -OssDspSource :: strip ( void ) throw ( Exception ) +OssDspSource :: strip ( void ) { if ( isOpen() ) { close(); @@ -166,7 +166,7 @@ OssDspSource :: strip ( void ) throw ( Exception ) * Open the audio source *----------------------------------------------------------------------------*/ bool -OssDspSource :: open ( void ) throw ( Exception ) +OssDspSource :: open ( void ) { int format; int i; @@ -233,7 +233,7 @@ OssDspSource :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool OssDspSource :: canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timespec timespec; @@ -277,7 +277,7 @@ OssDspSource :: canRead ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int OssDspSource :: read ( void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { ssize_t ret; @@ -300,7 +300,7 @@ OssDspSource :: read ( void * buf, * Close the audio source *----------------------------------------------------------------------------*/ void -OssDspSource :: close ( void ) throw ( Exception ) +OssDspSource :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/OssDspSource.h b/src/OssDspSource.h index 6734bd7..3aa11e0 100644 --- a/src/OssDspSource.h +++ b/src/OssDspSource.h @@ -83,7 +83,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline - OssDspSource ( void ) throw ( Exception ) + OssDspSource ( void ) { throw Exception( __FILE__, __LINE__); } @@ -95,7 +95,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - init ( const char * name ) throw ( Exception ); + init ( const char * name ); /** * De-iitialize the object @@ -103,7 +103,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); public: @@ -124,7 +124,6 @@ class OssDspSource : public AudioSource, public virtual Reporter int sampleRate = 44100, int bitsPerSample = 16, int channel = 2 ) - throw ( Exception ) : AudioSource( sampleRate, bitsPerSample, channel) { @@ -138,7 +137,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline - OssDspSource ( const OssDspSource & ods ) throw ( Exception ) + OssDspSource ( const OssDspSource & ods ) : AudioSource( ods ) { init( ods.fileName); @@ -150,7 +149,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual - ~OssDspSource ( void ) throw ( Exception ) + ~OssDspSource ( void ) { strip(); } @@ -163,7 +162,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual OssDspSource & - operator= ( const OssDspSource & ds ) throw ( Exception ) + operator= ( const OssDspSource & ds ) { if ( this != &ds ) { strip(); @@ -193,7 +192,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @see #read */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the OssDspSource is open. @@ -219,7 +218,7 @@ class OssDspSource : public AudioSource, public virtual Reporter */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Read from the OssDspSource. @@ -232,7 +231,7 @@ class OssDspSource : public AudioSource, public virtual Reporter */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Close the OssDspSource. @@ -240,7 +239,7 @@ class OssDspSource : public AudioSource, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/Ref.h b/src/Ref.h index 810f7ae..cbd7a91 100644 --- a/src/Ref.h +++ b/src/Ref.h @@ -111,7 +111,7 @@ class Ref * @exception Exception */ inline - Ref ( const Ref & other ) throw ( Exception ) + Ref ( const Ref & other ) { object = NULL; set( other.object); @@ -124,7 +124,7 @@ class Ref * @exception Exception */ inline - Ref ( T * obj ) throw ( Exception ) + Ref ( T * obj ) { object = obj; obj->increaseReferenceCount(); @@ -136,7 +136,7 @@ class Ref * @exception Exception */ inline virtual - ~Ref ( void ) throw ( Exception ) + ~Ref ( void ) { set( 0 ); } @@ -147,7 +147,7 @@ class Ref * @return the pointer to the object referenced. */ inline T* - operator->() const throw ( Exception ) + operator->() const { if ( !object ) { throw Exception( __FILE__, __LINE__, @@ -164,7 +164,7 @@ class Ref * @exception Exception */ inline Ref & - operator= ( Ref other ) throw ( Exception ) + operator= ( Ref other ) { set( other.object); return *this; @@ -178,7 +178,7 @@ class Ref * @exception Exception */ inline Ref & - operator= ( T* obj ) throw ( Exception ) + operator= ( T* obj ) { set( obj); return *this; @@ -192,7 +192,7 @@ class Ref * @exception Exception */ inline void - set ( T * newobj ) throw ( Exception ) + set ( T * newobj ) { // If equal do nothing if ( newobj == object ) { diff --git a/src/Referable.h b/src/Referable.h index 46b820c..bfb049c 100644 --- a/src/Referable.h +++ b/src/Referable.h @@ -99,7 +99,7 @@ class Referable * @exception Exception */ inline virtual - ~Referable ( void ) throw ( Exception ) + ~Referable ( void ) { if ( referenceCount > 0 ) { throw Exception( __FILE__, __LINE__, @@ -118,7 +118,7 @@ class Referable * @exception Exception */ inline unsigned int - increaseReferenceCount ( void ) throw ( Exception ) + increaseReferenceCount ( void ) { if ( referenceCount >= maxCount ) { throw Exception( __FILE__, @@ -136,7 +136,7 @@ class Referable * @exception Exception */ inline unsigned int - decreaseReferenceCount ( void ) throw ( Exception ) + decreaseReferenceCount ( void ) { if ( referenceCount == 0 ) { throw Exception( __FILE__, __LINE__, diff --git a/src/Reporter.h b/src/Reporter.h index d30109f..44bee32 100644 --- a/src/Reporter.h +++ b/src/Reporter.h @@ -129,7 +129,7 @@ class Reporter * @exception Exception */ inline virtual - ~Reporter ( void ) throw ( Exception ) + ~Reporter ( void ) { (Reporter::os)->flush(); } diff --git a/src/SerialUlaw.cpp b/src/SerialUlaw.cpp index 37ce26a..8a6d554 100644 --- a/src/SerialUlaw.cpp +++ b/src/SerialUlaw.cpp @@ -174,7 +174,7 @@ SerialUlaw :: isBigEndian ( void ) const throw () * Initialize the object *----------------------------------------------------------------------------*/ void -SerialUlaw :: init ( const char * name ) throw ( Exception ) +SerialUlaw :: init ( const char * name ) { fileName = Util::strDup( name); fileDescriptor = 0; @@ -186,7 +186,7 @@ SerialUlaw :: init ( const char * name ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -SerialUlaw :: strip ( void ) throw ( Exception ) +SerialUlaw :: strip ( void ) { if ( isOpen() ) { close(); @@ -200,7 +200,7 @@ SerialUlaw :: strip ( void ) throw ( Exception ) * Open the audio source *----------------------------------------------------------------------------*/ bool -SerialUlaw :: open ( void ) throw ( Exception ) +SerialUlaw :: open ( void ) { struct termios ts; @@ -254,7 +254,7 @@ SerialUlaw :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool SerialUlaw :: canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timeval tv; @@ -284,7 +284,7 @@ SerialUlaw :: canRead ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int SerialUlaw :: read ( void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { ssize_t ret; unsigned char ubuf[256], * ptr; @@ -323,7 +323,7 @@ SerialUlaw :: read ( void * buf, * Close the audio source *----------------------------------------------------------------------------*/ void -SerialUlaw :: close ( void ) throw ( Exception ) +SerialUlaw :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/SerialUlaw.h b/src/SerialUlaw.h index 24ef8a9..528d17f 100644 --- a/src/SerialUlaw.h +++ b/src/SerialUlaw.h @@ -84,7 +84,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ inline - SerialUlaw ( void ) throw ( Exception ) + SerialUlaw ( void ) { throw Exception( __FILE__, __LINE__); } @@ -96,7 +96,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ void - init ( const char * name ) throw ( Exception ); + init ( const char * name ); /** * De-iitialize the object @@ -104,7 +104,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); public: @@ -125,7 +125,6 @@ class SerialUlaw : public AudioSource, public virtual Reporter int sampleRate = 44100, int bitsPerSample = 16, int channel = 2 ) - throw ( Exception ) : AudioSource( sampleRate, bitsPerSample, channel) { @@ -139,7 +138,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ inline - SerialUlaw ( const SerialUlaw & ods ) throw ( Exception ) + SerialUlaw ( const SerialUlaw & ods ) : AudioSource( ods ) { init( ods.fileName); @@ -151,7 +150,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual - ~SerialUlaw ( void ) throw ( Exception ) + ~SerialUlaw ( void ) { strip(); } @@ -164,7 +163,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual SerialUlaw & - operator= ( const SerialUlaw & ds ) throw ( Exception ) + operator= ( const SerialUlaw & ds ) { if ( this != &ds ) { strip(); @@ -194,7 +193,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @see #read */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the SerialUlaw is open. @@ -220,7 +219,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Read from the SerialUlaw. @@ -233,7 +232,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Close the SerialUlaw. @@ -241,7 +240,7 @@ class SerialUlaw : public AudioSource, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/ShoutCast.cpp b/src/ShoutCast.cpp index 058f394..03f0ab8 100644 --- a/src/ShoutCast.cpp +++ b/src/ShoutCast.cpp @@ -91,7 +91,6 @@ ShoutCast :: init ( const char * irc, const char * aim, const char * icq, const char * mountPoint ) - throw ( Exception ) { this->irc = irc ? Util::strDup( irc) : 0; this->aim = aim ? Util::strDup( aim) : 0; @@ -104,7 +103,7 @@ ShoutCast :: init ( const char * irc, * De-initialize the object *----------------------------------------------------------------------------*/ void -ShoutCast :: strip ( void ) throw ( Exception ) +ShoutCast :: strip ( void ) { if ( irc ) { delete[] irc; @@ -125,7 +124,7 @@ ShoutCast :: strip ( void ) throw ( Exception ) * Log in to the ShoutCast server using the icy login scheme *----------------------------------------------------------------------------*/ bool -ShoutCast :: sendLogin ( void ) throw ( Exception ) +ShoutCast :: sendLogin ( void ) { Sink * sink = getSink(); Source * source = getSocket(); diff --git a/src/ShoutCast.h b/src/ShoutCast.h index 9f0048e..063d57b 100644 --- a/src/ShoutCast.h +++ b/src/ShoutCast.h @@ -93,8 +93,7 @@ class ShoutCast : public CastSink init ( const char * irc, const char * aim, const char * icq, - const char * mountPoint ) - throw ( Exception ); + const char * mountPoint ); /** * De-initalize the object. @@ -102,7 +101,7 @@ class ShoutCast : public CastSink * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -113,7 +112,7 @@ class ShoutCast : public CastSink * @exception Exception */ inline - ShoutCast ( void ) throw ( Exception ) + ShoutCast ( void ) { throw Exception( __FILE__, __LINE__); } @@ -125,7 +124,7 @@ class ShoutCast : public CastSink * @exception Exception */ virtual bool - sendLogin ( void ) throw ( Exception ); + sendLogin ( void ); public: @@ -163,7 +162,6 @@ class ShoutCast : public CastSink const char * aim = 0, const char * icq = 0, Sink * streamDump = 0 ) - throw ( Exception ) : CastSink( socket, password, bitRate, @@ -182,7 +180,7 @@ class ShoutCast : public CastSink * @param cs the ShoutCast to copy. */ inline - ShoutCast( const ShoutCast & cs ) throw ( Exception ) + ShoutCast( const ShoutCast & cs ) : CastSink( cs ) { init( cs.getIrc(), cs.getAim(), cs.getIcq(), cs.getMountPoint()); @@ -194,7 +192,7 @@ class ShoutCast : public CastSink * @exception Exception */ inline virtual - ~ShoutCast( void ) throw ( Exception ) + ~ShoutCast( void ) { strip(); } @@ -207,7 +205,7 @@ class ShoutCast : public CastSink * @exception Exception */ inline virtual ShoutCast & - operator= ( const ShoutCast & cs ) throw ( Exception ) + operator= ( const ShoutCast & cs ) { if ( this != &cs ) { strip(); diff --git a/src/Sink.h b/src/Sink.h index 680bf97..6bae2e1 100644 --- a/src/Sink.h +++ b/src/Sink.h @@ -87,7 +87,7 @@ class Sink : public virtual Referable * @exception Exception */ inline virtual Sink & - operator= ( const Sink & sink ) throw ( Exception ) + operator= ( const Sink & sink ) { return *this; } @@ -101,7 +101,7 @@ class Sink : public virtual Referable * @exception Exception */ inline virtual - ~Sink ( void ) throw ( Exception ) + ~Sink ( void ) { } @@ -112,7 +112,7 @@ class Sink : public virtual Referable * @exception Exception */ virtual bool - open ( void ) throw ( Exception ) = 0; + open ( void ) = 0; /** * Check if the Sink is open. @@ -133,7 +133,7 @@ class Sink : public virtual Referable */ virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) = 0; + unsigned int usec ) = 0; /** * Write data to the Sink. @@ -145,7 +145,7 @@ class Sink : public virtual Referable */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ) = 0; + unsigned int len ) = 0; /** * Flush all data that was written to the Sink to the underlying @@ -154,7 +154,7 @@ class Sink : public virtual Referable * @exception Exception */ virtual void - flush ( void ) throw ( Exception ) = 0; + flush ( void ) = 0; /** * Cut what the sink has been doing so far, and start anew. @@ -170,7 +170,7 @@ class Sink : public virtual Referable * @exception Exception */ virtual void - close ( void ) throw ( Exception ) = 0; + close ( void ) = 0; }; diff --git a/src/SolarisDspSource.cpp b/src/SolarisDspSource.cpp index de3d1c0..737be7e 100644 --- a/src/SolarisDspSource.cpp +++ b/src/SolarisDspSource.cpp @@ -120,7 +120,7 @@ static const char fileid[] = "$Id$"; * Initialize the object *----------------------------------------------------------------------------*/ void -SolarisDspSource :: init ( const char * name ) throw ( Exception ) +SolarisDspSource :: init ( const char * name ) { fileName = Util::strDup( name); fileDescriptor = 0; @@ -131,7 +131,7 @@ SolarisDspSource :: init ( const char * name ) throw ( Exception ) * De-initialize the object *----------------------------------------------------------------------------*/ void -SolarisDspSource :: strip ( void ) throw ( Exception ) +SolarisDspSource :: strip ( void ) { if ( isOpen() ) { close(); @@ -146,7 +146,7 @@ SolarisDspSource :: strip ( void ) throw ( Exception ) * Open the audio source *----------------------------------------------------------------------------*/ bool -SolarisDspSource :: open ( void ) throw ( Exception ) +SolarisDspSource :: open ( void ) { audio_info_t audioInfo; @@ -205,7 +205,7 @@ SolarisDspSource :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool SolarisDspSource :: canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timespec timespec; @@ -241,7 +241,7 @@ SolarisDspSource :: canRead ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int SolarisDspSource :: read ( void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { ssize_t ret; @@ -263,7 +263,7 @@ SolarisDspSource :: read ( void * buf, * Close the audio source *----------------------------------------------------------------------------*/ void -SolarisDspSource :: close ( void ) throw ( Exception ) +SolarisDspSource :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/SolarisDspSource.h b/src/SolarisDspSource.h index b795eff..7719ab0 100644 --- a/src/SolarisDspSource.h +++ b/src/SolarisDspSource.h @@ -77,7 +77,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline - SolarisDspSource ( void ) throw ( Exception ) + SolarisDspSource ( void ) { throw Exception( __FILE__, __LINE__); } @@ -89,7 +89,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - init ( const char * name ) throw ( Exception ); + init ( const char * name ); /** * De-iitialize the object @@ -97,7 +97,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); public: @@ -118,7 +118,6 @@ class SolarisDspSource : public AudioSource, public virtual Reporter int sampleRate = 44100, int bitsPerSample = 16, int channel = 2 ) - throw ( Exception ) : AudioSource( sampleRate, bitsPerSample, channel) { @@ -133,7 +132,6 @@ class SolarisDspSource : public AudioSource, public virtual Reporter */ inline SolarisDspSource ( const SolarisDspSource & sds ) - throw ( Exception ) : AudioSource( sds ) { init( sds.fileName); @@ -145,7 +143,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual - ~SolarisDspSource ( void ) throw ( Exception ) + ~SolarisDspSource ( void ) { strip(); } @@ -158,7 +156,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ inline virtual SolarisDspSource & - operator= ( const SolarisDspSource & ds ) throw ( Exception ) + operator= ( const SolarisDspSource & ds ) { if ( this != &ds ) { strip(); @@ -195,7 +193,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @see #read */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the SolarisDspSource is open. @@ -221,7 +219,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Read from the SolarisDspSource. @@ -234,7 +232,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Close the SolarisDspSource. @@ -242,7 +240,7 @@ class SolarisDspSource : public AudioSource, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/Source.h b/src/Source.h index 95db07d..3697c2b 100644 --- a/src/Source.h +++ b/src/Source.h @@ -66,7 +66,7 @@ class Source : public virtual Referable * @exception Exception */ inline - Source ( void ) throw ( Exception ) + Source ( void ) { } @@ -77,7 +77,7 @@ class Source : public virtual Referable * @exception Exception */ inline - Source ( const Source & source ) throw ( Exception ) + Source ( const Source & source ) { } @@ -89,7 +89,7 @@ class Source : public virtual Referable * @exception Exception */ inline virtual Source & - operator= ( const Source & source ) throw ( Exception ) + operator= ( const Source & source ) { return *this; } @@ -103,7 +103,7 @@ class Source : public virtual Referable * @exception Exception */ inline virtual - ~Source ( void ) throw ( Exception ) + ~Source ( void ) { } @@ -114,7 +114,7 @@ class Source : public virtual Referable * @exception Exception */ virtual bool - open ( void ) throw ( Exception ) = 0; + open ( void ) = 0; /** * Check if the Source is open. @@ -136,7 +136,7 @@ class Source : public virtual Referable */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) = 0; + unsigned int usec ) = 0; /** * Read from the Source. @@ -148,7 +148,7 @@ class Source : public virtual Referable */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ) = 0; + unsigned int len ) = 0; /** * Close the Source. @@ -156,7 +156,7 @@ class Source : public virtual Referable * @exception Exception */ virtual void - close ( void ) throw ( Exception ) = 0; + close ( void ) = 0; }; diff --git a/src/TcpSocket.cpp b/src/TcpSocket.cpp index 2b8e07c..66e05a5 100644 --- a/src/TcpSocket.cpp +++ b/src/TcpSocket.cpp @@ -114,7 +114,7 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ void TcpSocket :: init ( const char * host, - unsigned short port ) throw ( Exception ) + unsigned short port ) { this->host = Util::strDup( host); this->port = port; @@ -126,7 +126,7 @@ TcpSocket :: init ( const char * host, * De-initialize the object *----------------------------------------------------------------------------*/ void -TcpSocket :: strip ( void) throw ( Exception ) +TcpSocket :: strip ( void) { if ( isOpen() ) { close(); @@ -139,7 +139,7 @@ TcpSocket :: strip ( void) throw ( Exception ) /*------------------------------------------------------------------------------ * Copy Constructor *----------------------------------------------------------------------------*/ -TcpSocket :: TcpSocket ( const TcpSocket & ss ) throw ( Exception ) +TcpSocket :: TcpSocket ( const TcpSocket & ss ) : Source( ss), Sink( ss ) { int fd; @@ -159,7 +159,7 @@ TcpSocket :: TcpSocket ( const TcpSocket & ss ) throw ( Exception ) * Assignment operator *----------------------------------------------------------------------------*/ TcpSocket & -TcpSocket :: operator= ( const TcpSocket & ss ) throw ( Exception ) +TcpSocket :: operator= ( const TcpSocket & ss ) { if ( this != &ss ) { int fd; @@ -190,7 +190,7 @@ TcpSocket :: operator= ( const TcpSocket & ss ) throw ( Exception ) * Open the file *----------------------------------------------------------------------------*/ bool -TcpSocket :: open ( void ) throw ( Exception ) +TcpSocket :: open ( void ) { int optval; socklen_t optlen; @@ -260,7 +260,7 @@ TcpSocket :: open ( void ) throw ( Exception ) *----------------------------------------------------------------------------*/ bool TcpSocket :: canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timespec timespec; @@ -298,7 +298,7 @@ TcpSocket :: canRead ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int TcpSocket :: read ( void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { int ret; @@ -333,7 +333,7 @@ TcpSocket :: read ( void * buf, *----------------------------------------------------------------------------*/ bool TcpSocket :: canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { fd_set fdset; struct timespec timespec; @@ -371,7 +371,7 @@ TcpSocket :: canWrite ( unsigned int sec, *----------------------------------------------------------------------------*/ unsigned int TcpSocket :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { int ret; @@ -404,7 +404,7 @@ TcpSocket :: write ( const void * buf, * Close the socket *----------------------------------------------------------------------------*/ void -TcpSocket :: close ( void ) throw ( Exception ) +TcpSocket :: close ( void ) { if ( !isOpen() ) { return; diff --git a/src/TcpSocket.h b/src/TcpSocket.h index 4a43971..2b6fbfb 100644 --- a/src/TcpSocket.h +++ b/src/TcpSocket.h @@ -83,7 +83,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ void init ( const char * host, - unsigned short port ) throw ( Exception ); + unsigned short port ); /** * De-initialize the object. @@ -91,7 +91,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ void - strip ( void ) throw ( Exception ); + strip ( void ); protected: @@ -102,7 +102,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ inline - TcpSocket ( void ) throw ( Exception ) + TcpSocket ( void ) { throw Exception( __FILE__, __LINE__); } @@ -119,7 +119,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ inline TcpSocket( const char * host, - unsigned short port ) throw ( Exception ) + unsigned short port ) { init( host, port); } @@ -130,7 +130,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @param ss the TcpSocket to copy. * @exception Exception */ - TcpSocket( const TcpSocket & ss ) throw ( Exception ); + TcpSocket( const TcpSocket & ss ); /** * Destructor. @@ -138,7 +138,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ inline virtual - ~TcpSocket( void ) throw ( Exception ) + ~TcpSocket( void ) { strip(); } @@ -151,7 +151,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ inline virtual TcpSocket & - operator= ( const TcpSocket & ss ) throw ( Exception ); + operator= ( const TcpSocket & ss ); /** * Get the host this socket connects to. @@ -182,7 +182,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the TcpSocket is open. @@ -207,7 +207,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ virtual bool canRead ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Read from the TcpSocket. @@ -219,7 +219,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ virtual unsigned int read ( void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** @@ -234,7 +234,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ); + unsigned int usec ); /** * Write data to the TcpSocket. @@ -246,7 +246,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Flush all data that was written to the TcpSocket to the underlying @@ -255,7 +255,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ inline virtual void - flush ( void ) throw ( Exception ) + flush ( void ) { } @@ -277,7 +277,7 @@ class TcpSocket : public Source, public Sink, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); }; diff --git a/src/Util.cpp b/src/Util.cpp index b664137..f1e3032 100644 --- a/src/Util.cpp +++ b/src/Util.cpp @@ -124,7 +124,7 @@ Util :: base64Table[] = { * w/o the zero-termination *----------------------------------------------------------------------------*/ unsigned int -Util :: strLen( const char * str ) throw ( Exception ) +Util :: strLen( const char * str ) { size_t len; @@ -143,7 +143,7 @@ Util :: strLen( const char * str ) throw ( Exception ) *----------------------------------------------------------------------------*/ void Util :: strCpy ( char * dest, - const char * src ) throw ( Exception ) + const char * src ) { if ( !dest || !src ) { throw Exception( __FILE__, __LINE__, "no src or dest"); @@ -158,7 +158,7 @@ Util :: strCpy ( char * dest, *----------------------------------------------------------------------------*/ void Util :: strCat ( char * dest, - const char * src ) throw ( Exception ) + const char * src ) { if ( !dest || !src ) { throw Exception( __FILE__, __LINE__, "no src or dest"); @@ -173,7 +173,7 @@ Util :: strCat ( char * dest, * The returned string must be freed with delete[] *----------------------------------------------------------------------------*/ char * -Util :: strDup( const char * str ) throw ( Exception ) +Util :: strDup( const char * str ) { size_t len; char * s; @@ -194,7 +194,7 @@ Util :: strDup( const char * str ) throw ( Exception ) * Convert a string into base64 encoding. *----------------------------------------------------------------------------*/ char * -Util :: base64Encode( const char * str ) throw ( Exception ) +Util :: base64Encode( const char * str ) { if ( !str ) { throw Exception( __FILE__, __LINE__, "no str"); @@ -240,7 +240,7 @@ Util :: base64Encode( const char * str ) throw ( Exception ) bool Util :: strEq( const char * str1, const char * str2, - unsigned int len ) throw ( Exception ) + unsigned int len ) { if ( !str1 || !str2 ) { throw Exception( __FILE__, __LINE__, "no str1 or no str2"); @@ -254,7 +254,7 @@ Util :: strEq( const char * str1, * Convert a string to a long integer *----------------------------------------------------------------------------*/ long int -Util :: strToL( const char *str) throw ( Exception ) +Util :: strToL( const char *str) { long int val; char *end; @@ -279,7 +279,7 @@ Util :: strToL( const char *str) throw ( Exception ) * Convert a string to a double *----------------------------------------------------------------------------*/ double -Util :: strToD( const char * str ) throw ( Exception ) +Util :: strToD( const char * str ) { double val; char * s; @@ -302,7 +302,7 @@ Util :: strToD( const char * str ) throw ( Exception ) *----------------------------------------------------------------------------*/ char * Util :: fileAddDate ( const char * str, - const char * format ) throw ( Exception ) + const char * format ) { unsigned int size; const char * last; @@ -346,7 +346,7 @@ Util :: conv ( unsigned int bitsPerSample, unsigned char * pcmBuffer, unsigned int lenPcmBuffer, short int * outBuffer, - bool isBigEndian ) throw ( Exception ) + bool isBigEndian ) { if ( bitsPerSample == 8 ) { unsigned int i, j; @@ -396,7 +396,7 @@ void Util :: conv ( short int * shortBuffer, unsigned int lenShortBuffer, float ** floatBuffers, - unsigned int channels ) throw ( Exception ) + unsigned int channels ) { unsigned int i, j; @@ -418,7 +418,7 @@ Util :: conv8 ( unsigned char * pcmBuffer, unsigned int lenPcmBuffer, short int * leftBuffer, short int * rightBuffer, - unsigned int channels ) throw ( Exception ) + unsigned int channels ) { if ( channels == 1 ) { unsigned int i, j; @@ -459,7 +459,7 @@ Util :: conv16 ( unsigned char * pcmBuffer, short int * leftBuffer, short int * rightBuffer, unsigned int channels, - bool isBigEndian ) throw ( Exception ) + bool isBigEndian ) { if ( isBigEndian ) { if ( channels == 1 ) { diff --git a/src/Util.h b/src/Util.h index 5a51aa7..eb10942 100644 --- a/src/Util.h +++ b/src/Util.h @@ -80,7 +80,7 @@ class Util * @exception Exception */ inline - Util ( void ) throw ( Exception ) + Util ( void ) { throw Exception( __FILE__, __LINE__); } @@ -91,7 +91,7 @@ class Util * @exception Exception */ inline - Util ( const Util & e ) throw ( Exception ) + Util ( const Util & e ) { throw Exception( __FILE__, __LINE__); } @@ -102,7 +102,7 @@ class Util * @exception Exception */ inline - ~Util ( void ) throw ( Exception ) + ~Util ( void ) { throw Exception( __FILE__, __LINE__); } @@ -114,7 +114,7 @@ class Util * @exception Exception */ inline Util & - operator= ( const Util & u ) throw ( Exception ) + operator= ( const Util & u ) { throw Exception( __FILE__, __LINE__); } @@ -131,7 +131,7 @@ class Util * @exception Exception */ static unsigned int - strLen ( const char * str ) throw ( Exception ); + strLen ( const char * str ); /** * Copy a C string into another. @@ -143,7 +143,7 @@ class Util */ static void strCpy ( char * dest, - const char * src ) throw ( Exception ); + const char * src ); /** * Concatenate a string to another's end. @@ -156,7 +156,7 @@ class Util */ static void strCat ( char * dest, - const char * src ) throw ( Exception ); + const char * src ); /** * Duplicate a string by allocating space with new[]. @@ -166,7 +166,7 @@ class Util * @exception Exception */ static char * - strDup ( const char * str ) throw ( Exception ); + strDup ( const char * str ); /** * Determine whether two string are equal. @@ -181,7 +181,7 @@ class Util static bool strEq ( const char * str1, const char * str2, - unsigned int len = 0 ) throw ( Exception ); + unsigned int len = 0 ); /** * Convert a string to long. @@ -191,7 +191,7 @@ class Util * @exception Exception */ static long int - strToL ( const char * str) throw ( Exception ); + strToL ( const char * str); /** * Convert a string to double. @@ -201,7 +201,7 @@ class Util * @exception Exception */ static double - strToD ( const char * str ) throw ( Exception ); + strToD ( const char * str ); /** * Add current date to a file name, before the file extension (if any) @@ -214,8 +214,7 @@ class Util */ static char * fileAddDate ( const char * str, - const char * format = "[%m-%d-%Y-%H-%M-%S]" ) - throw ( Exception ); + const char * format = "[%m-%d-%Y-%H-%M-%S]" ); /** * Convert a string into base64 encoding. @@ -227,7 +226,7 @@ class Util * @exception Exception */ static char * - base64Encode ( const char * str ) throw ( Exception ); + base64Encode ( const char * str ); /** * Convert an unsigned char buffer holding 8 or 16 bit PCM values @@ -247,7 +246,7 @@ class Util unsigned char * pcmBuffer, unsigned int lenPcmBuffer, short int * outBuffer, - bool isBigEndian = true ) throw ( Exception ); + bool isBigEndian = true ); /** @@ -264,7 +263,7 @@ class Util conv ( short int * shortBuffer, unsigned int lenShortBuffer, float ** floatBuffers, - unsigned int channels ) throw ( Exception ); + unsigned int channels ); /** * Convert a char buffer holding 8 bit PCM values to a short buffer @@ -282,7 +281,7 @@ class Util unsigned int lenPcmBuffer, short int * leftBuffer, short int * rightBuffer, - unsigned int channels ) throw ( Exception ); + unsigned int channels ); /** * Convert a char buffer holding 16 bit PCM values to a short buffer @@ -302,7 +301,7 @@ class Util short int * leftBuffer, short int * rightBuffer, unsigned int channels, - bool isBigEndian ) throw ( Exception ); + bool isBigEndian ); /** * Make a thread sleep for specified amount of time. diff --git a/src/VorbisLibEncoder.cpp b/src/VorbisLibEncoder.cpp index 5d05092..a62676f 100644 --- a/src/VorbisLibEncoder.cpp +++ b/src/VorbisLibEncoder.cpp @@ -63,7 +63,6 @@ static const char fileid[] = "$Id$"; *----------------------------------------------------------------------------*/ void VorbisLibEncoder :: init ( unsigned int outMaxBitrate ) - throw ( Exception ) { this->outMaxBitrate = outMaxBitrate; @@ -146,7 +145,6 @@ VorbisLibEncoder :: init ( unsigned int outMaxBitrate ) *----------------------------------------------------------------------------*/ bool VorbisLibEncoder :: open ( void ) - throw ( Exception ) { int ret; @@ -283,7 +281,7 @@ VorbisLibEncoder :: open ( void ) *----------------------------------------------------------------------------*/ unsigned int VorbisLibEncoder :: write ( const void * buf, - unsigned int len ) throw ( Exception ) + unsigned int len ) { if ( !isOpen() || len == 0 ) { return 0; @@ -382,7 +380,6 @@ VorbisLibEncoder :: write ( const void * buf, *----------------------------------------------------------------------------*/ void VorbisLibEncoder :: flush ( void ) - throw ( Exception ) { if ( !isOpen() ) { return; @@ -398,7 +395,7 @@ VorbisLibEncoder :: flush ( void ) * Send pending Vorbis blocks to the underlying stream *----------------------------------------------------------------------------*/ void -VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ( Exception ) +VorbisLibEncoder :: vorbisBlocksOut ( void ) { while ( 1 == vorbis_analysis_blockout( &vorbisDspState, &vorbisBlock) ) { ogg_packet oggPacket; @@ -433,7 +430,7 @@ VorbisLibEncoder :: vorbisBlocksOut ( void ) throw ( Exception ) * Close the encoding session *----------------------------------------------------------------------------*/ void -VorbisLibEncoder :: close ( void ) throw ( Exception ) +VorbisLibEncoder :: close ( void ) { if ( isOpen() ) { flush(); diff --git a/src/VorbisLibEncoder.h b/src/VorbisLibEncoder.h index 114905f..39c9f2e 100644 --- a/src/VorbisLibEncoder.h +++ b/src/VorbisLibEncoder.h @@ -135,7 +135,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ void - init ( unsigned int outMaxBitrate ) throw ( Exception ); + init ( unsigned int outMaxBitrate ); /** * De-initialize the object. @@ -143,7 +143,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline void - strip ( void ) throw ( Exception ) + strip ( void ) { if ( converter ) { #ifdef HAVE_SRC_LIB @@ -160,7 +160,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * Send pending Vorbis blocks to the underlying stream */ void - vorbisBlocksOut( void ) throw ( Exception ); + vorbisBlocksOut( void ); protected: @@ -171,7 +171,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline - VorbisLibEncoder ( void ) throw ( Exception ) + VorbisLibEncoder ( void ) { throw Exception( __FILE__, __LINE__); } @@ -210,7 +210,6 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter unsigned int outSampleRate = 0, unsigned int outChannel = 0, unsigned int outMaxBitrate = 0 ) - throw ( Exception ) : AudioEncoder ( sink, inSampleRate, @@ -252,7 +251,6 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter unsigned int outSampleRate = 0, unsigned int outChannel = 0, unsigned int outMaxBitrate = 0 ) - throw ( Exception ) : AudioEncoder ( sink, as, @@ -272,7 +270,6 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter */ inline VorbisLibEncoder ( const VorbisLibEncoder & encoder ) - throw ( Exception ) : AudioEncoder( encoder ) { if( encoder.isOpen() ) { @@ -287,7 +284,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual - ~VorbisLibEncoder ( void ) throw ( Exception ) + ~VorbisLibEncoder ( void ) { if ( isOpen() ) { close(); @@ -303,7 +300,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual VorbisLibEncoder & - operator= ( const VorbisLibEncoder & encoder ) throw ( Exception ) + operator= ( const VorbisLibEncoder & encoder ) { if( encoder.isOpen() ) { throw Exception(__FILE__, __LINE__, "don't copy open encoders"); @@ -349,7 +346,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual bool - start ( void ) throw ( Exception ) + start ( void ) { return open(); } @@ -360,7 +357,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ inline virtual void - stop ( void ) throw ( Exception ) + stop ( void ) { return close(); } @@ -372,7 +369,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual bool - open ( void ) throw ( Exception ); + open ( void ); /** * Check if the encoding session is open. @@ -396,7 +393,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter */ inline virtual bool canWrite ( unsigned int sec, - unsigned int usec ) throw ( Exception ) + unsigned int usec ) { if ( !isOpen() ) { return false; @@ -422,7 +419,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter */ virtual unsigned int write ( const void * buf, - unsigned int len ) throw ( Exception ); + unsigned int len ); /** * Flush all data that was written to the encoder to the underlying @@ -431,7 +428,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - flush ( void ) throw ( Exception ); + flush ( void ); /** * Close the encoding session. @@ -439,7 +436,7 @@ class VorbisLibEncoder : public AudioEncoder, public virtual Reporter * @exception Exception */ virtual void - close ( void ) throw ( Exception ); + close ( void ); };