⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sdpbuild.h

📁 KphoneSI (kpsi) is a SIP (Session Initiation Protocol) user agent for Linux, with which you can in
💻 H
字号:
#ifndef SDPBUILD_H_INCLUDED#define SDPBUILD_H_INCLUDED#include <qdialog.h>#include "sipmessage.h"#include "sipcall.h"#include "../kphone/sessioncontrol.h"/*** @short construct and parse sdpmessages* Used to construct SDP Messages and to store the payload* data into the SipCall incarnation* performs codec checks and security tasks* CAVE!!  if you change the m= line, you have to adapt SipClient::parseMessage, too*/class SdpBuild{public:/*** Construct a blank SDP message object.*/SdpBuild( SessionControl *sco,SipCall *scall );/*** Deletes the SDP message.*/~SdpBuild( void );/***       Generate a SDP-Message for INVITE to start a new session*/	QString prepInviteString(int load ,QString audioport, QString port);/***	Generate a SDP-Message for 200 OK to acknowledge  a new session*/	QString prepAcceptString(int load ,QString audioport, QString port, bool isHold);/***	Generate a SDP-Message for OPTIONS*/	QString prepOptString(void);/*** Read the session description* Return values are 0 on error, the number of the Call Type otherwise*/	int checkCodec( bool testReInvite, SipCallMember *member , bool forceHold, bool *srtp);/** Compare the own vectorId against the incoming*   if not equal, we assume incompatible content of the session type and return 0*   if equal, we return the status**/	int checkVectorId(int stat, QString incomingId);/** * get the partner host's port*/	const QString &getExtPort(void) const {return testPort; }	/** * store the partner host's port * this will be user when we construct the commandline*/	void setExtPort (const QString &tp);/** * get our own port, stored for the partner*/	const QString &getExtHomePort(void) const {return testHomePort; }	/** * store our own port * this will be user when we construct the commandline*/	void setExtHomePort (const QString &thp);/** * get our own port, stored for the partner, reflect STUN*/	const QString &getSExtHomePort(void) const {return testSHomePort; }	/** * store our own port * this will be user when we construct the commandlinereflect STUN*/	void setSExtHomePort (const QString &thp);/** * get the partner host's audioport*/	const QString &getAudioPort(void) const {return audioPort; }	/** * store the partner host's audio port * this will be user when we construct the commandline*/	void setAudioPort (const QString &tp);/** * get our own audioport, stored for the partner*/	const QString &getAudioHomePort(void) const {return audioHomePort; }	/** * store our own audioport * this will be user when we construct the commandline*/	void setAudioHomePort (const QString &thp);	/** * get our Video Codec*/	QString  getVidCodec(void)  { return videoCodec; }/** * store our Video Codec*/	void setVidCodec (const QString &vc);	/** * get our preferred Video Codec*/	QString  getVidPrefCodec(void)  { return videoPrefCodec; }	QString  getVidPrefCodecNum(void)  { return videoPrefCodecNum; }/** * store our preferredVideo Codec*/	void setVidPrefCodec (const QString &vc);	void setVidPrefCodecNum (const QString &vc);/** * get our preferred Codec*/	QString  getPrefCodec(void)  { return prefCodec; }	QString  getPrefCodecNum(void)  { return prefCodecNum; }	/** * store our preferred Codec*/	void setPrefCodec (const QString &pc);	void setPrefCodecNum (const QString &pc);	/*** get our Video Codec Type*/	codecType  getVidCodecType(void)  { return videoCodecType; }	/*** store our Video Codec Type*/	void setVidCodecType (codecType vct) {videoCodecType = vct;}/***/		codecType getRtpCodec(void);	/***/		codecType getVideoRtpCodec(void);/***/	int  getRtpCodecNum(void); 	/** * get the partner host's IP address*/	const QString &getExtHost(void) const {return testHost; }	/** * store the partner host's IP address * this will be user when we construct the commandline*/	void setExtHost (const QString &tc);		/*** see if the transport fields of both sides are equal*/	bool testTrans(int status,QString trans);		int doReturn(int stat);		void setResponsePay(int pay);		int getResponsePay(void) { return responsePay; }		int getRealLoad(void) { return realLoad; }/*public slots:signals:private slots:protected slots:*/private:	QString msg;	SipCall *call;	SessionControl *sessionC;	QString testPort;	QString testHomePort;	QString testSHomePort;	QString audioPort;	QString audioHomePort;	QString videoCodec;	QString videoPrefCodec;	QString videoPrefCodecNum;	QString prefCodec;	QString prefCodecNum;	codecType videoCodecType;	QString testHost;	int responsePay;/*** Read local supported Payload Type for received AUDIO Encoding Name*/	QString readSupportedAudioPayloadType( QString receivedEncodingName );/*** Negotiation of AUDIO Codecs*/	bool audioMediaNegotiationINVITE(int recAttributeNumber);/*** Negotiation of Video Codecs*/	bool videoMediaNegotiationINVITE(int recAttributeNumber);/*** Read local supported Payload Type for received Video Encoding Name*/	QString readSupportedVideoPayloadType( QString receivedEncodingName );/*** VIDEO MEDIA FORMAT LISTE max 1byte (0.255)*/	QString vcc[256];        // QString vcstr[3];/*** VIDEO MEDIA ATTRIBUTE VALUE LISTE max 1byte (0.255)*/        QString vcstr[256];/*** AUDIO MEDIA FORMAT LISTE max 1byte (0.255)*/ 	QString acc[256];        // QString acstr[3];/*** AUDIO MEDIA ATTRIBUTE VALUE LISTE max 1byte (0.255)*/        QString acstr [256];QString trsp;QString end;QString auEnd;QString viEnd;QString telend;QString mIs;QString mAudio;QString mVideo;QString aRMap;QString vecID;QString transp;QString tEvent;bool remoteStart;int cntParam;bool ReInvite;int realLoad;int tempresponsepay;};#endif // SDPBUILD_H_INCLUDED

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -