|
S60 3rd Edition SDK for Symbian OS Example Applications Guide |
#include <SIPExStateIdle.h>
Inheritance diagram for TSIPExStateIdle:

Public Member Functions | |
| TSIPExStateIdle () | |
| virtual void | EnableProfileL (CSIPExEngine *aContext) |
| virtual void | SessionEnded (CSIPExEngine *aContext) |
| virtual void | InviteReceived (CSIPExEngine *aContext, const TDesC8 &aFrom, const TUint32 aIapId) |
Public Attributes | |
| TBool | iEnded |
Definition at line 27 of file SIPExStateIdle.h.
|
|
Constructor Definition at line 35 of file SIPExStateIdle.h. 00035 : iEnded( EFalse ) {}
|
|
|
EnableProfile From TSIPExState Reimplemented from TSIPExState. Definition at line 28 of file SIPExStateIdle.cpp. References TSIPExState::ChangeState(), CSIPExSIPEngine::EnableProfileL(), CSIPExEngine::InfoL(), CSIPExEngine::iStateRegistering, and CSIPExEngine::SIPEngine(). 00029 { 00030 // Notify UI 00031 aContext->InfoL( KEnablingProfile() ); 00032 00033 // The registration is required 00034 if( !aContext->SIPEngine()->EnableProfileL() ) 00035 { 00036 ChangeState( aContext, aContext->iStateRegistering ); 00037 } 00038 // The profile was succesfully enabled and registered 00039 else 00040 { 00041 aContext->InfoL( KProfileEnabled() ); 00042 ChangeState( aContext, aContext->iStateRegistered ); 00043 } 00044 }
|
|
|
SessionEnded From TSIPExState Reimplemented from TSIPExState. Definition at line 51 of file SIPExStateIdle.cpp. References iEnded, and TSIPExState::Info(). 00052 { 00053 // Keep track whether session ended while accept dialog was shown to user. 00054 iEnded = ETrue; 00055 00056 Info( aContext, KSessionEnded() ); 00057 }
|
|
||||||||||||||||
|
InviteReceived From TSIPExState Reimplemented from TSIPExState. Definition at line 66 of file SIPExStateIdle.cpp. References CSIPExEngine::AcceptInvitationL(), CSIPExSIPEngine::AcceptInviteL(), TSIPExState::ChangeState(), iEnded, TSIPExState::Info(), CSIPExEngine::iStateAcceptingSIP, CSIPExEngine::ResetGame(), CSIPExEngine::SetPeer(), CSIPExEngine::SIPEngine(), CSIPExEngine::SocketEngineL(), and CSIPExSocketEngine::StartListeningL(). 00070 { 00071 iEnded = EFalse; 00072 00073 TBool retVal( EFalse ); 00074 TRAPD( ignore, retVal = aContext->AcceptInvitationL( aFrom ) ); 00075 if ( iEnded ) 00076 { 00077 return; 00078 } 00079 if( retVal ) 00080 { 00081 ChangeState( aContext, aContext->iStateAcceptingSIP ); 00082 // The game data is reseted 00083 aContext->ResetGame(); 00084 // The role for the peer is set 00085 aContext->SetPeer( CSIPExEngine::EServer ); 00086 // Start listen incoming connections 00087 TInetAddr addr; 00088 TRAP( ignore, 00089 addr = aContext->SocketEngineL()->StartListeningL( aIapId ) ); 00090 // Signal SIP engine 00091 TRAP( ignore, aContext->SIPEngine()->AcceptInviteL( addr ) ); 00092 Info( aContext, KWaitingRemoteConn() ); 00093 } 00094 else 00095 { 00096 // Signal SIP engine 00097 TRAP( ignore, aContext->SIPEngine()->DeclineInviteL() ); 00098 Info( aContext, KInviteDeclined() ); 00099 } 00100 }
|
|
© Nokia 2006 |