equal
deleted
inserted
replaced
69 */ |
69 */ |
70 CAgentAdapter::CAgentAdapter(CAgentSubConnectionProvider& aAgentScpr) |
70 CAgentAdapter::CAgentAdapter(CAgentSubConnectionProvider& aAgentScpr) |
71 : iAgentScpr(aAgentScpr), |
71 : iAgentScpr(aAgentScpr), |
72 iAgentState(EDisconnected), |
72 iAgentState(EDisconnected), |
73 iAgentConnectType(EAgentNone), |
73 iAgentConnectType(EAgentNone), |
74 iLastProgress(KFinishedSelection,KErrNone),iAgentErrorState(EFalse) |
74 iLastProgress(KFinishedSelection,KErrNone) |
75 { |
75 { |
76 } |
76 } |
77 |
77 |
78 |
78 |
79 /** |
79 /** |
146 Begins the disconnection of the Agent |
146 Begins the disconnection of the Agent |
147 */ |
147 */ |
148 void CAgentAdapter::DisconnectAgent(TInt aReason) |
148 void CAgentAdapter::DisconnectAgent(TInt aReason) |
149 { |
149 { |
150 if (iAgentState == EConnecting) |
150 if (iAgentState == EConnecting) |
151 { |
151 { |
152 iAgent->CancelConnect(); |
152 iAgent->CancelConnect(); |
153 } |
153 } |
154 else if (iAgentState == EReconnecting) |
154 else if (iAgentState == EReconnecting) |
155 { |
155 { |
156 iAgent->CancelReconnect(); |
156 iAgent->CancelReconnect(); |
157 } |
157 } |
158 if (iAgentState != EDisconnecting) |
158 iAgentState = EDisconnecting; |
159 { |
159 iAgent->Disconnect(aReason); |
160 iAgentState = EDisconnecting; |
|
161 iAgent->Disconnect(aReason); |
|
162 } |
|
163 } |
160 } |
164 |
161 |
165 |
162 |
166 /** |
163 /** |
167 Starts the process of obtaining authentication information via the Agent |
164 Starts the process of obtaining authentication information via the Agent |
308 #endif |
305 #endif |
309 } |
306 } |
310 else |
307 else |
311 { |
308 { |
312 iLastProgress.iError = aStatus; |
309 iLastProgress.iError = aStatus; |
313 // set the agent state to EDisconnecting |
|
314 iAgentState = EDisconnecting; |
|
315 iAgent->Disconnect(aStatus); |
310 iAgent->Disconnect(aStatus); |
316 } |
311 } |
317 } |
312 } |
318 } |
313 } |
319 |
314 |
351 } |
346 } |
352 else |
347 else |
353 { |
348 { |
354 #ifdef __CFLOG_ACTIVE |
349 #ifdef __CFLOG_ACTIVE |
355 TRAPD(err, |
350 TRAPD(err, |
|
351 //iAgentScpr.ProgressL(KConnectionUninitialised); |
356 iAgentState = EDisconnected; |
352 iAgentState = EDisconnected; |
357 iAgentScpr.ConnectionDownL(); |
353 iAgentScpr.ConnectionDownL(); |
358 // iAgentScpr.ProgressL(KConnectionUninitialised); |
|
359 ); |
354 ); |
360 if (err != KErrNone) |
355 if (err != KErrNone) |
361 { |
356 { |
362 __CFLOG_VAR((KAgentSCprTag, KAgentSCprSubTag, _L8("CAgentAdapter::DisconnectComplete() - Trapped [err=%d]"), err)); |
357 __CFLOG_VAR((KAgentSCprTag, KAgentSCprSubTag, _L8("CAgentAdapter::DisconnectComplete() - Trapped [err=%d]"), err)); |
363 __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_NifManAgtPrCCAgn, 3)); |
358 __ASSERT_DEBUG(EFalse, User::Panic(KSpecAssert_NifManAgtPrCCAgn, 3)); |
364 } |
359 } |
365 #else |
360 #else |
366 TRAP_IGNORE( |
361 TRAP_IGNORE( |
|
362 //iAgentScpr.ProgressL(KConnectionUninitialised); |
367 iAgentState = EDisconnected; |
363 iAgentState = EDisconnected; |
368 iAgentScpr.ConnectionDownL(); |
364 iAgentScpr.ConnectionDownL(); |
369 //iAgentScpr.ProgressL(KConnectionUninitialised); |
|
370 ); |
365 ); |
371 #endif |
366 #endif |
372 } |
367 } |
373 } |
368 } |
374 |
369 |
394 #endif |
389 #endif |
395 } |
390 } |
396 else |
391 else |
397 { |
392 { |
398 iAgentScpr.Error(iLastProgress); |
393 iAgentScpr.Error(iLastProgress); |
399 iAgentErrorState = ETrue; |
|
400 } |
394 } |
401 } |
395 } |
402 |
396 |
403 |
397 |
404 /** |
398 /** |