sipexstateconnecting.cpp
来自「an example for sip for symbian」· C++ 代码 · 共 72 行
CPP
72 行
/*
* ==============================================================================
* Name : SIPExStateConnecting.cpp
* Part of : SIPExEngine
* Interface :
* Description :
* Version :
*
* Copyright (c) 2004-2006 Nokia Corporation.
* This material, including documentation and any related
* computer programs, is protected by copyright controlled by
* Nokia Corporation.
* ==============================================================================
*/
// INCLUDES
#include "SIPExStateConnecting.h"
#include "SIPExGameEngine.h"
#include "SIPExSIPEngine.h"
#include <e32svr.h>
// -----------------------------------------------------------------------------
// TSIPExStateConnecting::SocketState
// Changes the active state according the new state of the Socket engine.
// If the socket is connected the game is reseted first and the turn is given
// to the local user.
// If not connected, info UI and set Registered to a new active state.
// -----------------------------------------------------------------------------
//
void TSIPExStateConnecting::SocketState(
CSIPExEngine* aContext,
TInt aNewState )
{
switch (aNewState)
{
case CSIPExSocketEngine::ENotConnected:
ChangeState( aContext, aContext->iStateRegistered );
aContext->InfoL( KNotConnected() );
break;
case CSIPExSocketEngine::EConnected:
if( aContext->Peer() == CSIPExEngine::EClient )
{
aContext->ResetGame();
ChangeState( aContext, aContext->iStateLocal );
aContext->StatusInfoL( KYourMove() );
aContext->InfoL( KConnected() );
}
break;
case CSIPExSocketEngine::ETimedOut:
ChangeState( aContext, aContext->iStateRegistered );
aContext->InfoL( KTimedOut() );
break;
default:
break;
}
}
// -----------------------------------------------------------------------------
// TSIPExStateInviting::EndGameL
// The SIP Session will be ended.
// -----------------------------------------------------------------------------
//
void TSIPExStateConnecting::EndGameL( CSIPExEngine* aContext )
{
aContext->SIPEngine()->EndSessionL();
}
// End of file
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?