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

ParseTransport.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 _TRANPORT_H 00025 #define _TRANPORT_H 1 00026 00027 #include "mnstream.h" 00028 #include "MNString.h" 00029 #include "MNValid.h" 00030 #include "sdp/TransportTypes.h" 00031 00032 #define TRANS_RTP 1 00033 #define TRANS_AVP 2 00034 #define TRANS_TCP 3 00035 #define TRANS_UDP 4 00036 #define TRANS_UNICAST 5 00037 #define TRANS_MULTICAST 6 00038 #define TRANS_PLAY 1 00039 #define TRANS_RECORD 2 00040 00041 class ParseTransport 00042 { 00043 public: 00044 enum IntSpec { 00045 PORT, 00046 SERVER_PORT, 00047 CLIENT_PORT, 00048 INTERLEAVED 00049 }; 00050 00051 enum Mode { 00052 PLAY, 00053 RECORD 00054 }; 00055 00056 friend ostream& operator<<( ostream& ostr, IntSpec p ); 00057 friend ostream& operator<<( ostream& ostr, Mode p ); 00058 00059 private: 00060 int startPort; 00061 int endPort; 00062 int startClientPort; 00063 int endClientPort; 00064 int startServerPort; 00065 int endServerPort; 00066 int startChannel; 00067 int endChannel; 00068 int* ttl; 00069 int* layers; 00070 long* ssrc; 00071 RTSP::TransportTypes _protocol; 00072 bool _multicast; 00073 bool _append; 00074 MNString* destination; 00075 Mode mode; 00076 bool proxy_streaming; 00077 bool proxy_caching; 00078 MNString* proxy_rtcp; 00079 bool proxy_formatswitching; 00080 00081 int _errorNum; 00082 MNString _errorString; 00083 00084 ParseTransport* _next; 00085 00086 DECLARE_VALID 00087 00088 public: 00089 00090 ParseTransport( RTSP::TransportTypes p ); 00091 ~ParseTransport( ); 00092 00093 RTSP::TransportTypes getProtocol( ); 00094 00095 ParseTransport* getNextTransport(); 00096 void setNextTransport( ParseTransport* pt ); 00097 int setDestination( const char* dest = "" ); 00098 bool hasDestination( ); 00099 const MNString& getDestination( ); 00100 int setRange( int s, int start ); 00101 int setRange( int s, int start, int end ); 00102 bool hasPort( ); 00103 bool hasClientPort( ); 00104 bool hasServerPort( ); 00105 bool hasInterleaved( ); 00106 int getStartPort( ); 00107 int getEndPort( ); 00108 int getStartClientPort( ); 00109 int getEndClientPort( ); 00110 int getStartServerPort( ); 00111 int getEndServerPort( ); 00112 int getStartInterleaved( ); 00113 int getEndInterleaved( ); 00114 int setMulticast( bool m ); 00115 bool getMulticast( ); 00116 int setAppend( bool a ); 00117 bool getAppend( ); 00118 int setTtl( int t ); 00119 bool hasTtl( ); 00120 int getTtl( ); 00121 int setLayers( int l ); 00122 bool hasLayers( ); 00123 int getLayers( ); 00124 int setSsrc( long s ); 00125 bool hasSsrc( ); 00126 long getSsrc( ); 00127 int setMode( const char* m ); 00128 Mode getMode( ); 00129 int setProxyCaching( bool m ); 00130 bool getProxyCaching( ); 00131 int setProxyStreaming( bool m ); 00132 bool getProxyStreaming( ); 00133 int setProxyRtcp( const char* rtcp ); 00134 bool hasProxyRtcp( ); 00135 const MNString& getProxyRtcp( ); 00136 int setProxyFormatswitching( bool m ); 00137 bool getProxyFormatswitching( ); 00138 00139 const MNString& getErrorString(); 00140 int getErrorNum(); 00141 00142 void append( ParseTransport* p ); 00143 MNString& toString(); 00144 }; 00145 00146 #endif

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