Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

ControlBase.h

Go to the documentation of this file.
00001 /* Copyright (C) 2002 Carsten Griwodz 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, this code may be used in unmodified form 00006 * provided that this copyright notice and this permission notice appear 00007 * in supporting documentation. 00008 * 00009 * The code may be made subject to the terms of the GNU General Public 00010 * License, Version 2, and re-distributed under the terms of this license. 00011 * 00012 * Commercial use other than under the terms of the GNU General Public 00013 * License is allowed only after negotiation of conditions with the authors. 00014 */ 00015 #ifndef CONTROL_BASE_H 00016 #define CONTROL_BASE_H 00017 00018 #include "MNString.h" 00019 00020 class RTSPClient; 00021 class RTSPFillBuffer; 00022 00023 class ControlBase 00024 { 00025 public: 00026 enum Mode 00027 { 00028 Undefined, 00029 RTSP, 00030 TestCaching, 00031 Dummy 00032 }; 00033 00034 public: 00035 ControlBase( Mode mode ); 00036 virtual ~ControlBase( ); 00037 00038 virtual void MsgOut( const MNString& text, 00039 int seq ) = 0; 00040 virtual void MsgOut( const MNString& text) = 0; 00041 virtual void MsgOut( int errNo, 00042 const MNString& headers, 00043 const MNString& body, 00044 int seq ) = 0; 00045 virtual void MsgOutNoEOL( const MNString& text ) = 0; 00046 00047 virtual MNString getClientHostname() = 0; 00048 virtual MNString getMulticastAddress() = 0; 00049 virtual int getNextCSeq( ) = 0; 00050 00051 virtual void setBandwidth( int /*bw*/ ) { 00052 } 00053 00054 virtual int getBandwidth( ) const { 00055 return -1; 00056 } 00057 00058 inline bool isRTSP() const { 00059 return (_mode == RTSP); 00060 } 00061 00062 inline RTSPFillBuffer* asRTSP() { 00063 return (RTSPFillBuffer*)this; 00064 } 00065 00066 inline const MNString& getKind() const { 00067 return _kind; 00068 } 00069 00070 inline void setKind( const MNString& kind ) { 00071 _kind = kind; 00072 } 00073 00074 void setClient( RTSPClient* client ); 00075 RTSPClient* getClient(); 00076 00077 private: 00078 Mode _mode; 00079 MNString _kind; 00080 RTSPClient* _client; 00081 00082 private: 00083 ControlBase( ); 00084 ControlBase( const ControlBase& orig ); 00085 ControlBase& operator=( const ControlBase& orig ); 00086 }; 00087 00088 #endif /* CONTROL_BASE_H */ 00089

Generated on Sun Mar 6 13:35:49 2005 for Komssys by doxygen 1.3.8