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

SDPSessionDescription.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 SDP_SESSION_DESCRIPTION_H 00025 #define SDP_SESSION_DESCRIPTION_H 00026 00027 #include "MNString.h" 00028 #include "MNList.h" 00029 #include "MNArrayList.h" 00030 #include "MNValid.h" 00031 #include "TimeDefs.h" 00032 #include "SDPMediaDescription.h" 00033 00034 class SDPSessionDescription 00035 { 00036 DECLARE_VALID 00037 private: 00038 bool _ok; 00039 MNString* _version; 00040 MNString* _origin; 00041 MNString* _session_name; 00042 MNString* _information; 00043 MNString* _uri; 00044 MNString* _email; 00045 MNString* _phone; 00046 00047 MNString* connection_field; 00048 SDP::Bandwidths _bandwidths; 00049 MNList<MNString>* time_fields; 00050 MNList<MNString>* repeat_fields; 00051 MNString* key_field; 00052 00061 ParseTimeRange* _a_range; 00062 MNList<MNString>* attribute_fields; 00063 00064 MDescList* _mdescs; 00065 00066 public: 00067 00068 SDPSessionDescription(); 00069 SDPSessionDescription( const MNString& sdptext ); 00070 SDPSessionDescription( const SDPSessionDescription& orig ); 00071 virtual ~SDPSessionDescription(); 00072 00073 inline bool ok() const { return _ok; } 00074 00075 SDPSessionDescription& operator=( const SDPSessionDescription& orig ); 00076 00077 void setField( SDP::SessionFieldName fn, const MNString& in ); 00078 void setField( SDP::SessionFieldName fn, const char* in ); 00079 00080 void setConnection( const MNString& in ); 00081 void setConnection( const char* in ); 00082 00083 void insertTime( const MNString& in ); 00084 void insertTime( const char* in ); 00085 00086 void insertRepeat( const MNString& in ); 00087 void insertRepeat( const char* in ); 00088 00089 void setKey( const MNString& in ); 00090 void setKey( const char* in ); 00091 00101 void setRangeAttribute( ParseTimeRange*& in ); 00102 00103 void insertAttribute( const MNString& in ); 00104 void insertAttribute( const char* in ); 00105 00106 void setMediaDescriptionList( MDescList* in ); 00107 00108 bool hasVersion( ) const; 00109 const MNString& getVersion(); 00110 00111 bool hasOrigin( ) const; 00112 const MNString& getOrigin() const; 00113 00114 bool hasSessionName( ) const; 00115 const MNString& getSessionName() const; 00116 00117 bool hasInformation( ) const; 00118 const MNString& getInformation() const; 00119 00120 bool hasURI( ) const; 00121 const MNString& getURI() const; 00122 00123 bool hasEmail( ) const; 00124 const MNString& getEmail() const; 00125 00126 bool hasPhone( ) const; 00127 const MNString& getPhone() const; 00128 00129 bool hasARange( ) const; 00130 const ParseTimeRange& getARange() const; 00131 00153 bool hasConnection( int idx ) const; 00154 00161 MNString getConnection( int idx ) const; 00162 00169 MNString getConnectionAddress( int idx ) const; 00170 00182 void addBandwidth( const char* in ); 00183 00185 bool hasASBandwidth( int idx = -1 ) const; 00186 00188 size_t getASBandwidth( int idx = -1 ) const; 00189 00190 private: 00195 bool hasTime( ) const; 00196 const MNList<MNString>& getTimes() const; 00197 00198 public: 00199 bool hasRepeat( ); 00200 const MNList<MNString>& getRepeats() const; 00201 00202 bool hasKey( ); 00203 const MNString& getKey() const; 00204 00205 bool hasAttributes( ); 00206 const MNList<MNString>& getAttributes() const; 00207 00208 bool hasANYAttribute( const char* name ); 00209 bool getANYAttribute( const char* attributeName, MNString& value ); 00210 00211 bool hasPatchAttribute(); 00212 MNString getPatchAttribute(); 00213 void getPatchRange( int& start, int& stop ); 00214 00215 bool hasStreamIdAttribute(); 00216 bool hasLCRTPAttribute(); 00217 00218 bool hasFramerateAttribute(); 00219 MNString getFramerateAttribute(); 00220 00221 bool hasMediaDescription( ); 00222 int getMediaDescriptionCount() const; 00223 void getMediaDescriptions( MDescList& inout ) const; 00224 const MDescList& getMediaDescriptionArray() const; 00225 MDescList& getMediaDescriptionArray(); 00226 00233 int getMainConnection( MNString& host ); 00234 00244 ParseTimeRange* getPlayDuration( ) const; 00245 00246 int dump( MNString& desc ); 00247 00248 MNString toString(); 00249 private: 00250 void private_copy( const SDPSessionDescription& orig ); 00251 void private_clear( ); 00252 00253 MDescPtr media( int idx ) const; 00254 }; 00255 00256 #endif

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