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

📄 sipexsipengine.h

📁 基于SYMBIAN手机操作系统
💻 H
📖 第 1 页 / 共 2 页
字号:
        *
		* @param aTransaction SIP server transaction. The ownership is
        *   transferred.
        */
		void IncomingRequest( CSIPServerTransaction* aTransaction );

		/**
		* IncomingRequest (from MSIPConnectionObserver)
		* A SIP request within a dialog has been received from the network.
		* The client must resolve the actual dialog association to which
		* this request belongs.
		*
		* @param aTransaction SIP server transaction. The ownership is
        *   transferred.
		* @param aDialog the dialog that this transaction belongs to.        
		*/
		void IncomingRequest( CSIPServerTransaction* aTransaction,
							  CSIPDialog& aDialog );

		/**
		* IncomingResponse (from MSIPConnectionObserver)
		*/
		void IncomingResponse( CSIPClientTransaction& aTransaction );

		/**
		* IncomingResponse (from MSIPConnectionObserver)
		* A SIP response that is within a dialog association or creates
		* a dialog association.
        *
		* @param aTransaction contains response elements.
		* @param aDialogAssoc a dialog association.        
		*/
		void IncomingResponse( CSIPClientTransaction& aTransaction,
							   CSIPDialogAssocBase& aDialogAssoc );

        /**
		* IncomingResponse (from MSIPConnectionObserver)
		*/
		void IncomingResponse( CSIPClientTransaction& aTransaction,
							   CSIPInviteDialogAssoc* aDialogAssoc );


		/**
		* IncomingResponse (from MSIPConnectionObserver)
		*/
		void IncomingResponse( CSIPClientTransaction& aTransaction,
							   CSIPRegistrationBinding& aRegistration );


 		/**
		* An asynchronous error has occurred in the stack related to the
		* request indicated by the given transaction.
		*
		* @param aError system wide or sip error code
		* @param aTransaction failed transaction.
		* @param aSIPConnection a SIP connection        
		*/
		void ErrorOccured( TInt aError,
						   CSIPTransactionBase& aTransaction );

		/**
		* An asynchronous error has occurred in the stack related
		* to the request indicated by the given transaction.
        *
		* @param aError system wide or sip error code
		* @param aTransaction the failed transaction.
		* @param aRegistration the failed registration.        
		*/
		void ErrorOccured( TInt aError,
						   CSIPClientTransaction& aTransaction,
						   CSIPRegistrationBinding& aRegistration );

		/**
		* An asynchronous error has occured related to a request within
		* an existing dialog.
        *
		* @param aError system wide or sip error code
		* @param aTransaction the failed transaction.
		* @param aDialogAssoc the failed dialog associoation.        
		*/
		void ErrorOccured( TInt aError,
						   CSIPTransactionBase& aTransaction,
						   CSIPDialogAssocBase& aDialogAssoc );

		/**
		* An asynchronous error has occured related to a refresh 
        *
		* @param aError system wide or sip error code
		* @param aSIPRefresh original refresh object.        
		*/
		void ErrorOccured( TInt aError, CSIPRefresh& aSIPRefresh );

		/**
		* An asynchronous error has occured related to a periodical refresh
        * that relates to a registration.
        *
		* @param aError system wide or sip error code; 
		*		 KErrCouldNotConnect if the refresh has failed
		*		 due to the suspended connection.
		* @param aRegistration associated registration.
		*/
		void ErrorOccured( TInt aError,
						   CSIPRegistrationBinding& aRegistration );

		/**
		* An asynchronous error has occured related to a periodical refresh
        * that belongs to SIP dialog association.
        *
		* @param aError system wide or sip error code; 
		*        KErrCouldNotConnect if the refresh has failed
		*		 due to the suspended connection.
		* @param aDialogAssoc SIP dialog association.        
		*/
		void ErrorOccured( TInt aError,
						   CSIPDialogAssocBase& aDialogAssoc );

        /**
		* SIP stack has completed UAC core INVITE transaction 64*T1 seconds
        * after the reception of the first 2xx response. No more 2xx responses
        * can be received to the issued single INVITE.
        *
        * If the INVITE transaction does not create a dialog, or the INVITE
        * transaction encounters an error, this event will not be sent.
        *
		* @param aTransaction a complete UAC core INVITE transaction
		*/
        void InviteCompleted( CSIPClientTransaction& aTransaction );
        
       	/**
        * Invite was canceled with the CANCEL
        * @param aTransaction a canceled INVITE UAS transaction
        */
        void InviteCanceled( CSIPServerTransaction& aTransaction );

		/**
		* Connection state has changed.
        * If connection state has changed to EInactive or EUnavailable,
		* SIP stack has removed all stand-alone SIP refreshes, registrations 
		* and dialog associations that client requested to refresh. Client may
		* re-issue refresh requests (stand-alone, registration or dialog 
		* association related) when connection becomes EActive again.
		* SIP stack also terminates all pending sip client transactions and no
        * errors are reported back to the client about the terminated
        * transactions nor about removed refreshes in order to avoid event
        * flood.
		* 
		* @param aState indicates the current connection state        
		*/
		void ConnectionStateChanged( CSIPConnection::TState aState );

		
