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

RTSPHeader.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_RTSPHEDAER_H 00025 #define MN_RTSPHEDAER_H 00026 00027 #include "MNString.h" 00028 #include "MNValid.h" 00029 00030 class RTSPParserBase; 00031 class ControlBase; 00032 class ParseTimeRange; 00033 class ParseTransport; 00034 00035 /* 00036 * This classes are used to store range information 00037 * in the parser and to hand it over to certain functions 00038 * in RTSPHeader 00039 */ 00040 00041 class ParseHeaderLines 00042 { 00043 private: 00044 MNString* nSessionID; 00045 int _cseqnew; 00046 int _errorNum; 00047 ParseTimeRange* _range; 00048 MNString* _accept; 00049 MNString* _require; 00050 int* _contentLength; 00051 MNString* _contentType; 00052 MNString* _userAgent; 00053 MNString* _errorString; 00054 ParseTransport* _transport; 00055 MNString* _timestamp; 00056 MNString* _lastmodified; 00057 MNString* _rtp_info; 00058 bool _pingpong; 00059 int* _bandwidth; 00060 MNString* _serverType; 00061 bool _connection; 00062 00063 DECLARE_VALID 00064 00065 friend class ControlBase; 00066 00067 public: 00068 00069 00070 ParseHeaderLines( ); 00071 ~ParseHeaderLines( ); 00072 00073 void ChckTransport( ); 00074 00075 void setSessID( const char* id ); 00076 bool hasSessID( ); 00077 const MNString& getSessID( ); 00078 00079 void setPingPong( bool pingpong ); 00080 bool hasPingPong( ); 00081 00082 void setCSeqNew( int val ); 00083 bool hasCSeqNew( ); 00084 int getCSeqNew( ); 00085 00086 void setRange( ParseTimeRange* r ); 00087 bool hasRange( ); 00088 ParseTimeRange* getRange( ); 00089 00090 void setAcceptString( const char* ); 00091 bool hasAcceptString( ); 00092 const MNString& getAcceptString( ); 00093 00094 void setRequireString( const char* ); 00095 bool hasRequireString( ); 00096 const MNString& getRequireString( ); 00097 00098 void setUserAgentString( const char* ); 00099 bool hasUserAgentString( ); 00100 const MNString& getUserAgentString( ); 00101 00102 void setContentType( const char* ); 00103 bool hasContentType( ); 00104 const MNString& getContentType( ); 00105 00106 void setContentLength( int l ); 00107 bool hasContentLength( ); 00108 int getContentLength( ); 00109 00110 void setBandwidth( int l ); 00111 bool hasBandwidth( ); 00112 int getBandwidth( ); 00113 00114 /* note (VK) at times, we support only the "close" value of the Connection: 00115 header. Thus, we use a boolean value. 00116 */ 00117 void setConnection(const char* ); 00118 bool getConnection(); 00129 bool fixTransport( ); 00130 void setTransport( ParseTransport* transport ); 00131 bool hasTransport( ); 00132 ParseTransport* getTransport( ); 00133 00134 bool hasError( ); 00135 const MNString& getErrorString( ); 00136 int getErrorNum( ); 00137 00138 void setTimestamp( const char* ); 00139 bool hasTimestamp( ); 00140 const MNString& getTimestamp( ); 00141 00142 void setLastModified( const char* ); 00143 bool hasLastModified( ); 00144 const MNString& getLastModified( ); 00145 00146 void setRtpInfo( const char* ); 00147 bool hasRtpInfo( ); 00148 const MNString& getRtpInfo( ); 00149 00150 void setServerType( const char* ); 00151 bool hasServerType( ); 00152 const MNString& getServerType( ); 00153 00154 void setGenericHeader( const char* id, const char* data ); 00155 00156 MNString& toString(); 00157 }; 00158 00159 #endif /* MN_RTSPHEDAER_H */

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