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

MNConfig.h

Go to the documentation of this file.
00001 /* Copyright (C) 2000 KOM/Darmstadt University of Technology 00002 * 00003 * You are allowed to use all other parts of the code under the following terms: 00004 * 00005 * For non-commercial use, code may be used in unmodified form provided 00006 * that this copyright notice and this permission notice appear in 00007 * supporting documentation. 00008 * 00009 * This software is provided "as is" and without any express or implied 00010 * warranties, including, without limitation, the implied warranty of 00011 * fitness for a particular purpose. 00012 * 00013 * The code may be subjected to the GNU General Public License, Version 2, 00014 * and re-distributed under the terms of this license. 00015 * As a special exception, permission is granted to link this code 00016 * with the Qt library and distribute executables, as long as you 00017 * follow the requirements of the GNU GPL in regard to all of the 00018 * software in the executable aside from Qt. 00019 * 00020 * Commercial use other than under the terms of the GNU General Public 00021 * License is allowed only after express negotiation of conditions 00022 * with the authors. 00023 */ 00024 #ifndef MN_CONFIG_H 00025 #define MN_CONFIG_H 00026 00027 #include <config.h> 00028 #include "mnstream.h" 00029 #include <MNString.h> 00030 #include "sdp/PayloadTypes.h" 00031 #include <string> 00032 00055 class Config 00056 { 00057 class Private; 00058 00063 static Private* _values; 00064 00068 void usage( const char* progname ); 00069 00083 void configure( const char* type, 00084 const char* config_file_name, 00085 const char* overwrite_vs_type ); 00086 public: 00087 enum Mode 00088 { 00089 Client, 00090 Proxy, 00091 Server, 00092 TestCachingProxy 00093 }; 00094 00095 struct Gui 00096 { 00097 bool autostart; 00098 bool qt; 00099 bool decoder; 00100 bool mplayer; 00101 bool gstreamermpeg; 00102 }; 00103 00104 enum DataPumpType 00105 { 00106 DataPumpUndefined = -1, 00107 MNStreamer = 1, 00108 VCStreamer, 00109 NopStreamer, 00110 MNDummyStreamer, 00111 SlaveDataPump 00112 }; 00113 00114 struct DataPump 00115 { 00116 DataPumpType type; 00117 bool sendblock; 00118 }; 00119 00120 enum ServerEmulationPopularity 00121 { 00122 ServerEmulationPopularityUndefined = -1, 00123 Cyclic, 00124 Zipf, 00125 Unified 00126 }; 00127 00128 struct ServerEmulation 00129 { 00130 int movies; 00131 ServerEmulationPopularity popularity; 00132 }; 00133 enum ClientEmulationIPattern 00134 { 00135 ClientEmulationIPatternUndefined = -1, 00136 Constant, 00137 Poisson 00138 }; 00139 00140 struct ClientEmulation 00141 { 00142 ClientEmulationIPattern pattern; 00143 int delay; 00144 }; 00145 00146 public : 00153 Config( int argc, char* argv[] ); 00154 00159 Config( const char* type ); 00160 00161 Config(); 00162 ~Config(); 00163 00164 bool GetPRINT_INFO( const char* filename ); 00165 bool GetPRINT_WARN( const char* filename ); 00166 bool GetPRINT_ERROR( const char* filename ); 00167 00168 const MNString& GetCONTENTROOT(); 00169 const MNString& GetMCAST_IF(); 00170 const MNString& GetCACHE_DIR() const; 00171 const MNString& GetCACHE_STRATEGY(); 00172 const MNString& GetRTSP_EOL() const; 00173 const MNString& GetSDP_EOL() const; 00174 bool GetUSE_RTSP_PROXY( ) const; 00175 const MNString& GetRTSP_PROXY_NAME() const; 00176 int GetRTSP_PROXY_PORT() const; 00177 int GetRTSP_SERVER_PORT() const; 00178 int GetCLIENT_BANDWIDTH() const; 00179 00185 bool GetCLIENT_DESTINATION() const; 00186 00191 const DataPump& GetVS( ) const; 00192 00193 const ServerEmulation& GetServerEmulation( ) const; 00194 00195 const ClientEmulation& GetClientEmulation( ) const; 00196 00200 int GetCACHE_SPACE() const; 00201 00208 Mode GetMODE() const; 00209 bool GetPATCHING_MODE() const; 00210 bool GetCACHING_MODE() const; 00211 00212 bool GetREFLECTION_MODE() const; 00213 00218 const Gui& GetGUI( ) const; 00219 00220 bool GetTFRC_REPLY() const; 00221 bool GetRTP_TCP() const; 00222 00223 bool GetHasClientLoopbackPort( ) const; 00224 int GetClientLoopbackPort( ) const; 00225 bool GetHasClientUrl( ) const; 00226 const char* GetClientUrl( ) const; 00227 bool GetHasLogfile( ) const; 00228 const char* GetLogfile( ) const; 00229 00230 void ExitWithUsage( const char* comment ); 00231 00239 static DataPumpType translateDataPumpType( const char* e ); 00240 00241 static ClientEmulationIPattern translateCEP( const char* e ); 00242 static ServerEmulationPopularity translateSEP( const char* e ); 00243 00246 friend ostream& operator<<( ostream& ostr, DataPumpType t ); 00247 00252 const bool getUseTranscoding(const string clientName="") const; 00253 00254 const string getTransLib(const string clientName, const SDP::PayloadTypes pt) const; 00255 const int getScreenWidth(const string clientName) const; 00256 const int getScreenHeight(const string clientName) const; 00257 00258 bool getUseDynReflection(); 00259 const char* getDynReflectionRepositioningMode(); 00260 int getTimeThreshold(); 00261 }; 00262 00263 #endif /* MN_CONFIG_H */

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