// From MSIPProfileRegistryObserver


        /** 
		* An event related to SIP Profile has accorred
		* @param aProfileId a profile Id
		* @param aEvent an occurred event
		**/
       	void ProfileRegistryEventOccurred( TUint32 aProfileId, TEvent aEvent );

		/**
		* An asynchronous error has occurred related to SIP profile
		* Event is send to those observers, who have the
		* corresponding profile instantiated.
		* @param aProfileId the id of failed profile 
		* @param aError an occurred error
		*/
		void ProfileRegistryErrorOccurred( TUint32 aProfileId, TInt aError );



	public:	// Methods internal to the Engine

		/**
		* CreateToHeaderLC
		* Return a To header object based on URI.
		* @param aSipUri The URI address as a string.
		* @return Pointer to CSIPToHeader instance.
		* Ownership is transferred.
		*/
		CSIPToHeader* CreateToHeaderLC( const TDesC8& aSipUri );
		
		/**
		* CreateReqElementsLC
		* Return a RequestElements object based on URI.
		* @param aSipUri The URI address as a string.
		* @return Pointer to CSIPRequestElements instance.
		*/
		CSIPRequestElements* CreateReqElementsLC( const TDesC8& aSipUri );
			
		/**
		* CreateMessageElementsLC
		* Instantiate a Message Elements object.
		* @return Pointer to CSIPMessageElements instance.
		* Ownership is transferred.
		*/
		CSIPMessageElements* CreateMessageElementsLC();
		
		/**
		* ConvertToUri8LC
		* Convert textual representation of uri to CUri8
		* @return Pointer to CUri8 instance.
		* Ownership is transferred.
		*/
		CUri8* ConvertToUri8LC( const TDesC8& aSipUri );

		/**
		* SdpDocumentLC
		* Instantiate a SDP Document object.
		* @return Pointer to CSdpDocument instance.
		* Ownership is transferred.
		*/
		CSdpDocument* SdpDocumentLC();

		/**
		* SdpBodyL
		* Return SDP message body in textual form.
		* @return Pointer to SDP Document as HBufC8.
		* Ownership is transferred.
		*/
		HBufC8* SdpBodyL( CSdpDocument* aDocument );


		/**
         * Get SDP codec string pool. Open string pool if not opened.
		 *
         * @return String pool.
         */
		RStringPool StringPoolL();


		/**
		* IPAddressFromResponseElementsL
		* Get IP Address from the Response Elements
		* received from peer.
		* @param aRespElem The Response Elements.
		*/
		const TInetAddr IPAddressFromResponseElementsL(
			const CSIPResponseElements& aRespElem );


		/**
		* Observer
		* Return a pointer to the Engine Observer class.
		*/
		MSIPExSIPEngineObserver* Observer();
		
	private:

		/**
		* SessionId
		* Return the Session ID
		*/
		TInt64 SessionId();
		
		void MediaFieldsL( CSdpDocument* aDocument );
		
		/**
		* CurrentConnection returns currently used connection.
		* Can be used also for checking if connection exists.
		* Returns either iConnection, iNotOwnedConnection or NULL
		*/
		CSIPConnection* CurrentConnection();

		/**
		* Handle SIP profile registration event
		* @param aSIPProfileId id of registered profile
		*/
		void HandleProfileRegistered( TUint32 aSIPProfileId );
		
		/**
		* Handle SIP profile deregistration event
		* @param aSIPProfileId id of deregistered profile
		*/
		void HandleProfileDeregistered( TUint32 aSIPProfileId );

		/**
		* Handle SIP profile destruction event.
		* Event is send to those observers, who have the
		* corresponding profile instantiated.
		* @param aSIPProfileId id of profile which was destroyed
		*/
		void HandleProfileDestroyed( TUint32 aSIPProfileId );
		


	private:	// Data

		TInt64						iSessionId;
		TInetAddr					iLocalAddr;
		MSIPExSIPEngineObserver*	iObserver;

		CSIP*						iSIP;
		CSIPProfile*				iProfile;
		CSIPProfileRegistry*		iProfileRegistry;
		CSIPConnection*				iConnection;
		CSIPInviteDialogAssoc*		iDialogAssoc;

		CSIPConnection::TState		iConnState;

		CSIPExSIPStateBase*			iCurrentState;
		CSIPClientTransaction*		iClientTx;
		CSIPServerTransaction*		iServerTx;

		// States of the machine
		CSIPExSIPIdleState*					iIdle;
		CSIPExSIPClientEstablishingState*	iClientEstablishing;
		CSIPExSIPClientOfferingState*		iClientOffering;
		CSIPExSIPServerOfferingState*		iServerOffering;
		CSIPExSIPServerEstablishingState*	iServerEstablishing;
		CSIPExSIPEstablishedState*			iEstablished;
		CSIPExSIPTerminatingState*			iTerminating;
		
	};

#endif	// _SIPEXSIPENGINE_H_

⌨️ 快捷键说明

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