--- a/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplconnrequestor.cpp Mon May 03 12:54:42 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver2/src/epos_comasuplconnrequestor.cpp Fri May 14 16:17:02 2010 +0300
@@ -47,10 +47,7 @@
iCommMgr(aCommMgr),
iProtocolManager(aProtoMgr),
iPort(aPort),
- iObserver( aObserver),
- iIapDialogShown(EFalse),
- iIapDlgTimerExpired(EFalse),
- iIsTimeoutDialogTimerStarted(EFalse)
+ iObserver( aObserver)
{
}
@@ -77,7 +74,7 @@
iCurrentSLPId = KErrNotFound;
- iDialogTimer = COMASuplDialogTimer::NewL(*this);
+
}
// -----------------------------------------------------------------------------
@@ -107,13 +104,8 @@
COMASuplConnRequestor::~COMASuplConnRequestor()
{
Cancel();
- if(iDialogTimer)
- {
- iDialogTimer->Cancel();
- delete iDialogTimer;
- iDialogTimer = NULL;
- }
- delete iSuplSettings;
+
+ delete iSuplSettings;
delete iTrace;
delete iFallBackHandler;
}
@@ -146,27 +138,14 @@
buffer.Copy(_L("No access point configured for "));
buffer.Append(iHostAddress);
iTrace->Trace(buffer,KTraceFileName, __LINE__);
- if( isIapDialogShown )
- {
- TInt err = iProtocolManager.LaunchSettingsUI(this,iHostAddress);
- if(err != KErrNone)
- {
- buffer.Copy(_L("Error in launching UI : "));
- buffer.AppendNum(err);
- iTrace->Trace(buffer,KTraceFileName, __LINE__);
- iHostAddress.Zero();
- iObserver.OperationCompleteL(err);
- }
- else
- iIapDialogShown = ETrue;
- }
-
+ buffer.Copy(_L("Calling CreateConnection with no IAP"));
+ iTrace->Trace(buffer,KTraceFileName, __LINE__);
+ iConnection = iCommMgr.CreateConnectionL(iHostAddress,iTls,iPskTls,iPort,-1);
+ OpenConnection();
}
else
{
- iIsTimeoutDialogTimerStarted = EFalse;
- iDialogTimer->Cancel();
buffer.Copy(_L("Connecting to "));
buffer.Append(iHostAddress);
iTrace->Trace(buffer,KTraceFileName, __LINE__);
@@ -184,12 +163,9 @@
// -----------------------------------------------------------------------------
// COMASuplConnRequestor::OpenConnection
// -----------------------------------------------------------------------------
-//
-void COMASuplConnRequestor::CreateConnectionL(TInt aDialogTimeOutDelay, TBool aTriggerSession)
+// TODO : Remove this method
+void COMASuplConnRequestor::CreateConnectionL(TInt /*aDialogTimeOutDelay*/, TBool aTriggerSession)
{
- iIsTimeoutDialogTimerStarted = ETrue;
-
- iDialogTimer->StartTimer(aDialogTimeOutDelay);
CreateConnectionL(aTriggerSession);
}
// -----------------------------------------------------------------------------
@@ -457,57 +433,7 @@
return result;
}
-// -----------------------------------------------------------------------------
-// COMASuplConnRequestor::SettingsUICompleted
-//
-// -----------------------------------------------------------------------------
-void COMASuplConnRequestor::SettingsUICompletedL(TInt aError)
- {
- TBuf<128> buffer(_L("COMASuplConnRequestor:SettingsUICompleted Error: "));
- buffer.AppendNum(aError);
- iTrace->Trace(buffer,KTraceFileName, __LINE__);
-
- if (iIsTimeoutDialogTimerStarted)
- {
- iTrace->Trace(_L("COMASuplSession::SettingsUICompleted, stopping timer "), KTraceFileName, __LINE__);
- iIsTimeoutDialogTimerStarted = EFalse;
- iDialogTimer->StopTimer();
- }
- if (iIapDlgTimerExpired)
- {
- iIapDlgTimerExpired = EFalse;
- iIapDialogShown = EFalse;
- iProtocolManager.LaunchSuplDialogTimeoutUI(this);
- iObserver.OperationCompleteL(KErrNone);
- return;
- }
- if(aError == KErrNone)
- {
- TBuf<100> IapName;
- TInt err = iProtocolManager.GetLastUsedAccessPoint(IapName,iIAPId);
- if(err == KErrNone)
- {
- buffer.Copy(_L("Connecting to "));
- buffer.Append(iHostAddress);
- buffer.Append(_L(" using IAP "));
- buffer.Append(IapName);
- iTrace->Trace(buffer,KTraceFileName, __LINE__);
- iConnection = iCommMgr.CreateConnectionL(iHostAddress,iTls,iPskTls,iPort,iIAPId);
- SaveAccessPoint(IapName);
- OpenConnection();
- }
- else
- {
- iObserver.OperationCompleteL(err);
- }
- }
- else
- {
- iObserver.OperationCompleteL(aError);
- }
-
- }
// -----------------------------------------------------------------------------
// COMASuplConnRequestor::SaveAccessPoint
@@ -575,25 +501,13 @@
iFallBackHandler->UpdateSLPListForHomeUsage(aHomeNetwork);
}
-// -----------------------------------------------------------------------------
-// COMASuplConnRequestor::DialogTimerExpiredL
-// Checks whether UI is displayed or not previously
-//
-// -----------------------------------------------------------------------------
-void COMASuplConnRequestor::DialogTimerExpiredL()
-{
- iTrace->Trace(_L("COMASuplConnRequestor:Timer Expired for SUPL IAP Dialog"), KTraceFileName, __LINE__);
-
- if (!iIapDialogShown)
- iProtocolManager.LaunchSuplDialogTimeoutUI(this);
- else
- iIapDlgTimerExpired = ETrue;
- return;
-}
TUint COMASuplConnRequestor::GetPortNumber()
{
- return iConnection->GetPortNumberUsed();
+ if(iConnection)
+ return iConnection->GetPortNumberUsed();
+ else
+ return 0;
}