#include <RTPInterfacePacket.h>
An enumeration to distinguish the different functions of the RTPInterfacePacket.
00056 { 00057 RTP_IFP_UNDEF, 00058 RTP_IFP_ENTER_SESSION, 00059 RTP_IFP_SESSION_ENTERED, 00060 RTP_IFP_CREATE_SENDER_MODULE, 00061 RTP_IFP_SENDER_MODULE_CREATED, 00062 RTP_IFP_DELETE_SENDER_MODULE, 00063 RTP_IFP_SENDER_MODULE_DELETED, 00064 RTP_IFP_SENDER_CONTROL, 00065 RTP_IFP_SENDER_STATUS, 00066 RTP_IFP_LEAVE_SESSION, 00067 RTP_IFP_SESSION_LEFT 00068 };
RTPInterfacePacket::RTPInterfacePacket | ( | const char * | name = NULL |
) |
Default constructor.
00027 : cPacket(name) { 00028 _type = RTP_IFP_UNDEF; 00029 _commonName = NULL; 00030 _profileName = NULL; 00031 _bandwidth = 0; 00032 _destinationAddress = IPADDRESS_UNDEF; 00033 _port = IPSuite_PORT_UNDEF; 00034 _ssrc = 0; 00035 _payloadType = 0; 00036 _fileName = NULL; 00037 };
RTPInterfacePacket::RTPInterfacePacket | ( | const RTPInterfacePacket & | rifp | ) |
RTPInterfacePacket::~RTPInterfacePacket | ( | ) | [virtual] |
Destructor.
00046 { 00047 if (opp_strcmp(_commonName, "")) 00048 delete _commonName; 00049 if (opp_strcmp(_profileName, "")) 00050 delete _profileName; 00051 if (opp_strcmp(_fileName, "")) 00052 delete _fileName; 00053 };
int RTPInterfacePacket::bandwidth | ( | ) | [virtual] |
const char * RTPInterfacePacket::className | ( | ) | const [virtual] |
const char * RTPInterfacePacket::commonName | ( | ) | [virtual] |
Returns the CNAME stored in this RTPInterfacePacket.
00206 { 00207 return opp_strdup(_commonName); 00208 };
void RTPInterfacePacket::createSenderModule | ( | u_int32 | ssrc, | |
int | payloadType, | |||
const char * | fileName | |||
) | [virtual] |
00118 { 00119 _type = RTP_IFP_CREATE_SENDER_MODULE; 00120 _ssrc = ssrc; 00121 _payloadType =payloadType; 00122 _fileName = fileName; 00123 };
void RTPInterfacePacket::deleteSenderModule | ( | u_int32 | ssrc | ) | [virtual] |
IN_Addr RTPInterfacePacket::destinationAddress | ( | ) | [virtual] |
Returns the address stored in this RTPInterfacePacket.
00236 { 00237 return _destinationAddress; 00238 };
cObject * RTPInterfacePacket::dup | ( | ) | const [virtual] |
Duplicates the RTPInterfacePacket by calling the copy constructor.
00071 { 00072 return new RTPInterfacePacket(*this); 00073 };
void RTPInterfacePacket::enterSession | ( | const char * | commonName, | |
const char * | profileName, | |||
int | bandwidth, | |||
IN_Addr | destinationAddress, | |||
IN_Port | port | |||
) | [virtual] |
Called by the rtp application to make the rtp layer enter an rtp session with the given parameters.
00102 { 00103 _type = RTP_IFP_ENTER_SESSION; 00104 _commonName = commonName; 00105 _profileName = profileName; 00106 _bandwidth = bandwidth; 00107 _destinationAddress = destinationAddress; 00108 _port = port; 00109 };
const char * RTPInterfacePacket::fileName | ( | ) | [virtual] |
Returns the file name stored in this RTPInterfacePacket.
00226 { 00227 return opp_strdup(_fileName); 00228 };
std::string RTPInterfacePacket::info | ( | ) | [virtual] |
Writes a one line info about this RTPInterfacePacket into the given string.
00081 { 00082 std::stringstream out; 00083 out << "RTPInterfacePacket: type=" << _type; 00084 return out.str(); 00085 };
void RTPInterfacePacket::leaveSession | ( | ) | [virtual] |
Called by the application to order the rtp layer to stop participating in this rtp session.
00191 { 00192 _type = RTP_IFP_LEAVE_SESSION; 00193 };
RTPInterfacePacket & RTPInterfacePacket::operator= | ( | const RTPInterfacePacket & | rifp | ) |
Assignment operator.
00056 { 00057 cPacket::operator=(rifp); 00058 _type = rifp._type; 00059 _commonName = opp_strdup(rifp._commonName); 00060 _profileName = opp_strdup(rifp._profileName); 00061 _bandwidth = rifp._bandwidth; 00062 _destinationAddress = rifp._destinationAddress; 00063 _port = rifp._port; 00064 _ssrc = rifp._ssrc; 00065 _payloadType = rifp._payloadType; 00066 _fileName = opp_strdup(rifp._fileName); 00067 return *this; 00068 };
int RTPInterfacePacket::payloadType | ( | ) | [virtual] |
Returns the payload type stored in this RTPInterfacePacket.
00221 { 00222 return _payloadType; 00223 };
IN_Port RTPInterfacePacket::port | ( | ) | [virtual] |
const char * RTPInterfacePacket::profileName | ( | ) | [virtual] |
Returns the profile name stored in this RTPInterfacePacket.
00211 { 00212 return opp_strdup(_profileName); 00213 };
void RTPInterfacePacket::senderModuleControl | ( | u_int32 | ssrc, | |
RTPSenderControlMessage * | msg | |||
) | [virtual] |
void RTPInterfacePacket::senderModuleCreated | ( | u_int32 | ssrc | ) | [virtual] |
void RTPInterfacePacket::senderModuleDeleted | ( | u_int32 | ssrc | ) | [virtual] |
void RTPInterfacePacket::senderModuleStatus | ( | u_int32 | ssrc, | |
RTPSenderStatusMessage * | msg | |||
) | [virtual] |
void RTPInterfacePacket::sessionEntered | ( | u_int32 | ssrc | ) | [virtual] |
Called by the rtp module to inform the application that the rtp session has been entered.
00112 { 00113 _type = RTP_IFP_SESSION_ENTERED; 00114 _ssrc = ssrc; 00115 };
void RTPInterfacePacket::sessionLeft | ( | ) | [virtual] |
Called by the rtp module to inform the application that this end system stop participating in this rtp session.
00196 { 00197 _type = RTP_IFP_SESSION_LEFT; 00198 };
u_int32 RTPInterfacePacket::ssrc | ( | ) | [virtual] |
RTPInterfacePacket::RTP_IFP_TYPE RTPInterfacePacket::type | ( | ) | [virtual] |
void RTPInterfacePacket::writeContents | ( | std::ostream & | os | ) | [virtual] |
Writes a longer info about this RTPInterfacePacket into the given stream.
00088 { 00089 os << "RTPInterfacePacket:" << endl; 00090 os << " type = " << _type << endl; 00091 os << " commonName = " << _commonName << endl; 00092 os << " profileName = " << _profileName << endl; 00093 os << " bandwidth = " << _bandwidth << endl; 00094 os << " destinationAddress = " << _destinationAddress << endl; 00095 os << " port = " << _port << endl; 00096 os << " ssrc = " << _ssrc << endl; 00097 os << " payloadType = " << _payloadType << endl; 00098 os << " fileName = " << _fileName << endl; 00099 };
int RTPInterfacePacket::_bandwidth [private] |
The bandwidth stored in this RTPInterfacePacket.
const char* RTPInterfacePacket::_commonName [private] |
The CNAME stored in this RTPInterfacePacket.
IN_Addr RTPInterfacePacket::_destinationAddress [private] |
The address stored in this RTPInterfacePacket.
const char* RTPInterfacePacket::_fileName [private] |
The file name stored in this RTPInterfacePacket.
int RTPInterfacePacket::_payloadType [private] |
The payload type stored in this RTPInterfacePacket.
IN_Port RTPInterfacePacket::_port [private] |
The port stored in this RTPInterfacePacket.
const char* RTPInterfacePacket::_profileName [private] |
The profile name stored in this RTPInterfacePacket.
u_int32 RTPInterfacePacket::_ssrc [private] |
The ssrc identifier stored in this RTPInterfacePacket.
RTP_IFP_TYPE RTPInterfacePacket::_type [private] |
The type of the RTPInterfacePacket.