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

IceCast.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 
00003    Copyright (c) 2000 Tyrell Corporation. All rights reserved.
00004 
00005    Tyrell DarkIce
00006 
00007    File     : IceCast.h
00008    Version  : $Revision: 1.8 $
00009    Author   : $Author: darkeye $
00010    Location : $Source: /cvsroot/darkice/darkice/src/IceCast.h,v $
00011    
00012    Copyright notice:
00013 
00014     This program is free software; you can redistribute it and/or
00015     modify it under the terms of the GNU General Public License  
00016     as published by the Free Software Foundation; either version 2
00017     of the License, or (at your option) any later version.
00018    
00019     This program is distributed in the hope that it will be useful,
00020     but WITHOUT ANY WARRANTY; without even the implied warranty of 
00021     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
00022     GNU General Public License for more details.
00023    
00024     You should have received a copy of the GNU General Public License
00025     along with this program; if not, write to the Free Software
00026     Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00027 
00028 ------------------------------------------------------------------------------*/
00029 #ifndef ICE_CAST_H
00030 #define ICE_CAST_H
00031 
00032 #ifndef __cplusplus
00033 #error This is a C++ include file
00034 #endif
00035 
00036 
00037 /* ============================================================ include files */
00038 
00039 #include "Sink.h"
00040 #include "TcpSocket.h"
00041 #include "CastSink.h"
00042 
00043 
00044 /* ================================================================ constants */
00045 
00046 
00047 /* =================================================================== macros */
00048 
00049 
00050 /* =============================================================== data types */
00051 
00059 class IceCast : public CastSink
00060 {
00061     private:
00062 
00066         char              * mountPoint;
00067 
00071         char              * remoteDumpFile;
00072 
00076         char              * description;
00077 
00086         void
00087         init (  const char            * mountPoint,
00088                 const char            * description,
00089                 const char            * remoteDumpFile )
00090                                                     throw ( Exception );
00091 
00097         void
00098         strip ( void )                              throw ( Exception );
00099 
00100 
00101     protected:
00102 
00108         inline
00109         IceCast ( void )                            throw ( Exception )
00110         {
00111             throw Exception( __FILE__, __LINE__);
00112         }
00113 
00120         virtual bool
00121         sendLogin ( void )              throw ( Exception );
00122 
00123 
00124     public:
00125 
00145         inline
00146         IceCast (   TcpSocket         * socket,
00147                     const char        * password,
00148                     const char        * mountPoint,
00149                     unsigned int        bitRate,
00150                     const char        * name           = 0,
00151                     const char        * description    = 0,
00152                     const char        * url            = 0,
00153                     const char        * genre          = 0,
00154                     bool                isPublic       = false,
00155                     const char        * remoteDumpFile = 0,
00156                     Sink              * streamDump     = 0,
00157                     unsigned int        bufferDuration = 10 )
00158                                                         throw ( Exception )
00159               : CastSink( socket,
00160                           password,
00161                           bitRate,
00162                           name,
00163                           url,
00164                           genre,
00165                           isPublic,
00166                           streamDump,
00167                           bufferDuration )
00168         {
00169             init( mountPoint, description, remoteDumpFile);
00170         }
00171 
00177         inline
00178         IceCast(   const IceCast &    cs )        throw ( Exception )
00179                 : CastSink( cs )
00180         {
00181             init( cs.getMountPoint(),
00182                   cs.getDescription(),
00183                   cs.getRemoteDumpFile() );
00184         }
00185 
00191         inline virtual
00192         ~IceCast( void )                           throw ( Exception )
00193         {
00194             strip();
00195         }
00196 
00204         inline virtual IceCast &
00205         operator= ( const IceCast &    cs )        throw ( Exception )
00206         {
00207             if ( this != &cs ) {
00208                 strip();
00209                 CastSink::operator=( cs );
00210                 init( cs.getMountPoint(),
00211                       cs.getDescription(),
00212                       cs.getRemoteDumpFile() );
00213             }
00214             return *this;
00215         }
00216 
00222         inline const char *
00223         getMountPoint ( void ) const                throw ()
00224         {
00225             return mountPoint;
00226         }
00227 
00233         inline const char *
00234         getRemoteDumpFile ( void ) const            throw ()
00235         {
00236             return remoteDumpFile;
00237         }
00238 
00244         inline const char *
00245         getDescription ( void ) const               throw ()
00246         {
00247             return description;
00248         }
00249 
00250 };
00251 
00252 
00253 /* ================================================= external data structures */
00254 
00255 
00256 /* ====================================================== function prototypes */
00257 
00258 
00259 
00260 #endif  /* ICE_CAST_H */
00261 
00262 
00263 /*------------------------------------------------------------------------------
00264  
00265   $Source: /cvsroot/darkice/darkice/src/IceCast.h,v $
00266 
00267   $Log: IceCast.h,v $
00268   Revision 1.8  2005/04/14 11:53:17  darkeye
00269   fixed API documentation issues
00270 
00271   Revision 1.7  2002/02/20 11:54:11  darkeye
00272   added local dump file possibility
00273 
00274   Revision 1.6  2001/09/09 11:27:31  darkeye
00275   added support for ShoutCast servers
00276 
00277   Revision 1.5  2001/08/29 21:08:30  darkeye
00278   made some description options in the darkice config file optional
00279 
00280   Revision 1.4  2000/11/12 14:54:50  darkeye
00281   added kdoc-style documentation comments
00282 
00283   Revision 1.3  2000/11/10 20:14:11  darkeye
00284   added support for remote dump file
00285 
00286   Revision 1.2  2000/11/05 17:37:24  darkeye
00287   removed clone() functions
00288 
00289   Revision 1.1.1.1  2000/11/05 10:05:52  darkeye
00290   initial version
00291 
00292   
00293 ------------------------------------------------------------------------------*/
00294 

Generated on Fri May 19 15:36:48 2006 for DarkIce by  doxygen 1.4.4