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

📄 sipexsipserverestablishingstate.cpp

📁 基于SYMBIAN手机操作系统
💻 CPP
字号:
/*
* ==============================================================================
*  Name        : SIPExSIPServerEstablishingState.cpp

* ==============================================================================
*/

// INCLUDE FILES
#include	"SIPExSIPServerEstablishingState.h"
#include	"SIPExSIPEngine.h"

#include <sipstrings.h>
#include <SipStrConsts.h>

// ============================ MEMBER FUNCTIONS ===============================

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::CSIPExSIPServerEstablishingState
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
CSIPExSIPServerEstablishingState::CSIPExSIPServerEstablishingState()
	{
	}

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::~CSIPExSIPServerEstablishingState
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
EXPORT_C CSIPExSIPServerEstablishingState::~CSIPExSIPServerEstablishingState()
	{
	}

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::NewL()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
EXPORT_C CSIPExSIPServerEstablishingState* CSIPExSIPServerEstablishingState::NewL()
	{
	CSIPExSIPServerEstablishingState* self =
		new (ELeave) CSIPExSIPServerEstablishingState();
	return self;
	}

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::LinkStates()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
void CSIPExSIPServerEstablishingState::LinkStates(
	CSIPExSIPStateBase& aEstablishedState,
	CSIPExSIPStateBase& aTerminatedState )
	{
	iEstablishedState = &aEstablishedState;
	iTerminatedState = &aTerminatedState;
	}
	
// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::ByeReceivedL()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
void CSIPExSIPServerEstablishingState::ByeReceivedL(
	CSIPExSIPEngine& aEngine,
	CSIPServerTransaction& aTransaction )
	{
	// Create and send response
    CSIPResponseElements* elem = 
        CSIPResponseElements::NewLC( 
            200, SIPStrings::StringF( SipStrConsts::EPhraseOk ) );
    aTransaction.SendResponseL( elem );
    CleanupStack::Pop( elem );

	// Inform observer
	aEngine.Observer()->SessionEnded();
	
	// Set state
	aEngine.SetCurrentState( iTerminatedState );
	}

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::CancelReceivedL()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
void CSIPExSIPServerEstablishingState::CancelReceivedL(
	CSIPExSIPEngine& aEngine,
	CSIPClientTransaction& /*aTransaction */ )
	{
	aEngine.Observer()->SessionEnded();
	aEngine.SetCurrentState( iTerminatedState );
	}

// -----------------------------------------------------------------------------
// CSIPExSIPServerEstablishingState::AckReceivedL()
// (other items were commented in a header).
// -----------------------------------------------------------------------------
void CSIPExSIPServerEstablishingState::AckReceivedL(
	CSIPExSIPEngine& aEngine,
	CSIPServerTransaction& /* aTransaction */ )
	{
	aEngine.Observer()->InviteAcceptedByUs();
	aEngine.SetCurrentState( iEstablishedState );
	}

// End of file

⌨️ 快捷键说明

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