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

Public Member Functions | |
| virtual IMPORT_C | ~CSIPExSIPEstablishedState () |
| void | LinkStates (CSIPExSIPStateBase &aTerminatingState, CSIPExSIPStateBase &aTerminatedState) |
| void | EndSessionL (CSIPExSIPEngine &aEngine) |
| void | ByeReceivedL (CSIPExSIPEngine &aEngine, CSIPServerTransaction &aTransaction) |
| void | ResponseReceivedL (CSIPExSIPEngine &aEngine, CSIPClientTransaction &aTransaction) |
| void | AckReceivedL (CSIPExSIPEngine &aEngine, CSIPServerTransaction &aTransaction) |
Static Public Member Functions | |
| static IMPORT_C CSIPExSIPEstablishedState * | NewL () |
Private Member Functions | |
| CSIPExSIPEstablishedState () | |
Private Attributes | |
| CSIPExSIPStateBase * | iTerminatingState |
| CSIPExSIPStateBase * | iTerminatedState |
Definition at line 32 of file SIPExSIPEstablishedState.h.
|
|
Destructor Definition at line 39 of file SIPExSIPEstablishedState.cpp.
|
|
|
C++ default constructor. Definition at line 30 of file SIPExSIPEstablishedState.cpp.
|
|
|
Two-phased constructor. Definition at line 48 of file SIPExSIPEstablishedState.cpp. References CSIPExSIPEstablishedState(). 00049 { 00050 CSIPExSIPEstablishedState* self = 00051 new (ELeave) CSIPExSIPEstablishedState(); 00052 return self; 00053 }
|
|
||||||||||||
|
Links the states
Definition at line 60 of file SIPExSIPEstablishedState.cpp. References iTerminatedState, and iTerminatingState. 00063 { 00064 iTerminatingState = &aTerminatingState; 00065 iTerminatedState = &aTerminatedState; 00066 }
|
|
|
EndSessionL Send BYE in an established session.
Reimplemented from CSIPExSIPStateBase. Definition at line 73 of file SIPExSIPEstablishedState.cpp. References CSIPExSIPEngine::CreateMessageElementsLC(), CSIPExSIPEngine::DialogAssoc(), iTerminatingState, CSIPExSIPEngine::SetClientTx(), and CSIPExSIPEngine::SetCurrentState(). 00074 { 00075 // Get the current Dialog Association 00076 CSIPInviteDialogAssoc& dialogAssoc = aEngine.DialogAssoc(); 00077 // Create the Message Elements object 00078 CSIPMessageElements* msgElements = aEngine.CreateMessageElementsLC(); 00079 00080 // Use the Dialog Association to send BYE request 00081 CSIPClientTransaction* tx = dialogAssoc.SendByeL( msgElements ); 00082 aEngine.SetClientTx( tx ); 00083 00084 CleanupStack::Pop( msgElements ); 00085 00086 aEngine.SetCurrentState( iTerminatingState ); 00087 }
|
|
||||||||||||
|
ByeReceivedL BYE has been received.
Reimplemented from CSIPExSIPStateBase. Definition at line 94 of file SIPExSIPEstablishedState.cpp. References iTerminatedState, CSIPExSIPEngine::Observer(), MSIPExSIPEngineObserver::SessionEnded(), and CSIPExSIPEngine::SetCurrentState(). 00097 { 00098 // Create and send response 00099 CSIPResponseElements* elem = 00100 CSIPResponseElements::NewLC( 00101 200, SIPStrings::StringF( SipStrConsts::EPhraseOk ) ); 00102 aTransaction.SendResponseL( elem ); 00103 CleanupStack::Pop( elem ); 00104 00105 // Inform observer 00106 aEngine.Observer()->SessionEnded(); 00107 00108 // Set state ??? 00109 aEngine.SetCurrentState( iTerminatedState ); 00110 }
|
|
||||||||||||
|
ResponseReceivedL A SIP response has been received from the network.
Reimplemented from CSIPExSIPStateBase. Definition at line 117 of file SIPExSIPEstablishedState.cpp. References CSIPExSIPEngine::DialogAssoc(), MSIPExSIPEngineObserver::EngineError(), and CSIPExSIPEngine::Observer(). 00120 { 00121 // We might receive some 200 (OK) responses from the network 00122 // after the session has been established. These should be 00123 // ACKed, other responses indicate errors. 00124 00125 const CSIPResponseElements* respElem = aTransaction.ResponseElements(); 00126 00127 TUint statusCode = respElem->StatusCode(); 00128 00129 if ( statusCode >= 200 && statusCode < 300 ) 00130 { 00131 // Send ACK to remote party 00132 CSIPInviteDialogAssoc& dialogAssoc = aEngine.DialogAssoc(); 00133 dialogAssoc.SendAckL( aTransaction ); 00134 } 00135 else 00136 { 00137 aEngine.Observer()->EngineError( statusCode ); 00138 } 00139 }
|
|
||||||||||||
|
AckReceivedL ACK has been received.
Reimplemented from CSIPExSIPStateBase. Definition at line 146 of file SIPExSIPEstablishedState.cpp. References MSIPExSIPEngineObserver::InviteAcceptedByUs(), and CSIPExSIPEngine::Observer(). 00149 { 00150 aEngine.Observer()->InviteAcceptedByUs(); 00151 }
|
|
© Nokia 2006 |