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

MNSessionState.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_SESSION_STATE_H 00025 #define MN_SESSION_STATE_H 00026 00027 #include <sys/types.h> 00028 #include <string.h> 00029 #include <stdio.h> 00030 00031 #include "SDPMediaDescription.h" 00032 #include "MNString.h" 00033 #include "MNValid.h" 00034 00035 class MNSessionState 00036 { 00037 DECLARE_VALID 00038 00039 public: 00040 enum State 00041 { 00042 INIT_STATE, 00043 READY_STATE, 00044 PLAY_STATE 00045 }; 00046 00047 private: 00048 State _cur_state; 00049 MNString _server_url; 00050 MNString _session_id; 00051 u_short _data_port; 00052 u_short _data_sender_port; 00053 MNString _data_sender_hostname; 00054 size_t _data_bandwidth; 00055 bool _data_sender_multicast; 00056 MDescPtr _mdesc; 00057 MDescList* _mdesclist; 00058 00059 public: 00060 MNSessionState(); 00061 00062 virtual ~MNSessionState(); 00063 00064 void setState( State s ); 00065 State getState( ) const; 00066 00067 const MNString& getServerUrl() const; 00068 void setServerUrl( const MNString& s, int port ); 00069 void setServerUrl( const char* s, int port ); 00070 00071 const MNString& getSessionId( ) const; 00072 void setSessionId( const MNString& id ); 00073 00074 u_short getDataPort( ) const; 00075 void setDataPort( u_short p ); 00076 00077 u_short getDataSenderPort( ) const; 00078 void setDataSenderPort( u_short p ); 00079 00080 size_t getDataBandwidth( ) const; 00081 void setDataBandwidth( size_t val ); 00082 00083 const MNString& getDataSenderHostname( ) const; 00084 void setDataSenderHostname( const MNString& val ); 00085 00089 void setDataSenderHostnameFromSDPConnection( const MNString& val ); 00090 bool getDataSenderMulticast( ) const; 00091 00092 void setMediaDescription( MDescPtr mdesc ); 00093 MDescPtr getMediaDescription( ) const; 00094 MDescPtr getMediaDescription(size_t idx) const; 00095 00096 void setMediaDescList( MDescList* mdesclist ); 00097 const MDescList& getMediaDescList( ) const; 00098 }; 00099 00100 #endif /* MN_SESSION_STATE_H */ 00101

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