96 __ASSERT_DEBUG(aContext.Profile()!=0, User::Invariant()); |
96 __ASSERT_DEBUG(aContext.Profile()!=0, User::Invariant()); |
97 aContext.SetNextState(*iRegisteredState); |
97 aContext.SetNextState(*iRegisteredState); |
98 } |
98 } |
99 |
99 |
100 // ----------------------------------------------------------------------------- |
100 // ----------------------------------------------------------------------------- |
|
101 // CSIPPrflDeregisterRequestedState::DeregisterL() |
|
102 // (other items were commented in a header). |
|
103 // ----------------------------------------------------------------------------- |
|
104 // |
|
105 void CSIPPrflDeregisterRequestedState::DeregisterL( |
|
106 MSIPProfileContext& aContext) |
|
107 { |
|
108 __ASSERT_DEBUG(aContext.Profile()!=0, User::Invariant()); |
|
109 __ASSERT_DEBUG(aContext.Registration()!=0, User::Invariant()); |
|
110 if (aContext.Connection().State()==CSIPConnection::EActive) |
|
111 { |
|
112 if (iUser.AddProfileIntoQueue(*aContext.Profile())) //compares the registrar of the present profile with the other profiles existing in the connection context array. |
|
113 { |
|
114 iUser.DeregisterProfileL(*aContext.Profile()); |
|
115 |
|
116 } |
|
117 else |
|
118 { |
|
119 CSIPMessageElements* elements = |
|
120 aContext.CreateDeRegisterElementsL(); |
|
121 CleanupStack::PushL(elements); |
|
122 CSIPClientTransaction* tx = |
|
123 aContext.Registration()->DeregisterL(elements); |
|
124 CleanupStack::Pop(elements); |
|
125 aContext.SetTransaction(tx); |
|
126 aContext.SetNextState(*iDeregistrationInProgressState); |
|
127 } |
|
128 } |
|
129 aContext.AgentObserver().SIPProfileStatusEvent( |
|
130 *aContext.Profile(), |
|
131 aContext.Registration()->ContextId()); |
|
132 } |
|
133 |
|
134 |
|
135 // ----------------------------------------------------------------------------- |
101 // CSIPPrflDeregisterRequestedState::ErrorOccured() |
136 // CSIPPrflDeregisterRequestedState::ErrorOccured() |
102 // This can happen if the de-register was reguested while the connection is |
137 // This can happen if the de-register was reguested while the connection is |
103 // suspended (registered->de-register requested). SIP stack has removed |
138 // suspended (registered->de-register requested). SIP stack has removed |
104 // the registration binding, so NOP and transition to Init state. |
139 // the registration binding, so NOP and transition to Init state. |
105 // (other items were commented in a header). |
140 // (other items were commented in a header). |