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

📄 sipcall.h

📁 KphoneSI (kpsi) is a SIP (Session Initiation Protocol) user agent for Linux, with which you can in
💻 H
📖 第 1 页 / 共 2 页
字号:
	};	typedef  enum CallType CallT;		enum HoldState {		preCall,		callActive,		callHold	};	/**	 * Creates a new call for a given SipUser.	 */	SipCall( SipUser *local, const QString &id = QString::null, CallType ctype = UnknownCall );	/**	 * SipCall destructor. Will not attempt to send any BYEs (yet).	 */	~SipCall( void );		bool isSwitchThru(void) { return switchthru;}	void setSwitchThru(bool sw) {switchthru = sw;}			/**	*  The Calltype is a Payload Call (StandardCall,videoCall,auviCall,	*    	                          extCall0,extCall1,extCall2,extCall3,extCall4)	*/	bool loadCall(void);	/**	*  The Calltype is a Payload Call (StandardCall,videoCall,auviCall)	*  or  extCall0,extCall1,extCall2,extCall3,extCall4 with activeOnly Flag	*/	bool blockCall(void);	/**	*  The Calltype is a Call with Audip (StandardCall,videoCall,auviCall)	*/	bool withAudioCall(void);		/**	*  The Calltype is a Call external Payload  (videoCall,auviCall,extCall0,extCall1,extCall2,extCall3,extCall4)	*/	bool withExtCall(void);		bool isExtCall(void);		/**	 * Get the cause from Notify (refer) 	 */	QString getRefNoti(void) {return refnoti;}		/**	 * Set the cause for Notify (refer) 	 */	void    setRefNoti(QString body) { refnoti = body;}	/**	 * save CallType if allowed, return CallType 	*/	 int  saveLoadType (int load);		/**	 * Set the Flag  CMD line used to transfer session parameters	*/		void setUseLine(bool ucl){ useCmdLine =ucl;} 		/**	 * Get the Flag  CMD line used to transfer session parameters	*/		bool getUseLine(void) { return useCmdLine;}		/**	 * store the CMD line used to transfer session parameters	*/		void setCmdLine(const QString	cml) {theCmdLine = cml;}		/**	 * retrieve the CMD line used to transfer session parameters	*/		const QString getCmdLine(void) { return theCmdLine;}						/**	 * get our payload session's  PID to kill it	*/	int getCurPid(void)  {return curPid; }		/**	 * store the PID of our payload session	*/	void setCurPid (int pid) { curPid=pid; }		/**	 * Sets the Hold Initiator Flag.	 */	void	setHoldMaster(bool hmaster);		/**	 * Returns the Hold Initiator Flag	 */	bool	getHoldMaster(void);	/**	 * Sets the  Hold  State.	 */	void setHoldCall(HoldState hstate) {onHold=hstate;}	/**	 * Returns the Hold  State	 */	HoldState getHoldCall(void){return onHold;}		/**	 * Returns true, if on Hold	 */	bool isHeld (void) {return onHold==callHold;}		/**	 * Returns true, if Call is not on Hold and not uninitialized	 */	bool	isActive(void) { return onHold == callActive;}		/**	 * Returns  the no  Hold  Flag.	 */	bool	getNoHold(void){ return noHold;}	/**	 * Sets the no Hold  Flag.    	 */	void	setNoHold(bool nohold);		/**	 * Sets the allow Transfer  Flag.	 */	void	setTransAllowed(bool tstate) {tState=tstate;}	/**	 * Returns the allow Transfer  Flag.	 */	bool	getTransAllowed(void) {return tState;}		/**	 * Returns true if at least one of the  calls is active	 */		enum CallStatus {		callDisconneting,		callUnconnected,		callInProgress,		callDead };		void setCallStatus( CallStatus status ) { callstatus = status; }	CallStatus getCallStatus( void ) { return callstatus; }	bool getBasePresenceStatus( void ) const { return basePresenceStatus; }	QString getPresenceStatus( void ) const { return presenceStatus; }	QString getTrPresenceStatus( void );	void setBasePresenceStatus( bool status ) { basePresenceStatus = status; }	void setPresenceStatus( QString status ) { presenceStatus = status; }	CallType getCallType( void ) const { return calltype; }	void setCallType( CallType newtype );	void setCallTrType( int newtype );	void setInvoker( QString toexec );	QString getInvoker( void );	/**	 * This returns the local URI that we are known by for this call.	 * If there is none, returns the URI of our client parent.	 */	const SipUri &localAddress( void ) { return localuri; }	/**	 * Returns the associated call ID.	 */	const QString &getCallId( void ) { return callid; }	/**	 * Tries to find a @ref SipCallMember for the given URI.	 */	SipCallMember *getMember( const SipUri &uri );	/**	 * Returns the subject for this call.	 */	QString getSubject( void ) const { return subject; }	/**Authentication	 * Set the subject for this call. Will be used on all outgoing INVITEs	 * sent afterwards.	 */	void setSubject( const QString &newsubject );	SipUri getContactUri( void );	/**	 * Returns the contact string for this call.	 */	QString getContactStr( void ) const { return contactstr; }	/**	 * Set the contact string for this call.	 */	void setContactStr( const QString &newcontactstr ) { contactstr = newcontactstr; }	/**	 * Sends a SIP request under this call to the given call member.	 * Returns a @ref SipTransaction for tracking.	 */	SipTransaction *newRequest( SipCallMember *member, Sip::Method meth,			const QString &body = QString::null,			const MimeContentType &bodytype = MimeContentType::null,			const SipUri &referto = SipUri::null,			const QString &proxyauthentication = QString::null,			const QString &authentication = QString::null,			int expiresTime = -1 );	/**	 * Sends a SIP register under this call to the given call member.	 * Returns a @ref SipTransaction for tracking.	 *///	SipTransaction *newRegister( const SipUri &registerserver, int expiresTime,	SipTransaction *newRegister( const SipUri &registerserver, SipCallMember *callMember, int expiresTime,			const QString &authentication = QString::null,			const QString &proxyauthentication = QString::null,			const QString &qvalue = QString::null,			const QString &body = QString::null,			const MimeContentType &bodytype = MimeContentType::null );	/**	 * Returns an iterator for the list of all current members of thisAuthentication	 * call.	 */	SipCallMemberIterator getMemberList( void ) const { return SipCallMemberIterator( members ); }	/**	 * Returns ProxyUsername	 */	QString getProxyUsername( void );	/**	 * Returns Hostname	 */	QString getHostname( void );	/**	 * Returns uri of SipProxy	 */	QString getSipProxy( void );	/**	 * Returns uri of SipProxy	 */	QString getSipUri( void );	/**	 * Sets ProxyUsername.	 */	void setProxyUsername( QString newUsername );	/**	 * Returns password or QString:null if password not given for this call.	 */	QString getPassword( void );	/**	 * Sets the password for this call.	 */	void setPassword( QString newPassword );	/**	 * Returns pointer to localuri.	 */	SipUri *getPointerToLocaluri( void ) { return &localuri; }	/**	 * Sets the body type for presence.	 */	void setPresBody( int pb ) {presbody =pb; }	/**	 * Returns the body type for presence.	 */	int getPresBody( void) {return  presbody; }	void hideCallWidget( void );	void setSdpMessageMask( QString body ) { bodyMask = body; }	QString getSdpMessageMask( void ) { return bodyMask; }	void updateSubscribes( void );	void terminateSubscribes( int mess );	void onlyMeActive(bool me);	bool isOnlyMeActive(void) { return activeOnly; } /*** set / reset allowance for remote start*/	void setRemoteStart(bool allow){ RemoteStart  = allow ; } /*** is remote start allowed for this CallType*/	bool isRemoteStart(void){ return  RemoteStart; }  	signals:	/**	 * Triggered whenever the call status changes.	 */	void callStatusUpdated( void );	/**	 * Triggered whenever the call subject changes.	 */	void subjectChanged( void );	private:	bool useIPv6; 	bool RemoteStart;  	int curPid;	int extPay;			bool masterHold;	HoldState onHold; 	bool noHold;	bool activeOnly;	bool tState;	bool switchthru;		bool useCmdLine;	QString theCmdLine;	// Our client	SipClient *parent;	// Localuri defines who we are for this call. This is generated from	// the given SipUser, but after that we have no more association with	// the SipUser object	SipUri localuri;	// Our lists 	QPtrList<SipCallMember> members;	QPtrList<SipTransaction> transactions;	// CSeq numbers, local and remote	unsigned int lastremoteseq;	unsigned int lastseq;	// Call state	CallType calltype;	CallStatus callstatus;	QString callid;	QString subject;	QString presenceStatus;	bool basePresenceStatus;	bool hasrecordroute;	SipUriList recordroute;	bool hasroute;	SipUriList route;	SipUri getLocaluri( void ) const { return localuri; }	// Audit call state	void auditCall( void );	// For readability of the code	SipCallMember *incomingRequest( SipMessage *message );	void incomingResponse( SipMessage *message );	// For SipTransaction	bool sendRequest( SipMessage *reqmsg, bool contact = true, const SipUri &proxy = SipUri::null, const QString &branch = QString::null );	void sendResponse( SipMessage *reqmsg, bool contact = true );	void sendRaw( SipMessage *msg );	// For SipClient	SipCallMember *incomingMessage( SipMessage *message );	QList<SipTransaction> &getTransactionList( void ) { return transactions; }	// For SipCallMember	void addMember( SipCallMember *newmember );	QString bodyMask;	QString contactstr;	bool looseRoute;	QString refnoti;	QString Inumber;	int presbody;};typedef QListIterator<SipCall> SipCallIterator;#endif // SIPCALL_H_INCLUDED

⌨️ 快捷键说明

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