--- a/layers.sysdef.xml Thu Jul 15 19:06:58 2010 +0300
+++ b/layers.sysdef.xml Thu Aug 19 10:20:18 2010 +0300
@@ -14,6 +14,11 @@
mrp="" bldFile="&layer_real_source_path;/supl/locationomasuplprotocolhandler/asnpluginimplementation/group"
filter="dfs_build" name="lodo_locationsrv_supl_asnpluginimplementation>" />
</module>
+ <module name="locationsupllocinfoconverter">
+ <unit unitID="lodo.locationsrv.supl.locationsupllocinfoconverter"
+ mrp="" bldFile="&layer_real_source_path;/supl/locationsupllocinfoconverter/group"
+ filter="dfs_build" name="lodo_locationsrv_supl_locationsupllocinfoconverter" />
+ </module>
<module name="asnpluginimplementationver2">
<unit unitID="lodo.locationsrv.supl.asnpluginimplementationver2"
mrp="" bldFile="&layer_real_source_path;/supl/locationomasuplprotocolhandler/asnpluginimplementationver2/group"
--- a/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h Thu Jul 15 19:06:58 2010 +0300
+++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosPrivacyNotifierExtension.h Thu Aug 19 10:20:18 2010 +0300
@@ -30,7 +30,7 @@
// INCLUDES
#include <eiknotapi.h>
#include <lbs/epos_rposrequestorstack.h>
-#include <lbs/epos_tposqninputdata.h>
+#include <lbs/EPos_TPosQNInputData.h>
#include <EPos_CPosPrivacyNotifier.h>
// FORWARD DECLARATIONS
class CPosRequestHandler;
--- a/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h Thu Jul 15 19:06:58 2010 +0300
+++ b/locationsystemui/locationsysui/queryandnotification/inc/EPos_CPosRequestHandler.h Thu Aug 19 10:20:18 2010 +0300
@@ -29,7 +29,7 @@
// INCLUDES
#include <e32base.h>
-#include <lbs/epos_tposqninputdata.h>
+#include <lbs/EPos_TPosQNInputData.h>
#include <EPos_CPosPrivacyNotifier.h>
// FORWARD DECLARATIONS
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/Additionaltests/bwins/Additionaltestsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/Additionaltests/eabi/Additionaltestsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,7 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI17CLbtEventObserver @ 2 NONAME
+ _ZTI20CTriggerFireObserver @ 3 NONAME
+ _ZTV17CLbtEventObserver @ 4 NONAME
+ _ZTV20CTriggerFireObserver @ 5 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/AdvancedTriggerSupervision/bwins/AdvancedTriggerSupervisionu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/AdvancedTriggerSupervision/eabi/AdvancedTriggerSupervisionu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/CellbasedtriggerOperations/bwins/CellbasedtriggerOperationsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/CellbasedtriggerOperations/eabi/CellbasedtriggerOperationsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,7 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI17CLbtEventObserver @ 2 NONAME
+ _ZTI20CTriggerFireObserver @ 3 NONAME
+ _ZTV17CLbtEventObserver @ 4 NONAME
+ _ZTV20CTriggerFireObserver @ 5 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/ClientServerSetup/bwins/ClientServerSetupu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/ClientServerSetup/eabi/ClientServerSetupu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/CreateSessiontrigger/bwins/CreateSessiontriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/CreateSessiontrigger/eabi/CreateSessiontriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/LbtCancellationTest/testlbtcancellation/bwins/testlbtcancellationu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/LbtCancellationTest/testlbtcancellation/eabi/testlbtcancellationu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/TestHybridTriggers/bwins/TestHybridTriggersu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/TestHybridTriggers/eabi/TestHybridTriggersu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,7 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI17CLbtEventObserver @ 2 NONAME
+ _ZTI20CTriggerFireObserver @ 3 NONAME
+ _ZTV17CLbtEventObserver @ 4 NONAME
+ _ZTV20CTriggerFireObserver @ 5 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/UpdateTrigger/bwins/UpdateTriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/UpdateTrigger/eabi/UpdateTriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/createstartuptrigger/bwins/createstartuptriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/createstartuptrigger/eabi/createstartuptriggeru.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/firingofstartuptriggerandlisttrigger/bwins/t_lbtltapiu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/firingofstartuptriggerandlisttrigger/eabi/t_lbtltapiu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/lbtPlatSecTest/testlbtplatsecurity/bwins/testlbtplatsecurityu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/lbtPlatSecTest/testlbtplatsecurity/eabi/testlbtplatsecurityu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/lbtbctest/bwins/lbtbctestu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/lbtbctest/eabi/lbtbctestu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,7 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI17CLbtEventObserver @ 2 NONAME
+ _ZTI20CTriggerFireObserver @ 3 NONAME
+ _ZTV17CLbtEventObserver @ 4 NONAME
+ _ZTV20CTriggerFireObserver @ 5 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_deletetriggers/bwins/t_deletetriggersu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_deletetriggers/eabi/t_deletetriggersu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,7 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTI22CDeleteTriggerObserver @ 3 NONAME
+ _ZTV20CTriggerFireObserver @ 4 NONAME
+ _ZTV22CDeleteTriggerObserver @ 5 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_lbtltapi/bwins/t_lbtltapiu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_lbtltapi/eabi/t_lbtltapiu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,5 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI20CTriggerFireObserver @ 2 NONAME
+ _ZTV20CTriggerFireObserver @ 3 NONAME
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_mgmtsettings/bwins/t_mgmtsettingsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,3 @@
+EXPORTS
+ ?LibEntryL@@YAPAVCScriptBase@@AAVCTestModuleIf@@@Z @ 1 NONAME ; class CScriptBase * LibEntryL(class CTestModuleIf &)
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/locationtriggering/tsrc/lbtengine_test/t_mgmtsettings/eabi/t_mgmtsettingsu.def Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,9 @@
+EXPORTS
+ _Z9LibEntryLR13CTestModuleIf @ 1 NONAME
+ _ZTI12CAoOperation @ 2 NONAME
+ _ZTI17CLbtEventObserver @ 3 NONAME
+ _ZTI20CTriggerFireObserver @ 4 NONAME
+ _ZTV12CAoOperation @ 5 NONAME
+ _ZTV17CLbtEventObserver @ 6 NONAME
+ _ZTV20CTriggerFireObserver @ 7 NONAME
+
--- a/locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h Thu Jul 15 19:06:58 2010 +0300
+++ b/locsrv_plat/query_and_notification_api/inc/EPos_CPosPrivacyNotifier.h Thu Aug 19 10:20:18 2010 +0300
@@ -23,7 +23,7 @@
// INCLUDES
#include <e32base.h>
#include <lbs/epos_privacy.h>
-#include <lbs/epos_tposqninputdata.h>
+#include <lbs/EPos_TPosQNInputData.h>
// DATA TYPES
--- a/supl/group/bld.inf Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/group/bld.inf Thu Aug 19 10:20:18 2010 +0300
@@ -17,10 +17,11 @@
PRJ_PLATFORMS
-WINSCW ARMV5 GCCE
+WINSCW ARMV5
#include "../locationsuplfw/group/bld.inf"
#include "../locationomasuplprotocolhandler/group/bld.inf"
//#include "../locationomasuplpostester/group/bld.inf"
#include "../supltiapiimplementation/group/bld.inf"
+//#include "../locationsupllocinfoconverter/group/bld.inf"
// End of File
--- a/supl/locationomasuplprotocolhandler/protocolhandler/bwins/eposomasuplprotocolhandleru.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/bwins/eposomasuplprotocolhandleru.def Thu Aug 19 10:20:18 2010 +0300
@@ -15,26 +15,28 @@
??1COMASuplSettings@@UAE@XZ @ 14 NONAME ; COMASuplSettings::~COMASuplSettings(void)
?IsHslpNull@COMASuplSettings@@QAEHXZ @ 15 NONAME ; int COMASuplSettings::IsHslpNull(void)
?NotifyTriggerFiredL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTRequestStatus@@AAVTSuplTriggerFireInfo@@@Z @ 16 NONAME ; void COMASUPLProtocolManager::NotifyTriggerFiredL(class CSuplSessionBase *, class TRequestStatus &, class TSuplTriggerFireInfo &)
- ?IAPId@COMASuplSettings@@QBEHXZ @ 17 NONAME ; int COMASuplSettings::IAPId(void) const
- ?DeInitialize@COMASUPLProtocolManager@@UAEXAAVTRequestStatus@@@Z @ 18 NONAME ; void COMASUPLProtocolManager::DeInitialize(class TRequestStatus &)
- ?RunSuplTriggerSessionL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTRequestStatus@@AAVTSuplTerminalPeriodicTrigger@@ABVTDesC16@@HHH@Z @ 19 NONAME ; void COMASUPLProtocolManager::RunSuplTriggerSessionL(class CSuplSessionBase *, class TRequestStatus &, class TSuplTerminalPeriodicTrigger &, class TDesC16 const &, int, int, int)
- ?ConvertIAPNameToIdL@COMASuplSettings@@QAEHABVTDesC16@@AAK@Z @ 20 NONAME ; int COMASuplSettings::ConvertIAPNameToIdL(class TDesC16 const &, unsigned long &)
- ?CreateNewSessionL@COMASUPLProtocolManager@@UAEPAVCSuplSessionBase@@W4TSuplReqType@CSUPLProtocolManagerBase@@HW4TSuplServiceType@RSuplTerminalSubSession@@@Z @ 21 NONAME ; class CSuplSessionBase * COMASUPLProtocolManager::CreateNewSessionL(enum CSUPLProtocolManagerBase::TSuplReqType, int, enum RSuplTerminalSubSession::TSuplServiceType)
- ?SetIAPId@COMASuplSettings@@QAEXH@Z @ 22 NONAME ; void COMASuplSettings::SetIAPId(int)
- ?ReadOMASuplSettingsL@COMASuplCommonConfig@@QAEXXZ @ 23 NONAME ; void COMASuplCommonConfig::ReadOMASuplSettingsL(void)
- ?CancelRunSession@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@@Z @ 24 NONAME ; void COMASUPLProtocolManager::CancelRunSession(class CSuplSessionBase *)
- ?SetSUPLUsage@COMASuplSettings@@QAEXAAW4TSuplSettingsUsage@CSuplSettings@@@Z @ 25 NONAME ; void COMASuplSettings::SetSUPLUsage(enum CSuplSettings::TSuplSettingsUsage &)
- ??1COMASUPLProtocolManager@@UAE@XZ @ 26 NONAME ; COMASUPLProtocolManager::~COMASUPLProtocolManager(void)
- ?HandleSuplMessageL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTRequestStatus@@PAVHBufC8@@@Z @ 27 NONAME ; void COMASUPLProtocolManager::HandleSuplMessageL(class CSuplSessionBase *, class TRequestStatus &, class HBufC8 *)
- ?GetSUPLMessageVersionL@COMASUPLProtocolManager@@UAEHAAHABVTDesC8@@@Z @ 28 NONAME ; int COMASUPLProtocolManager::GetSUPLMessageVersionL(int &, class TDesC8 const &)
- ?ConstructL@COMASuplSettings@@AAEXXZ @ 29 NONAME ; void COMASuplSettings::ConstructL(void)
- ?NewL@COMASUPLProtocolManager@@SAPAV1@XZ @ 30 NONAME ; class COMASUPLProtocolManager * COMASUPLProtocolManager::NewL(void)
- ?HandlePacket@COMASUPLProtocolManager@@UAEXABVTDesC8@@I@Z @ 31 NONAME ; void COMASUPLProtocolManager::HandlePacket(class TDesC8 const &, unsigned int)
- ?CancelSuplTriggerSession@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@@Z @ 32 NONAME ; void COMASUPLProtocolManager::CancelSuplTriggerSession(class CSuplSessionBase *)
- ?InitializeL@COMASUPLProtocolManager@@UAEXPAVCSuplCommunicationManager@@AAVTRequestStatus@@@Z @ 33 NONAME ; void COMASUPLProtocolManager::InitializeL(class CSuplCommunicationManager *, class TRequestStatus &)
- ?SUPLUsage@COMASuplSettings@@QBE?AW4TSuplSettingsUsage@CSuplSettings@@XZ @ 34 NONAME ; enum CSuplSettings::TSuplSettingsUsage COMASuplSettings::SUPLUsage(void) const
- ?NewL@COMASuplCommonConfig@@SAPAV1@XZ @ 35 NONAME ; class COMASuplCommonConfig * COMASuplCommonConfig::NewL(void)
- ?SLPAddress@COMASuplSettings@@QBEABVTDesC8@@XZ @ 36 NONAME ; class TDesC8 const & COMASuplSettings::SLPAddress(void) const
- ?HandlePacketError@COMASUPLProtocolManager@@UAEXH@Z @ 37 NONAME ; void COMASUPLProtocolManager::HandlePacketError(int)
- ?NewL@COMASuplSettings@@SAPAV1@XZ @ 38 NONAME ; class COMASuplSettings * COMASuplSettings::NewL(void)
+ ?MakeLocationConversionRequestL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTGeoCellInfo@@AAVTRequestStatus@@@Z @ 17 NONAME ; void COMASUPLProtocolManager::MakeLocationConversionRequestL(class CSuplSessionBase *, class TGeoCellInfo &, class TRequestStatus &)
+ ?IAPId@COMASuplSettings@@QBEHXZ @ 18 NONAME ; int COMASuplSettings::IAPId(void) const
+ ?CancelLocationConversionRequest@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@@Z @ 19 NONAME ; void COMASUPLProtocolManager::CancelLocationConversionRequest(class CSuplSessionBase *)
+ ?DeInitialize@COMASUPLProtocolManager@@UAEXAAVTRequestStatus@@@Z @ 20 NONAME ; void COMASUPLProtocolManager::DeInitialize(class TRequestStatus &)
+ ?RunSuplTriggerSessionL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTRequestStatus@@AAVTSuplTerminalPeriodicTrigger@@ABVTDesC16@@HHH@Z @ 21 NONAME ; void COMASUPLProtocolManager::RunSuplTriggerSessionL(class CSuplSessionBase *, class TRequestStatus &, class TSuplTerminalPeriodicTrigger &, class TDesC16 const &, int, int, int)
+ ?ConvertIAPNameToIdL@COMASuplSettings@@QAEHABVTDesC16@@AAK@Z @ 22 NONAME ; int COMASuplSettings::ConvertIAPNameToIdL(class TDesC16 const &, unsigned long &)
+ ?CreateNewSessionL@COMASUPLProtocolManager@@UAEPAVCSuplSessionBase@@W4TSuplReqType@CSUPLProtocolManagerBase@@HW4TSuplServiceType@RSuplTerminalSubSession@@@Z @ 23 NONAME ; class CSuplSessionBase * COMASUPLProtocolManager::CreateNewSessionL(enum CSUPLProtocolManagerBase::TSuplReqType, int, enum RSuplTerminalSubSession::TSuplServiceType)
+ ?SetIAPId@COMASuplSettings@@QAEXH@Z @ 24 NONAME ; void COMASuplSettings::SetIAPId(int)
+ ?ReadOMASuplSettingsL@COMASuplCommonConfig@@QAEXXZ @ 25 NONAME ; void COMASuplCommonConfig::ReadOMASuplSettingsL(void)
+ ?CancelRunSession@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@@Z @ 26 NONAME ; void COMASUPLProtocolManager::CancelRunSession(class CSuplSessionBase *)
+ ?SetSUPLUsage@COMASuplSettings@@QAEXAAW4TSuplSettingsUsage@CSuplSettings@@@Z @ 27 NONAME ; void COMASuplSettings::SetSUPLUsage(enum CSuplSettings::TSuplSettingsUsage &)
+ ??1COMASUPLProtocolManager@@UAE@XZ @ 28 NONAME ; COMASUPLProtocolManager::~COMASUPLProtocolManager(void)
+ ?HandleSuplMessageL@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@AAVTRequestStatus@@PAVHBufC8@@@Z @ 29 NONAME ; void COMASUPLProtocolManager::HandleSuplMessageL(class CSuplSessionBase *, class TRequestStatus &, class HBufC8 *)
+ ?GetSUPLMessageVersionL@COMASUPLProtocolManager@@UAEHAAHABVTDesC8@@@Z @ 30 NONAME ; int COMASUPLProtocolManager::GetSUPLMessageVersionL(int &, class TDesC8 const &)
+ ?ConstructL@COMASuplSettings@@AAEXXZ @ 31 NONAME ; void COMASuplSettings::ConstructL(void)
+ ?NewL@COMASUPLProtocolManager@@SAPAV1@XZ @ 32 NONAME ; class COMASUPLProtocolManager * COMASUPLProtocolManager::NewL(void)
+ ?HandlePacket@COMASUPLProtocolManager@@UAEXABVTDesC8@@I@Z @ 33 NONAME ; void COMASUPLProtocolManager::HandlePacket(class TDesC8 const &, unsigned int)
+ ?CancelSuplTriggerSession@COMASUPLProtocolManager@@UAEXPAVCSuplSessionBase@@@Z @ 34 NONAME ; void COMASUPLProtocolManager::CancelSuplTriggerSession(class CSuplSessionBase *)
+ ?InitializeL@COMASUPLProtocolManager@@UAEXPAVCSuplCommunicationManager@@AAVTRequestStatus@@@Z @ 35 NONAME ; void COMASUPLProtocolManager::InitializeL(class CSuplCommunicationManager *, class TRequestStatus &)
+ ?SUPLUsage@COMASuplSettings@@QBE?AW4TSuplSettingsUsage@CSuplSettings@@XZ @ 36 NONAME ; enum CSuplSettings::TSuplSettingsUsage COMASuplSettings::SUPLUsage(void) const
+ ?NewL@COMASuplCommonConfig@@SAPAV1@XZ @ 37 NONAME ; class COMASuplCommonConfig * COMASuplCommonConfig::NewL(void)
+ ?SLPAddress@COMASuplSettings@@QBEABVTDesC8@@XZ @ 38 NONAME ; class TDesC8 const & COMASuplSettings::SLPAddress(void) const
+ ?HandlePacketError@COMASUPLProtocolManager@@UAEXH@Z @ 39 NONAME ; void COMASUPLProtocolManager::HandlePacketError(int)
+ ?NewL@COMASuplSettings@@SAPAV1@XZ @ 40 NONAME ; class COMASuplSettings * COMASuplSettings::NewL(void)
--- a/supl/locationomasuplprotocolhandler/protocolhandler/eabi/eposomasuplprotocolhandleru.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/eabi/eposomasuplprotocolhandleru.def Thu Aug 19 10:20:18 2010 +0300
@@ -26,29 +26,31 @@
_ZN23COMASUPLProtocolManager22GetSUPLMessageVersionLERiRK6TDesC8 @ 25 NONAME
_ZN23COMASUPLProtocolManager22RunSuplTriggerSessionLEP16CSuplSessionBaseR14TRequestStatusR28TSuplTerminalPeriodicTriggerRK7TDesC16iii @ 26 NONAME
_ZN23COMASUPLProtocolManager24CancelSuplTriggerSessionEP16CSuplSessionBase @ 27 NONAME
- _ZN23COMASUPLProtocolManager4NewLEv @ 28 NONAME
- _ZN23COMASUPLProtocolManagerC1Ev @ 29 NONAME
- _ZN23COMASUPLProtocolManagerC2Ev @ 30 NONAME
- _ZN23COMASUPLProtocolManagerD0Ev @ 31 NONAME
- _ZN23COMASUPLProtocolManagerD1Ev @ 32 NONAME
- _ZN23COMASUPLProtocolManagerD2Ev @ 33 NONAME
- _ZNK16COMASuplSettings10IsUIActiveEv @ 34 NONAME
- _ZNK16COMASuplSettings10SLPAddressEv @ 35 NONAME
- _ZNK16COMASuplSettings18SLPAddressfromImsiEv @ 36 NONAME
- _ZNK16COMASuplSettings5IAPIdEv @ 37 NONAME
- _ZNK16COMASuplSettings9SUPLUsageEv @ 38 NONAME
- _ZTI13COMASuplTrace @ 39 NONAME
- _ZTI16COMASuplSettings @ 40 NONAME
- _ZTI20COMASuplCommonConfig @ 41 NONAME
- _ZTI20COMASuplDeInitilizer @ 42 NONAME
- _ZTI23COMASUPLProtocolManager @ 43 NONAME
- _ZTI26COMASuplInitilizeRequestor @ 44 NONAME
- _ZTV13COMASuplTrace @ 45 NONAME
- _ZTV16COMASuplSettings @ 46 NONAME
- _ZTV20COMASuplCommonConfig @ 47 NONAME
- _ZTV20COMASuplDeInitilizer @ 48 NONAME
- _ZTV23COMASUPLProtocolManager @ 49 NONAME
- _ZTV26COMASuplInitilizeRequestor @ 50 NONAME
- _ZThn4_N23COMASUPLProtocolManager12HandlePacketERK6TDesC8j @ 51 NONAME
- _ZThn4_N23COMASUPLProtocolManager17HandlePacketErrorEi @ 52 NONAME
+ _ZN23COMASUPLProtocolManager30MakeLocationConversionRequestLEP16CSuplSessionBaseR12TGeoCellInfoR14TRequestStatus @ 28 NONAME
+ _ZN23COMASUPLProtocolManager31CancelLocationConversionRequestEP16CSuplSessionBase @ 29 NONAME
+ _ZN23COMASUPLProtocolManager4NewLEv @ 30 NONAME
+ _ZN23COMASUPLProtocolManagerC1Ev @ 31 NONAME
+ _ZN23COMASUPLProtocolManagerC2Ev @ 32 NONAME
+ _ZN23COMASUPLProtocolManagerD0Ev @ 33 NONAME
+ _ZN23COMASUPLProtocolManagerD1Ev @ 34 NONAME
+ _ZN23COMASUPLProtocolManagerD2Ev @ 35 NONAME
+ _ZNK16COMASuplSettings10IsUIActiveEv @ 36 NONAME
+ _ZNK16COMASuplSettings10SLPAddressEv @ 37 NONAME
+ _ZNK16COMASuplSettings18SLPAddressfromImsiEv @ 38 NONAME
+ _ZNK16COMASuplSettings5IAPIdEv @ 39 NONAME
+ _ZNK16COMASuplSettings9SUPLUsageEv @ 40 NONAME
+ _ZTI13COMASuplTrace @ 41 NONAME
+ _ZTI16COMASuplSettings @ 42 NONAME
+ _ZTI20COMASuplCommonConfig @ 43 NONAME
+ _ZTI20COMASuplDeInitilizer @ 44 NONAME
+ _ZTI23COMASUPLProtocolManager @ 45 NONAME
+ _ZTI26COMASuplInitilizeRequestor @ 46 NONAME
+ _ZTV13COMASuplTrace @ 47 NONAME
+ _ZTV16COMASuplSettings @ 48 NONAME
+ _ZTV20COMASuplCommonConfig @ 49 NONAME
+ _ZTV20COMASuplDeInitilizer @ 50 NONAME
+ _ZTV23COMASUPLProtocolManager @ 51 NONAME
+ _ZTV26COMASuplInitilizeRequestor @ 52 NONAME
+ _ZThn4_N23COMASUPLProtocolManager12HandlePacketERK6TDesC8j @ 53 NONAME
+ _ZThn4_N23COMASUPLProtocolManager17HandlePacketErrorEi @ 54 NONAME
--- a/supl/locationomasuplprotocolhandler/protocolhandler/inc/epos_comasuplprotocolmanager.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/inc/epos_comasuplprotocolmanager.h Thu Aug 19 10:20:18 2010 +0300
@@ -254,6 +254,32 @@
*/
IMPORT_C virtual TInt GetSUPLMessageVersionL(TInt& aMajorVersion, const TDesC8& aReceivedMessage);
+ /**
+ * Function: CancelLocationConversionRequest
+ * @since S60 v5.2
+ * @Description: Cancels the location conversion request
+ * @Param: aSuplSession, session object
+ * @Returns: None
+ *
+ */
+
+ IMPORT_C void CancelLocationConversionRequest(CSuplSessionBase* aSuplSession);
+
+ /**
+ * Function: MakeLocationConversionRequestL
+ * @since S60 v5.2
+ * @Description: issues the location conversion request
+ * @Param: aSuplSession, session object
+ * @Param: aCellInfo, cell information
+ * @Param: aStatus, request status
+ * @Returns: None
+ *
+ */
+
+ IMPORT_C void MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus );
+
protected: // Construction
/**
* COMASUPLProtocolManager,Perform the first phase of two phase construction
--- a/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandler/src/epos_comasuplprotocolmanager.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -577,7 +577,7 @@
else
{
iTrace->Trace(_L("COMASUPLProtocolManager::DeInitialize ph1 not present"), KTraceFileName, __LINE__);
- DeInitilizationCompletedL( KErrNotFound ); //ph1 is not present.
+ TRAP_IGNORE(DeInitilizationCompletedL( KErrNotFound )); //ph1 is not present.
}
}
@@ -804,6 +804,39 @@
return GetSuplVersion(aMajorVersion,aReceivedMessage);
}
+// -----------------------------------------------------------------------------
+// COMASUPLProtocolManager::MakeLocationConversionRequestL
+//
+//
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C void COMASUPLProtocolManager::MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,TGeoCellInfo& aCellInfo,TRequestStatus& aStatus )
+ {
+ iTrace->Trace(_L("COMASUPLProtocolManager::MakeLocationConversionRequestL"), KTraceFileName, __LINE__);
+ if(iOMASuplProtocolHandler1)
+ {
+ iTrace->Trace(_L("COMASUPLProtocolManager::MakeLocationConversionRequestL if condition true"), KTraceFileName, __LINE__);
+ COMASUPLProtocolManager* ph1= (COMASUPLProtocolManager*) (iOMASuplProtocolHandler1);
+ ph1->MakeLocationConversionRequestL(aSuplSessn,aCellInfo,aStatus);
+ };
+ }
+
+// -----------------------------------------------------------------------------
+// COMASUPLProtocolManager::CancelLocationConversionRequest
+//
+//
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C void COMASUPLProtocolManager::CancelLocationConversionRequest(CSuplSessionBase* aSuplSession)
+ {
+ if(iOMASuplProtocolHandler1)
+ {
+ COMASUPLProtocolManager* ph1= (COMASUPLProtocolManager*) (iOMASuplProtocolHandler1);
+ ph1->CancelLocationConversionRequest(aSuplSession);
+ };
+ }
// -----------------------------------------------------------------------------
// COMASUPLProtocolManager::DeInitilizationCompletedL
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/group/omasuplprotocolhandler1.mmp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/group/omasuplprotocolhandler1.mmp Thu Aug 19 10:20:18 2010 +0300
@@ -98,7 +98,7 @@
LIBRARY epos_suplsettings.lib
LIBRARY epos_suplterminitiation.lib
LIBRARY eposomasuplprotocolhandler.lib
-LIBRARY featmgr.lib
+LIBRARY featmgr.lib
#if USE_E_CELL_ID_STUB_FILES
LIBRARY estor.lib
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplconnrequestor.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplconnrequestor.h Thu Aug 19 10:20:18 2010 +0300
@@ -33,6 +33,7 @@
class COMASuplFallBackHandler;
class COMASUPLProtocolManager1;
class COMASuplDialogTimer;
+class CRepository;
/**
* Class for doing asynchronous service i.e. used for Sending Packet to Socket.
*
@@ -94,6 +95,18 @@
*/
void CreateConnectionL(TInt aDialogTimeOutDelay);
+
+ /**
+ * CreateConnection Method Overload. Creates the Socket required to
+ * communicate with the SLP. Called in case of NI case.
+ * @since
+ * @param aPrompt used to show connection dialog using OCC Api's.
+ * @param aWlanOnly used to connect server using wlan only.
+ * @return None
+ * Added CreateConnectionL with aPrompt and aWLANOnly for OCC.
+ */
+ void CreateConnectionL(TBool aPrompt,TBool aWlanOnly);
+
/**
* SendPacket Method.
* @since Series 60 3.1
@@ -271,17 +284,19 @@
//For trying for once with newly generated HSLP.
TBool iTLSAuthenticationFailed;
- //SUPLSettings
+ //SUPLSettings,Ownership is with the object
CSuplSettingsInternal *iSuplSettings;
+ CRepository* iRepository;//Ownership is with the object
+
//Trace Utility
- COMASuplTrace* iTrace;
+ COMASuplTrace* iTrace; //Ownership is with the object
TBool iIsHSLPGenerated;
TBool iHslpAddrFromImsiUsed;
TInt iLastConnectionError;
- COMASuplFallBackHandler* iFallBackHandler;
+ COMASuplFallBackHandler* iFallBackHandler;//Ownership is with the object
TBool iIsSettingInitilized;
@@ -294,6 +309,12 @@
TBool iIapDlgTimerExpired;
TBool iIsTimeoutDialogTimerStarted;
+
+ TBool iPrompt;
+
+ TBool iWlanOnly;
+
+ TBool iIsStaleLocIdPresent;
};
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplprotocolmanager1.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplprotocolmanager1.h Thu Aug 19 10:20:18 2010 +0300
@@ -512,6 +512,28 @@
public: // COMASUPLProtocolManager
void SetCommonConfig(COMASuplCommonConfig*& aCommmonConfig);
+public:
+ /*
+ * Method used to make conversion request for retrieving position of a location id.
+ *
+ * @since S60 v5.2
+ * @param aSuplSessn session object on which processing will start,ownership is not transferred
+ * @param aCellInfo contains cell id information and cell id type
+ * @param aStatus On return, the status of the request
+ *
+ */
+ void MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus );
+ /*
+ * Method used to make cancel a conversion request for retrieving position of a location id,,ownership is not transferred.
+ *
+ * @since S60 v5.2
+ * @param aSuplSessn session object which is to be cancelled
+ *
+ */
+ void CancelLocationConversionRequest(CSuplSessionBase* aSuplSession);
+
private: // Data Members
//Holds all session objects created by CreateNewSession
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplsession.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplsession.h Thu Aug 19 10:20:18 2010 +0300
@@ -255,10 +255,14 @@
* @param aAllowedCapabilities, Capabilities of SET
* @param aSessionIdSeed, seed value of session
* @param aRequestID, Request Identification number.
+ * @param aIsStaleCellId, indicates if this session is for a stale cell id conversion
+ * @param aLocationId , contains cell id parameters for which position is to be retrieved
+ * @param aPrompt indicates if the user is to be prompted when making location requests
+ * @param aWlanOnly ,request to connect server using wlan connection only using OCC Api's
* @return None
*/
virtual void RunSuplSessionL(TRequestStatus& aStatus, TBool aFirstReq, const TDesC& aHslpAddress, TBool aFallBack, TInt aAllowedCapabilities,
- TInt aSessionIdSeed, TInt aRequestID = 0);
+ TInt aSessionIdSeed, TInt aRequestID = 0,TBool aIsStaleCellId = EFalse,COMASuplLocationId* aLocationId = NULL,TBool aPrompt = EFalse,TBool aWlanOnly = EFalse);
/**
* RunSessionL, Starts the SUPL Sesssion for Terminal Initiated Location Request
@@ -939,6 +943,7 @@
void StartUsageDialogLaunchL();
TBool IsEtelNotifySet();
TBool IsEtelRoamingSet();
+ TBool HasMeLaunchedUsageDialog();
TUint GetPortNumUsed();
private:
@@ -1135,9 +1140,20 @@
COMASuplAsnHandlerBase* iOMASuplAsnHandlerBaseImpl;
+ // Network privacy handle.Ownership is with this object
CPosNetworkPrivacy* iNetworkPrivacy;
+ //Stale cell id which for which position is to be retrieved.Ownership is with this object
+ COMASuplLocationId* iStaleLocationId;
+ //indicates if this session is for a stale cell id conversion
+ TBool iIsStaleLocIdPresent;
+ //indicates if the user needs to be prompted when making a location request
+ TBool iStaleLocIdPrompt;
+ TBool iIhaveLaunchedUsagedialog;
TUint iPortNum;
+
+ //To indicate WLAN connection for OCC
+ TBool iWlanOnly;
};
#endif // C_COMASUPLSESSION_H
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplstartstate.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/inc/epos_comasuplstartstate.h Thu Aug 19 10:20:18 2010 +0300
@@ -108,6 +108,17 @@
* @return None
*/
void SetQop(TSuplTerminalQop& aQop);
+
+ /*
+ * SetStaleCellIdToUse Method is used to set the Stale Cell id to use in case of
+ * retrieving position for an already retrieved cell id.
+ * For example : in case of Geo Tagged Images
+ * @since S60 v5.2
+ * @param aLocationId This is the locatiod id parameter containing the stale cell id
+ * @return None
+ */
+
+ void SetStaleCellIdToUse(COMASuplLocationId* aLocationId);
public: //MOMASuplETelObserver
@@ -284,6 +295,9 @@
TOMASuplECellInfo iMmCellInfo;
COMASuplAsnHandlerBase* iOMASuplAsnHandlerBase;
+
+ //Indicates whether we need to create start message with Stale Cell Id
+ TBool iIsStaleCellId;
};
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplconnrequestor.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplconnrequestor.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -16,6 +16,7 @@
*/
+#include <centralrepository.h>
#include "epos_comasuplprotocolmanager1.h"
#include "epos_csuplcommunicationmanager.h"
@@ -26,6 +27,8 @@
#include "epos_momasuplconnobserver.h"
#include "epos_comasupltrace.h"
#include "epos_comasuplfallbackhandler.h"
+#include "epos_csuplsettingsinternalcrkeys.h"
+
#include "epos_comasupldialogtimer.h"
_LIT(KTraceFileName,"SUPL_OMA_SESSION::epos_comasuplconnrequestor.cpp");
@@ -50,7 +53,7 @@
iObserver( aObserver),
iIapDialogShown(EFalse),
iIapDlgTimerExpired(EFalse),
- iIsTimeoutDialogTimerStarted(EFalse)
+ iIsTimeoutDialogTimerStarted(EFalse),iPrompt(EFalse),iWlanOnly(EFalse),iIsStaleLocIdPresent(EFalse)
{
}
@@ -72,7 +75,7 @@
iHslpAddrFromImsiUsed = EFalse;
iFallBackHandler = COMASuplFallBackHandler::NewL(*iSuplSettings);
-
+ iRepository = CRepository::NewL(KCRUidSuplSettings);
iLastConnectionError = KErrNone;
iCurrentSLPId = KErrNotFound;
@@ -116,6 +119,8 @@
delete iSuplSettings;
delete iTrace;
delete iFallBackHandler;
+ delete iRepository;
+ iRepository = NULL;
}
// -----------------------------------------------------------------------------
@@ -181,6 +186,39 @@
}
}
+ // -----------------------------------------------------------------------------
+// COMASuplConnRequestor::CreateConnection for OCC
+// -----------------------------------------------------------------------------
+//
+void COMASuplConnRequestor::CreateConnectionL(TBool aPrompt,TBool aWlanOnly)
+ {
+ TBuf<30> GeoTagServerName;
+ TBuf<128> buffer;
+ iState = EConnecting;
+
+ iPrompt = aPrompt;
+ iWlanOnly = aWlanOnly;
+ iIsStaleLocIdPresent = ETrue;
+ iIsTimeoutDialogTimerStarted = EFalse;
+ iDialogTimer->Cancel();
+
+ TInt err;
+ err = iRepository->Get(KSuplGeoInfoConvServerName, GeoTagServerName);
+ User::LeaveIfError(err);
+ buffer.Copy(_L("Connecting to"));
+ buffer.Append(GeoTagServerName);
+ iTrace->Trace(buffer,KTraceFileName, __LINE__);
+ iTls = ETrue;
+ iPskTls = EFalse;
+ iIAPId = 0;
+
+
+ iConnection = iCommMgr.CreateConnectionL(GeoTagServerName,iTls,iPskTls,iPort,iIAPId);
+
+ OpenConnection();
+
+ }
+
// -----------------------------------------------------------------------------
// COMASuplConnRequestor::OpenConnection
// -----------------------------------------------------------------------------
@@ -230,11 +268,21 @@
if(iIsSettingInitilized)
{
- if(iConnection)
+
+ if(iConnection)
{
iState = EConnecting;
- iConnection->Connect(iStatus);
- SetActive();
+ if(iIsStaleLocIdPresent)
+ {
+ iTrace->Trace(_L("OpenConnection OCC"),KTraceFileName, __LINE__);
+ iConnection->Connect(iStatus,iPrompt,iWlanOnly);
+ }
+ else
+ {
+ iConnection->Connect(iStatus);
+ }
+ SetActive();
+
}
}
else
@@ -303,7 +351,17 @@
{
iHostAddress.Zero();
CloseConnection();
- CreateConnectionL();
+ if(iIsStaleLocIdPresent)
+ {
+ iTrace->Trace(_L("Request completed with error..."), KTraceFileName, __LINE__);
+ iObserver.OperationCompleteL(iLastConnectionError);
+ }
+ else
+ {
+ iTrace->Trace(_L("Setting API Initilizing Completed..."), KTraceFileName, __LINE__);
+ CreateConnectionL();
+ }
+
}
else
{
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplendstate.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplendstate.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -259,10 +259,15 @@
{
return ETrue;
}
-
+
if(iEncodedSuplInit && (iEncodedSuplInit->Length()) > 0 &&
iHSLPAddress && iHSLPAddress->Length() > 0)
{
+ TBuf<64> serverCheck;
+ serverCheck.Copy(*iHSLPAddress);
+ iTrace->Trace(_L("Server Address for VER : "), KTraceFileName, __LINE__);
+ iTrace->Trace(serverCheck, KTraceFileName, __LINE__);
+
TInt blockSize = 64;
TChar ipad = 0x36;
TChar opad = 0x5c;
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplposinitstate.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplposinitstate.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -242,7 +242,10 @@
iVerPresent = ComputeSuplInitVerL();
if(iVerPresent)
{
- iLocationIDRequestor->GetLocationID();
+ if(!iIsStaleCellId) // if this request is for a stale cell id conversion then do not retrieve current location id
+ iLocationIDRequestor->GetLocationID();
+ else
+ iMsgStateObserver->OperationCompleteL(KErrNone);
}
else
{
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplprotocolmanager1.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -46,6 +46,9 @@
#include "epos_comasupltimeouttimer.h"
#include "epos_omasuplconstants.h"
#include "epos_comasuplcommonconfig.h"
+#include "epos_suplgeocellinfo.h"
+
+#include "epos_comasupllocationid.h"
_LIT(KTraceFileName,"SUPL_OMA_PH::EPos_COMASUPLProtocolManager1.cpp");
@@ -528,6 +531,11 @@
iTrace->Trace(_L("COMASUPLProtocolManager1::DestroySession Destroy Session"), KTraceFileName, __LINE__);
COMASuplSession* OMASession = static_cast<COMASuplSession*>(aSuplSession);
+ if (OMASession->HasMeLaunchedUsageDialog())
+ {
+ iTrace->Trace(_L("Setting NULL."), KTraceFileName, __LINE__);
+ iSessnUIObserver = NULL;
+ }
if (OMASession->GetSessionUIFlag())
{
OMASession->DestroySession();
@@ -1038,6 +1046,14 @@
iTrace->Trace(_L("Cannot found Supl session."), KTraceFileName, __LINE__);
return;
}
+
+ COMASuplSession* OMASession = static_cast<COMASuplSession*>(aSuplSession);
+ if (OMASession->HasMeLaunchedUsageDialog())
+ {
+ iTrace->Trace(_L("Setting NULL."), KTraceFileName, __LINE__);
+ iSessnUIObserver = NULL;
+ }
+
aSuplSession->CancelRunSession();
return ;
}
@@ -2072,8 +2088,103 @@
iSuplInitTimeOut = aCommmonConfig->iSuplInitTimeOut;
iPersistFailTimer = aCommmonConfig->iPersistFailTimer;
}
+
+
+// -----------------------------------------------------------------------------
+// COMASUPLProtocolManager1::MakeLocationConversionRequestL
+//
+// To make conversion request to retrieve position for a given cell id
+// -----------------------------------------------------------------------------
+//
+void COMASUPLProtocolManager1::MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus )
+ {
+ iTrace->Trace(_L("COMASUPLProtocolManager1::MakeLocationConversionRequestL"), KTraceFileName, __LINE__);
+ TBuf<64> tempBuf;
+
+ if ( iSuplSessions.Find(aSuplSessn) == KErrNotFound )
+ {
+ TRequestStatus *status = &aStatus;
+ User::RequestComplete(status,KErrNotFound );
+ return;
+ }
+
+ CheckForSessionCount();
+ iRunningSessionCount++;
+
+ COMASuplLocationId* locationId = COMASuplLocationId::NewL();
+ COMASuplLocationId::TOMASuplStatus status = COMASuplLocationId::EStale;
+ switch(aCellInfo.iGeoCellType)
+ {
+ case EGeoGsmCell:
+ {
+ iTrace->Trace(_L("COMASUPLProtocolManager1::MakeLocationConversionRequestL - Setting GSM Cell Info"), KTraceFileName, __LINE__);
+ COMASuplGSMCellInfo* cellInfo = COMASuplGSMCellInfo::NewL();
+ cellInfo->SetSuplGSMCellInfo(aCellInfo.iMNC,aCellInfo.iMCC,aCellInfo.iCid,aCellInfo.iLac);
+ locationId->SetSuplLocationId(cellInfo,status);
+ }
+ break;
+ case EGeoWcdmaCell:
+ {
+ iTrace->Trace(_L("COMASUPLProtocolManager1::MakeLocationConversionRequestL - Setting WCDMA Cell Info"), KTraceFileName, __LINE__);
+ COMASuplCellInfo* cellInfo = COMASuplCellInfo::NewL();
+ cellInfo->SetSuplCellInfo(aCellInfo.iMNC,aCellInfo.iMCC,aCellInfo.iCid);
+ locationId->SetSuplLocationId(cellInfo,status);
+ }
+ break;
+ }
+
+ tempBuf.Copy(_L("MCC = "));
+ tempBuf.AppendNum(aCellInfo.iMCC);
+ iTrace->Trace(tempBuf, KTraceFileName, __LINE__);
+ tempBuf.Copy(_L("MNC = "));
+ tempBuf.AppendNum(aCellInfo.iMNC);
+ iTrace->Trace(tempBuf, KTraceFileName, __LINE__);
+ tempBuf.Copy(_L("LAC = "));
+ tempBuf.AppendNum(aCellInfo.iLac);
+ iTrace->Trace(tempBuf, KTraceFileName, __LINE__);
+ tempBuf.Copy(_L("CId = "));
+ tempBuf.AppendNum(aCellInfo.iCid);
+ iTrace->Trace(tempBuf, KTraceFileName, __LINE__);
+ tempBuf.Copy(_L("Prompt = "));
+ tempBuf.AppendNum(aCellInfo.iConnectionPrompt);
+ iTrace->Trace(tempBuf, KTraceFileName, __LINE__);
+
+ TInt allowedCapabilities = KECID|KCID;
+ TInt requestID = 1000;
+ COMASuplSession* OMASession = static_cast<COMASuplSession*>(aSuplSessn);
+ OMASession->SetConfigurationParameters(iUT1_StartTimer,iUT2_PosInitTimer, iUT3_PosTimer,iPrivacyTimer,iSETMode,
+ iSuplUsage, iPersistFailTimer,iSuplInitTimeOut);
+ OMASession->RunSuplSessionL(aStatus,ETrue, KNullDesC,EFalse, allowedCapabilities,iRunningSessionCount,requestID,ETrue,locationId,aCellInfo.iConnectionPrompt,aCellInfo.iWlanOnly);
+
+ }
+
+// -----------------------------------------------------------------------------
+// COMASUPLProtocolManager1::CancelLocationConversionRequest
+//
+// Cancel an ongoing conversion request
+// -----------------------------------------------------------------------------
+//
+void COMASUPLProtocolManager1::CancelLocationConversionRequest(CSuplSessionBase* aSuplSession)
+ {
+ // Log
+ iTrace->Trace(_L("COMASUPLProtocolManager1::CancelLocationConversionRequest"), KTraceFileName, __LINE__);
+
+ // Check if the Session is valid
+ TInt index = iSuplSessions.Find(aSuplSession);
+
+ if(KErrNotFound == index)
+ {
+ iTrace->Trace(_L("Cannot find Supl session."), KTraceFileName, __LINE__);
+ return;
+ }
+ aSuplSession->CancelRunSession();
+ return ;
+ }
+
- // -----------------------------------------------------------------------------
+// -----------------------------------------------------------------------------
// COMASUPLProtocolManager1::CancelUiLaunch
//
//
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplsession.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -128,7 +128,7 @@
iEtelRoamingCheck(EFalse),
iIapDialogShown(EFalse),
iIapDlgTimerExpired(EFalse),
- iOMASuplAsnHandlerBaseImpl(aOMASuplAsnHandlerBase)
+ iOMASuplAsnHandlerBaseImpl(aOMASuplAsnHandlerBase),iWlanOnly(EFalse)
{
}
@@ -316,6 +316,12 @@
delete iDialogTimer;
delete iNetworkPrivacy;
+
+ if(iStaleLocationId)
+ {
+ delete iStaleLocationId;
+ iStaleLocationId = NULL;
+ }
if(iTrace)
iTrace->Trace(_L("End of ~COMASuplSession::COMASuplSession"), KTraceFileName, __LINE__);
@@ -424,7 +430,7 @@
//
void COMASuplSession::RunSuplSessionL(TRequestStatus& aStatus, TBool aFirstReq, const TDesC& aHslpAddress,
TBool aFallBack, TInt aAllowedCapabilities,
- TInt aSessionIdSeed,TInt aRequestID)
+ TInt aSessionIdSeed,TInt aRequestID,TBool aIsStaleCellId,COMASuplLocationId* aLocationId,TBool aPrompt,TBool aWlanOnly)
{
iRunRequestStatus = & aStatus;
*iRunRequestStatus = KRequestPending;
@@ -432,7 +438,32 @@
iRequestID = aRequestID;
iTrace->Trace(_L("Start COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
-
+
+ if(aIsStaleCellId)
+ {
+ iTrace->Trace(_L("Start COMASuplSession::RunSuplSession for Stale Cell Id"), KTraceFileName, __LINE__);
+ iIsStaleLocIdPresent = ETrue;
+
+
+ if(iStaleLocationId)
+ {
+ delete iStaleLocationId;
+ iStaleLocationId = NULL;
+ }
+
+ iStaleLocationId = aLocationId;
+ iStaleLocIdPrompt = aPrompt;
+ iWlanOnly = aWlanOnly; //OCC
+
+ iTrace->Trace(_L("Deleting pos requestor as session is for Stale Cell Id"), KTraceFileName, __LINE__);
+ delete iOMASuplPOSRequestor;
+ iOMASuplPOSRequestor = NULL;
+
+ // Delete the POS Session
+ delete iPOSSession;
+ iPOSSession = NULL;
+
+ }
// Log Session Id
TBuf<64> id;
id.Append(_L("Session Id is "));
@@ -445,23 +476,27 @@
iTrace->Trace(id,KTraceFileName, __LINE__);
iSETSessionUniqueId = aSessionIdSeed;
-
+
+ iIhaveLaunchedUsagedialog = EFalse;
TInt networkMode = 1;
networkMode = GetNetworkModeL();
- if ( networkMode == ECoreAppUIsNetworkConnectionNotAllowed )
- {
- id.Copy(_L("The device is in OFFLINE mode."));
- iTrace->Trace(id,KTraceFileName, __LINE__);
- iSessionObserver.TerminateSession(this, KErrGeneral);
- return;
- }
- else
- {
- id.Copy(_L("The device is in ON LINE mode."));
- iTrace->Trace(id,KTraceFileName, __LINE__);
- }
+ if(!iWlanOnly) //OCC
+ {
+ if ( networkMode == ECoreAppUIsNetworkConnectionNotAllowed )
+ {
+ id.Copy(_L("The device is in OFFLINE mode."));
+ iTrace->Trace(id,KTraceFileName, __LINE__);
+ iSessionObserver.TerminateSession(this, KErrGeneral);
+ return;
+ }
+ else
+ {
+ id.Copy(_L("The device is in ON LINE mode."));
+ iTrace->Trace(id,KTraceFileName, __LINE__);
+ }
+ } //OCC
if(aAllowedCapabilities == 0)
{
@@ -476,17 +511,41 @@
iSuplSessionId->SetSLPSessionID(NULL);
iConnRequestor->SetDefaultParametersL(aHslpAddress,aFallBack);
-
- if (aFirstReq)
- CheckForSuplUsageL();
- else
- CheckForPreviousResultL();
+
+ id.Copy(_L("aFallBack value is "));
+ id.AppendNum(aFallBack);
+ iTrace->Trace(id,KTraceFileName, __LINE__);
+
+ if(!iWlanOnly) //OCC
+ {
+ iTrace->Trace(_L("iWLANOnly false COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
+
+ id.Copy(_L("aFirstReq value is "));
+ id.AppendNum(aFirstReq);
+ iTrace->Trace(id,KTraceFileName, __LINE__);
+
+ if (aFirstReq)
+ {
+ iTrace->Trace(_L("start CheckForSuplUsageL COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
+ CheckForSuplUsageL();
+ }
+ else
+ {
+ iTrace->Trace(_L("start CheckForPreviousResultL COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
+ CheckForPreviousResultL();
+ }
+ }
+ else
+ {
+ iTrace->Trace(_L("iWLANOnly true COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
+ InitializeL(iRequestID);
+ } //OCC
// Clear Position....
delete iPosition;
iPosition = NULL;
-
+
iTrace->Trace(_L("End of COMASuplSession::RunSuplSession"), KTraceFileName, __LINE__);
}
@@ -505,6 +564,7 @@
TSuplTerminalQop& aQop, TInt aRequestID)
{
+ iIhaveLaunchedUsagedialog = EFalse;
iClientQop = aQop;
@@ -653,11 +713,18 @@
COMASuplStartState* startSuplState = static_cast <COMASuplPosInitState *>(iSuplState);
startSuplState->SetQop(iClientQop);
}
- //SMP Changes
- iSuplMsgType = ESUPL_START;
- SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);
+ if(iIsStaleLocIdPresent)
+ {
+ iTrace->Trace(_L("GenerateSuplStartL setting stale location id in supl start"), KTraceFileName, __LINE__);
+ COMASuplStartState* startSuplState = static_cast <COMASuplPosInitState *>(iSuplState);
+ startSuplState->SetStaleCellIdToUse(iStaleLocationId->CloneL());
+ }
+ iSuplSessionState = ESUPL_GENERATE;
+ iSuplMsgType = ESUPL_START;
TInt err = iSuplState->GenerateMessageL();
-
+
+
+ SetPOSMsgPluginState(COMASuplPosSessionBase::EOMASuplCreating);
}
@@ -700,6 +767,12 @@
iTrace->Trace(msg, KTraceFileName, __LINE__);
iSuplState = COMASuplPosInitState::NewL(iSETCapabilities, iMobilePhone, iUT2_PosInitTimer,
iOMASuplPOSRequestor,iAllowedCapabilities,iRequestType, iPosMethod,iOMASuplAsnHandlerBaseImpl);
+ if(iIsStaleLocIdPresent)
+ {
+ iTrace->Trace(_L("COMASuplSession::GenerateSuplPosInitL() Setting Stale Location Id "), KTraceFileName, __LINE__);
+ COMASuplPosInitState* posInitSuplState = static_cast <COMASuplPosInitState *>(iSuplState);
+ posInitSuplState->SetStaleCellIdToUse(iStaleLocationId->CloneL());
+ }
}
iSuplState->SetMsgStateObserver(this);
@@ -815,6 +888,7 @@
//
void COMASuplSession::OperationCompleteL(TInt aErrorCode)
{
+ iTrace->Trace(_L("COMASuplSession::OperationCompleteL"), KTraceFileName, __LINE__);
TBuf<256> msg;
if(KErrNone != aErrorCode)
{
@@ -827,6 +901,10 @@
HandleSuplErrorL(aErrorCode);
return;
}
+
+ msg.Copy(_L("iSuplSessionState : "));
+ msg.AppendNum(iSuplSessionState);
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
TInt err = KErrNone;
@@ -888,7 +966,15 @@
}
else //terminal initiated case
{
- TRAP( err, iConnRequestor->CreateConnectionL() );
+ iTrace->Trace(_L("Connection block."), KTraceFileName, __LINE__);
+ if(iIsStaleLocIdPresent)
+ {
+ TRAP( err, iConnRequestor->CreateConnectionL(iStaleLocIdPrompt,iWlanOnly) );
+ }
+ else
+ {
+ TRAP( err, iConnRequestor->CreateConnectionL() );
+ }
}
if(KErrNone != err)
{
@@ -4058,6 +4144,7 @@
iTrace->Trace(msg,KTraceFileName, __LINE__);
iPrevUsageResult = aError;
+ iIhaveLaunchedUsagedialog = EFalse;
if (aError == KErrNone)
@@ -4218,19 +4305,26 @@
iConnRequestor->UpdateSLPListForHomeUsage(iUsageHomeNW);
CSuplSettings::TSuplSettingsUsage usage = iSuplSettings->SUPLUsage();
- if (usage == CSuplSettings::ESuplUsageAlwaysAsk)
+ if (usage == CSuplSettings::ESuplUsageAlwaysAsk || iStaleLocIdPrompt)
{
TInt err;
+ if (!iSuplSettings->IsUIActive() )
+ {
if (!aHomeNw)
{
iTrace->Trace(_L("Invoking LaunchSuplUsageSettingsUI, user is roaming"), KTraceFileName, __LINE__);
+ iIhaveLaunchedUsagedialog = ETrue;
err = iProtocolManager.LaunchSuplUsageSettingsUI(this, ETrue);
}
else
{
iTrace->Trace(_L("Invoking LaunchSuplUsageSettingsUI, user is not roaming"), KTraceFileName, __LINE__);
+ iIhaveLaunchedUsagedialog = ETrue;
err = iProtocolManager.LaunchSuplUsageSettingsUI(this, EFalse);
}
+ }
+ else
+ err = KErrInUse;
if(KErrNone != err && KErrInUse == err)
{
@@ -4596,6 +4690,12 @@
iTrace->Trace(_L("COMASuplSession::IsEtelRoamingSet"), KTraceFileName, __LINE__);
return iEtelRoamingCheck;
}
+
+TBool COMASuplSession::HasMeLaunchedUsageDialog()
+{
+ return iIhaveLaunchedUsagedialog;
+}
+
// -----------------------------------------------------------------------------
// COMASuplSession::DialogTimerExpiredL
--- a/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplstartstate.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationomasuplprotocolhandler/protocolhandlerver1/src/epos_comasuplstartstate.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -149,8 +149,22 @@
//
TInt COMASuplStartState::GenerateMessageL()
{
- iTrace->Trace(_L("Start of COMASuplStartState::GenerateMessage"), KTraceFileName, __LINE__);
- iLocationIDRequestor->GetLocationID();
+ iTrace->Trace(_L("Start of COMASuplStartState::GenerateMessage"), KTraceFileName, __LINE__);
+ //if no cell stale cell id is available, retrieve current cell id
+ if(!iIsStaleCellId)
+ {
+ iTrace->Trace(_L("COMASuplStartState::GenerateMessage stale cell id false"), KTraceFileName, __LINE__);
+ iLocationIDRequestor->GetLocationID();
+ iTrace->Trace(_L("COMASuplStartState::GenerateMessage called get location id"), KTraceFileName, __LINE__);
+ }
+ else // dont retrieve current cell id as cell id was already provided
+ {
+ iGenerationStatus = EFalse;
+ iECId = EFalse;
+ iTrace->Trace(_L("COMASuplStartState::GenerateMessage stale cell id true"), KTraceFileName, __LINE__);
+ GetAssistceDataFromPluginL(KErrNone);
+ }
+
return KErrNone;
}
@@ -996,4 +1010,15 @@
aCurrentCellId.iMCC = lRefMCC;
aCurrentCellId.iLac = lRefLAC;
}
-} // End of File
+}
+void COMASuplStartState::SetStaleCellIdToUse(COMASuplLocationId* aLocationId)
+ {
+ if(iLocationId)
+ {
+ delete iLocationId;
+ iLocationId = NULL;
+ }
+ iLocationId = aLocationId;
+ iIsStaleCellId = ETrue;
+ }
+// End of File
Binary file supl/locationsuplfw/conf/suplsettings.confml has changed
Binary file supl/locationsuplfw/conf/suplsettings_102073D6.crml has changed
--- a/supl/locationsuplfw/gateway/inc/epos_csuplipcsubsession.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/inc/epos_csuplipcsubsession.h Thu Aug 19 10:20:18 2010 +0300
@@ -126,11 +126,19 @@
void HandlePeriodicTriggerSessionWithServernameL(const RMessage2& aMessage);
void HandleStopTriggerringSessionL(const RMessage2& aMessage);
void HandleNotifyTriggerFiredL(const RMessage2& aMessage);
+ /*
+ * For GeoTagging
+ */
+ void HandleLocationConversionL(const RMessage2& aMessage);
+ void HandleCancelLocationConversionL(const RMessage2& aMessage);
private: // Data
+ // Supl session handle.Ownership is with this object
CSuplSessionBase* iSuplSession;
+ // Supl session request object.Ownership is with this object
CSuplSessionRequest* iSuplSessnReq;
RMessage2 iMessage;
+ // Position buffer.Ownership is with this object
HBufC8* iPositionBuffer;
TInt iReqType;
RSuplTerminalSubSession::TSuplServiceType iSuplService;
--- a/supl/locationsuplfw/gateway/inc/epos_csuplsessionmanager.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/inc/epos_csuplsessionmanager.h Thu Aug 19 10:20:18 2010 +0300
@@ -25,6 +25,7 @@
#include <lbspositioninfo.h>
#include <epos_suplterminal.h>
#include <epos_suplterminaltrigger.h>
+#include <epos_suplgeocellinfo.h>
#include "epos_csuplecomeventwatcher.h"
#include "epos_csuplsessionretryq.h"
#include "epos_csuplcommunicationmanager.h"
@@ -95,6 +96,12 @@
// from MSuplConnectionMonitor
void ConnectionOpened();
void ConnectionClosed();
+
+ void MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus
+ );
+ void CancelLocationConversionRequest(CSuplSessionBase *aSessn);
private:
--- a/supl/locationsuplfw/gateway/inc/epos_csuplsessionrequest.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/inc/epos_csuplsessionrequest.h Thu Aug 19 10:20:18 2010 +0300
@@ -27,6 +27,7 @@
#include <lbspositioninfo.h>
#include <epos_suplterminalqop.h>
#include <epos_suplterminaltrigger.h>
+#include "epos_suplgeocellinfo.h"
// CONSTANT DECLARATIONS
@@ -101,6 +102,10 @@
void CancelTriggerringRequest();
void ProtocolHUnloaded();
+
+ void MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,TGeoCellInfo& aCellInfo );
+
+ void CancelLocationConversionRequest();
void ReIssueRequestL();
protected: // From CActive
@@ -134,7 +139,9 @@
ESuplStopTriggerRequest,
ESuplTriggerFiredNotifyRequest,
ESuplWaitingToRetrySession,
- ESuplRetryingSession
+ ESuplRetryingSession,
+ ESuplLocationConversionRequest,
+ ESuplCancelLocationConversionRequest
};
TSuplRequestStage iRequestPhase;
@@ -153,8 +160,6 @@
TBool iParamExtendedQopUsed;
TSuplTerminalQop iParamQop;
HBufC* iParamExtendedFallback;
-
- TBool iSessionStarted;
};
#endif // __CSuplSessionRequest_H__
--- a/supl/locationsuplfw/gateway/src/epos_csuplipcsession.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplipcsession.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -118,7 +118,11 @@
TInt dataSize = aMessage.GetDesLength(0);
if(dataSize>0)
{
- iSuplServer.HandleNewNetSessionL(iSessionManager,aMessage);
+ TRAPD(err,iSuplServer.HandleNewNetSessionL(iSessionManager,aMessage));
+ if(err != KErrNone)
+ {
+ RequestComplete(aMessage,err);
+ }
}
else
{
--- a/supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplipcsubsession.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -34,6 +34,8 @@
#include "epos_csuplsettings.h"
#include "epos_csuplsettingsinternal.h"
#include "epos_csuplsettingparams.h"
+#include "epos_suplgeocellinfo.h"
+
// CONSTANTS
//#ifdef _DEBUG
@@ -226,6 +228,19 @@
HandleNotifyTriggerFiredL(aMessage);
break;
}
+ case ESuplTerminalSubssnLocationConversion:
+ {
+ iMessage=aMessage;
+ iReqType = ESuplTerminalSubssnLocationConversion;
+ HandleLocationConversionL(aMessage);
+ break;
+ }
+
+ case ESuplTerminalSubssnCancelLocationConversion:
+ {
+ HandleCancelLocationConversionL(aMessage);
+ break;
+ }
default:
User::Leave(KErrNotSupported);
}
@@ -728,5 +743,53 @@
CleanupStack::Pop(fireInfoBuf);
}
+
+// ---------------------------------------------------------
+// CSuplIPCSubSession::HandleLocationConversionL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplIPCSubSession::HandleLocationConversionL(const RMessage2& aMessage)
+ {
+ DEBUG_TRACE("CSuplIPCSubSession::HandleLocationConversionL", __LINE__)
+
+ if (iSuplSessnReq->IsActive())
+ {
+ SuplGlobal::RequestComplete(aMessage, KErrAlreadyExists);
+ }
+
+ if(iReqType==ESuplTerminalSubssnLocationConversion)
+ {
+ HBufC8* cellBuf = SuplGlobal::CopyClientBuffer8LC(aMessage,0);
+
+ TGeoCellInfo& cellInfo = reinterpret_cast
+ <TGeoCellInfo&>(const_cast<TUint8&>(*cellBuf->Ptr()));
+
+ iSuplSessnReq->MakeLocationConversionRequestL( iSuplSession,cellInfo );
+
+ CleanupStack::PopAndDestroy(cellBuf);
+ }
+
+ }
+
+// ---------------------------------------------------------
+// CSuplIPCSubSession::HandleCancelLocationConversionL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplIPCSubSession::HandleCancelLocationConversionL(const RMessage2& aMessage)
+ {
+ DEBUG_TRACE("CSuplIPCSubSession::HandleCancelLocationConversionL", __LINE__)
+
+ if (!iSuplSessnReq->IsActive()||(iReqType!=ESuplTerminalSubssnLocationConversion))
+ {
+ User::Leave(KErrNotFound);
+ }
+ iSuplSessnReq->CancelLocationConversionRequest();
+ SuplGlobal::RequestComplete(aMessage, KErrNone);
+ CompleteRunSession(KErrCancel);
+ }
// End of File
--- a/supl/locationsuplfw/gateway/src/epos_csuplserver.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplserver.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -142,8 +142,8 @@
// Settings
TInt keyValue;
TInt err = KErrNone;
-
- CRepository* repository = CRepository::NewL(KCRUidSuplConfiguration);
+ CRepository* repository = NULL;
+ TRAP(err, repository = CRepository::NewL(KCRUidSuplConfiguration));
CleanupStack::PushL(repository);
if (err != KErrNone)
@@ -264,7 +264,7 @@
}
//if secure id is not equal to KSuplWapSecureId or KSuplWapSecureId, then perform capability check
- if ((aMessage.SecureId() != KSuplWapSecureId && aMessage.SecureId() != KNetworkGatewaySID))
+ if ((aMessage.SecureId() != KSuplWapSecureId && aMessage.SecureId() != KNetworkGatewaySID && aMessage.SecureId() != 0x102869DF))
{
if (!aMessage.HasCapability(ECapabilityCommDD))
{
@@ -322,8 +322,11 @@
static _LIT_SECURITY_POLICY_S0(allowSuplWapPolicy, KSuplWapSecureId);
TBool isSuplWap = allowSuplWapPolicy().CheckPolicy(aMessage);
- //Check if the request was made by one of the allowed processes else check for required capability
- if (!isNetworkGateway && !isSuplWap )
+ static _LIT_SECURITY_POLICY_S0(allowlocationserverPolicy, 0x102869DF);
+ TBool islocationserver = allowlocationserverPolicy().CheckPolicy(aMessage);
+
+ //Check if the request was made by one of the allowed processes else check for required capability
+ if (!isNetworkGateway && !isSuplWap && !islocationserver)
{
if (!aMessage.HasCapability(ECapabilityCommDD))
{
--- a/supl/locationsuplfw/gateway/src/epos_csuplsessionmanager.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplsessionmanager.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -30,6 +30,7 @@
#include "epos_sessionmanagerlogging.h"
#include "epos_csuplsessionmanager.h"
#include "epos_csuplglobal.h"
+#include "epos_suplgeocellinfo.h"
//#ifdef _DEBUG
_LIT(KTraceFileName, "SUPL_GW::epos_csuplsessionmanager.cpp");
@@ -488,5 +489,53 @@
{
iSessionRetryQ->RemoveFromQueueL(aSessionRequest);
}
+
+// ---------------------------------------------------------
+// CSuplSessionManager::MakeLocationConversionRequestL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplSessionManager::MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus
+ )
+ {
+ DEBUG_TRACE("CSuplSessionManager::MakeLocationConversionRequestL", __LINE__)
+ TInt err = KErrNone;
+ if(iProtocolMgr && aSuplSessn)
+ {
+ DEBUG_TRACE("CSuplSessionManager::MakeLocationConversionRequestL if condition true", __LINE__)
+ TRAP(err,iProtocolMgr->MakeLocationConversionRequestL(aSuplSessn,aCellInfo,aStatus));
+ DEBUG_TRACE("CSuplSessionManager::MakeLocationConversionRequestL err", __LINE__)
+ if(err!=KErrNone)
+ {
+ DEBUG_TRACE("CSuplSessionManager::MakeLocationConversionRequestL err not KErrNone", __LINE__)
+ TRequestStatus *status = &aStatus;
+ User::RequestComplete(status,KErrNotReady);
+ }
+ }
+ else
+ {
+ TRequestStatus *status = &aStatus;
+ User::RequestComplete(status,KErrNotReady);
+ }
+ }
+
+// ---------------------------------------------------------
+// CSuplSessionManager::CancelLocationConversionRequest
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplSessionManager::CancelLocationConversionRequest(CSuplSessionBase *aSessn)
+ {
+ DEBUG_TRACE("CSuplSessionManager::CancelLocationConversionRequest", __LINE__)
+ if(iProtocolMgr && aSessn)
+ iProtocolMgr->CancelLocationConversionRequest(aSessn);
+ }
+
+
+
// End of File
--- a/supl/locationsuplfw/gateway/src/epos_csuplsessionrequest.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplsessionrequest.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -97,10 +97,12 @@
CSuplSessionRequest::~CSuplSessionRequest()
{
DEBUG_TRACE("CSuplSessionRequest::~CSuplSessionRequest", __LINE__)
- iSessnMgr.RemoveFromQueueForReIssueRequest(*this);
+ //iSessnMgr.RemoveFromQueueForReIssueRequest(*this);
if (iParamExtendedFallback)
+ {
delete iParamExtendedFallback;
+ }
if (IsActive())
Cancel();
@@ -122,12 +124,16 @@
iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aFirstReq);
SetActive();
- iSessionStarted = ETrue;
iParamFallback = ETrue;
iParamSuplSessn = aSuplSessn;
iParamSetCaps = aSetCaps;
iParamReqId = aReqId;
iParamFirstReq = aFirstReq;
+ if (iParamExtendedFallback)
+ {
+ delete iParamExtendedFallback;
+ iParamExtendedFallback = NULL;
+ }
iParamExtendedQopUsed = EFalse;
}
// ---------------------------------------------------------
@@ -147,12 +153,16 @@
iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aQop, aFirstReq);
SetActive();
- iSessionStarted = ETrue;
iParamFallback = ETrue;
iParamSuplSessn = aSuplSessn;
iParamSetCaps = aSetCaps;
iParamReqId = aReqId;
iParamFirstReq = aFirstReq;
+ if (iParamExtendedFallback)
+ {
+ delete iParamExtendedFallback;
+ iParamExtendedFallback = NULL;
+ }
iParamQop = aQop;
iParamExtendedQopUsed = ETrue;
}
@@ -165,7 +175,6 @@
iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aFirstReq);
SetActive();
- iSessionStarted = ETrue;
iParamFallback = aFallBack;
iParamSuplSessn = aSuplSessn;
iParamSetCaps = aSetCaps;
@@ -189,7 +198,6 @@
iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aQop, aFirstReq);
SetActive();
- iSessionStarted = ETrue;
iParamFallback = aFallBack;
iParamSuplSessn = aSuplSessn;
iParamSetCaps = aSetCaps;
@@ -252,7 +260,6 @@
if (IsActive())
{
iObserver->CompleteRunSession(KErrServerTerminated);
- iSessionStarted = EFalse;
Cancel();
}
}
@@ -268,7 +275,6 @@
DEBUG_TRACE("CSuplSessionRequest::RunL", __LINE__)
TInt err = iStatus.Int();
- iSessionStarted = EFalse;
if(err != KErrNone && iRequestPhase == ESuplSessionRequest)
{
DEBUG_TRACE("Retrying session", __LINE__)
@@ -311,6 +317,17 @@
iNetObserver->CompleteForwardMessageL(iHandle);
break;
}
+
+ case ESuplLocationConversionRequest:
+ case ESuplCancelLocationConversionRequest:
+ {
+ iRequestPhase = ESuplReqInactive;
+ iObserver->CompleteRunSession(err);
+ break;
+ }
+
+
+
default :
DebugPanic(EPosSuplServerPanicRequestInconsistency);
@@ -483,8 +500,38 @@
{
DEBUG_TRACE("CSuplSessionRequest::CancelTriggerringRequest", __LINE__)
iRequestPhase = ESuplStopTriggerRequest;
- iSessnMgr.CancelTriggerringSession(iSuplSessn);
- //SetActive();
+ iSessnMgr.CancelTriggerringSession(iSuplSessn);
+ //SetActive();
+ }
+
+// ---------------------------------------------------------
+// CSuplSessionRequest::MakeLocationConversionRequestL
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplSessionRequest::MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo )
+ {
+ DEBUG_TRACE("CSuplSessionRequest::MakeLocationConversionRequestL", __LINE__)
+ iRequestPhase = ESuplLocationConversionRequest;
+ iStatus = KRequestPending;
+ iSessnMgr.MakeLocationConversionRequestL(aSuplSessn,aCellInfo,iStatus );
+ SetActive();
+ }
+
+
+// ---------------------------------------------------------
+// CSuplSessionRequest::CancelLocationConversionRequest
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+void CSuplSessionRequest::CancelLocationConversionRequest()
+ {
+ DEBUG_TRACE("CSuplSessionRequest::CancelLocationConversionRequest", __LINE__)
+ iRequestPhase = ESuplCancelLocationConversionRequest;
+ iSessnMgr.CancelLocationConversionRequest(iSuplSessn);
}
// End of File
--- a/supl/locationsuplfw/gateway/src/epos_csuplsessionretryq.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/gateway/src/epos_csuplsessionretryq.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -140,7 +140,8 @@
if(iSessionCount == 0 && iSessionRequests.Count() > 0)
{
DEBUG_TRACE("Re-issuing request straight away", __LINE__)
- After(KSmallDelay);
+ if( !IsActive() )
+ After(KSmallDelay);
}
// If a connection just closed remember the time-stamp so later it can be decided when to re-issue
iSomeSessionEnded = ETrue;
--- a/supl/locationsuplfw/protocolhandlerapi/bwins/epossuplprotocolhandlerpluginu.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/bwins/epossuplprotocolhandlerpluginu.def Thu Aug 19 10:20:18 2010 +0300
@@ -1,26 +1,27 @@
EXPORTS
- ?ConstructL@CSUPLProtocolManagerBase@@UAEXABVTUid@@@Z @ 1 NONAME ; void CSUPLProtocolManagerBase::ConstructL(class TUid const &)
- ??0CSUPLProtocolManagerBase@@QAE@XZ @ 2 NONAME ; CSUPLProtocolManagerBase::CSUPLProtocolManagerBase(void)
- ?CancelListenToMessages@CSuplConnection@@QAEXXZ @ 3 NONAME ; void CSuplConnection::CancelListenToMessages(void)
- ?ImplementationUid@CSUPLProtocolManagerBase@@QBE?AVTUid@@XZ @ 4 NONAME ; class TUid CSUPLProtocolManagerBase::ImplementationUid(void) const
- ?CancelSend@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 5 NONAME ; void CSuplConnection::CancelSend(class TRequestStatus &)
- ?ListenToMessages@CSuplConnection@@QAEHXZ @ 6 NONAME ; int CSuplConnection::ListenToMessages(void)
- ?GetSUPLMessageVersionL@CSUPLProtocolManagerBase@@UAEHAAHABVTDesC8@@@Z @ 7 NONAME ; int CSUPLProtocolManagerBase::GetSUPLMessageVersionL(int &, class TDesC8 const &)
- ?Version@CSUPLProtocolManagerBase@@QBEHXZ @ 8 NONAME ; int CSUPLProtocolManagerBase::Version(void) const
- ??1CSuplCommunicationManager@@UAE@XZ @ 9 NONAME ; CSuplCommunicationManager::~CSuplCommunicationManager(void)
- ?Connect@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 10 NONAME ; void CSuplConnection::Connect(class TRequestStatus &)
- ?GetPortNumberUsed@CSuplConnection@@QAEHXZ @ 11 NONAME ; int CSuplConnection::GetPortNumberUsed(void)
- ?Initialize@CSuplCommunicationManager@@QAEHXZ @ 12 NONAME ; int CSuplCommunicationManager::Initialize(void)
- ?GetLocalIPAddress@CSuplConnection@@QAEHAAVTInetAddr@@@Z @ 13 NONAME ; int CSuplConnection::GetLocalIPAddress(class TInetAddr &)
- ?NewL@CSUPLProtocolManagerBase@@SAPAV1@ABVTDesC8@@@Z @ 14 NONAME ; class CSUPLProtocolManagerBase * CSUPLProtocolManagerBase::NewL(class TDesC8 const &)
- ?Send@CSuplConnection@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 15 NONAME ; void CSuplConnection::Send(class TDesC8 const &, class TRequestStatus &)
- ?CreateConnectionL@CSuplCommunicationManager@@QAEPAVCSuplConnection@@ABVTDesC16@@HHIH@Z @ 16 NONAME ; class CSuplConnection * CSuplCommunicationManager::CreateConnectionL(class TDesC16 const &, int, int, unsigned int, int)
- ?NewL@CSuplCommunicationManager@@SAPAV1@AAVMSuplConnectionMonitor@@@Z @ 17 NONAME ; class CSuplCommunicationManager * CSuplCommunicationManager::NewL(class MSuplConnectionMonitor &)
- ?CloseConnection@CSuplConnection@@QAEXXZ @ 18 NONAME ; void CSuplConnection::CloseConnection(void)
- ?CancelConnect@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 19 NONAME ; void CSuplConnection::CancelConnect(class TRequestStatus &)
- ?DestroyConnection@CSuplCommunicationManager@@QAEHPAVCSuplConnection@@@Z @ 20 NONAME ; int CSuplCommunicationManager::DestroyConnection(class CSuplConnection *)
- ?NewL@CSUPLProtocolManagerBase@@SAPAV1@ABVTUid@@@Z @ 21 NONAME ; class CSUPLProtocolManagerBase * CSUPLProtocolManagerBase::NewL(class TUid const &)
- ?SetPacketReceiver@CSuplCommunicationManager@@QAEXPAVMSuplPacketReceiver@@@Z @ 22 NONAME ; void CSuplCommunicationManager::SetPacketReceiver(class MSuplPacketReceiver *)
- ??1CSUPLProtocolManagerBase@@UAE@XZ @ 23 NONAME ; CSUPLProtocolManagerBase::~CSUPLProtocolManagerBase(void)
- ?CreateConnectionL@CSuplCommunicationManager@@QAEPAVCSuplConnection@@ABVTDesC16@@IH@Z @ 24 NONAME ; class CSuplConnection * CSuplCommunicationManager::CreateConnectionL(class TDesC16 const &, unsigned int, int)
+ ?Connect@CSuplConnection@@QAEXAAVTRequestStatus@@HH@Z @ 1 NONAME ; void CSuplConnection::Connect(class TRequestStatus &, int, int)
+ ?ConstructL@CSUPLProtocolManagerBase@@UAEXABVTUid@@@Z @ 2 NONAME ; void CSUPLProtocolManagerBase::ConstructL(class TUid const &)
+ ??0CSUPLProtocolManagerBase@@QAE@XZ @ 3 NONAME ; CSUPLProtocolManagerBase::CSUPLProtocolManagerBase(void)
+ ?CancelListenToMessages@CSuplConnection@@QAEXXZ @ 4 NONAME ; void CSuplConnection::CancelListenToMessages(void)
+ ?ImplementationUid@CSUPLProtocolManagerBase@@QBE?AVTUid@@XZ @ 5 NONAME ; class TUid CSUPLProtocolManagerBase::ImplementationUid(void) const
+ ?CancelSend@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 6 NONAME ; void CSuplConnection::CancelSend(class TRequestStatus &)
+ ?ListenToMessages@CSuplConnection@@QAEHXZ @ 7 NONAME ; int CSuplConnection::ListenToMessages(void)
+ ?GetSUPLMessageVersionL@CSUPLProtocolManagerBase@@UAEHAAHABVTDesC8@@@Z @ 8 NONAME ; int CSUPLProtocolManagerBase::GetSUPLMessageVersionL(int &, class TDesC8 const &)
+ ?Version@CSUPLProtocolManagerBase@@QBEHXZ @ 9 NONAME ; int CSUPLProtocolManagerBase::Version(void) const
+ ??1CSuplCommunicationManager@@UAE@XZ @ 10 NONAME ; CSuplCommunicationManager::~CSuplCommunicationManager(void)
+ ?Connect@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 11 NONAME ; void CSuplConnection::Connect(class TRequestStatus &)
+ ?GetPortNumberUsed@CSuplConnection@@QAEHXZ @ 12 NONAME ; int CSuplConnection::GetPortNumberUsed(void)
+ ?Initialize@CSuplCommunicationManager@@QAEHXZ @ 13 NONAME ; int CSuplCommunicationManager::Initialize(void)
+ ?GetLocalIPAddress@CSuplConnection@@QAEHAAVTInetAddr@@@Z @ 14 NONAME ; int CSuplConnection::GetLocalIPAddress(class TInetAddr &)
+ ?NewL@CSUPLProtocolManagerBase@@SAPAV1@ABVTDesC8@@@Z @ 15 NONAME ; class CSUPLProtocolManagerBase * CSUPLProtocolManagerBase::NewL(class TDesC8 const &)
+ ?Send@CSuplConnection@@QAEXABVTDesC8@@AAVTRequestStatus@@@Z @ 16 NONAME ; void CSuplConnection::Send(class TDesC8 const &, class TRequestStatus &)
+ ?CreateConnectionL@CSuplCommunicationManager@@QAEPAVCSuplConnection@@ABVTDesC16@@HHIH@Z @ 17 NONAME ; class CSuplConnection * CSuplCommunicationManager::CreateConnectionL(class TDesC16 const &, int, int, unsigned int, int)
+ ?NewL@CSuplCommunicationManager@@SAPAV1@AAVMSuplConnectionMonitor@@@Z @ 18 NONAME ; class CSuplCommunicationManager * CSuplCommunicationManager::NewL(class MSuplConnectionMonitor &)
+ ?CloseConnection@CSuplConnection@@QAEXXZ @ 19 NONAME ; void CSuplConnection::CloseConnection(void)
+ ?CancelConnect@CSuplConnection@@QAEXAAVTRequestStatus@@@Z @ 20 NONAME ; void CSuplConnection::CancelConnect(class TRequestStatus &)
+ ?DestroyConnection@CSuplCommunicationManager@@QAEHPAVCSuplConnection@@@Z @ 21 NONAME ; int CSuplCommunicationManager::DestroyConnection(class CSuplConnection *)
+ ?NewL@CSUPLProtocolManagerBase@@SAPAV1@ABVTUid@@@Z @ 22 NONAME ; class CSUPLProtocolManagerBase * CSUPLProtocolManagerBase::NewL(class TUid const &)
+ ?SetPacketReceiver@CSuplCommunicationManager@@QAEXPAVMSuplPacketReceiver@@@Z @ 23 NONAME ; void CSuplCommunicationManager::SetPacketReceiver(class MSuplPacketReceiver *)
+ ??1CSUPLProtocolManagerBase@@UAE@XZ @ 24 NONAME ; CSUPLProtocolManagerBase::~CSUPLProtocolManagerBase(void)
+ ?CreateConnectionL@CSuplCommunicationManager@@QAEPAVCSuplConnection@@ABVTDesC16@@IH@Z @ 25 NONAME ; class CSuplConnection * CSuplCommunicationManager::CreateConnectionL(class TDesC16 const &, unsigned int, int)
--- a/supl/locationsuplfw/protocolhandlerapi/eabi/epossuplprotocolhandlerpluginu.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/eabi/epossuplprotocolhandlerpluginu.def Thu Aug 19 10:20:18 2010 +0300
@@ -8,31 +8,32 @@
_ZN15CSuplConnection22CancelListenToMessagesEv @ 7 NONAME
_ZN15CSuplConnection4SendERK6TDesC8R14TRequestStatus @ 8 NONAME
_ZN15CSuplConnection7ConnectER14TRequestStatus @ 9 NONAME
- _ZN24CSUPLProtocolManagerBase10ConstructLERK4TUid @ 10 NONAME
- _ZN24CSUPLProtocolManagerBase22GetSUPLMessageVersionLERiRK6TDesC8 @ 11 NONAME
- _ZN24CSUPLProtocolManagerBase4NewLERK4TUid @ 12 NONAME
- _ZN24CSUPLProtocolManagerBase4NewLERK6TDesC8 @ 13 NONAME
- _ZN24CSUPLProtocolManagerBaseC2Ev @ 14 NONAME
- _ZN24CSUPLProtocolManagerBaseD0Ev @ 15 NONAME
- _ZN24CSUPLProtocolManagerBaseD1Ev @ 16 NONAME
- _ZN24CSUPLProtocolManagerBaseD2Ev @ 17 NONAME
- _ZN25CSuplCommunicationManager10InitializeEv @ 18 NONAME
- _ZN25CSuplCommunicationManager17CreateConnectionLERK7TDesC16iiji @ 19 NONAME
- _ZN25CSuplCommunicationManager17CreateConnectionLERK7TDesC16ji @ 20 NONAME
- _ZN25CSuplCommunicationManager17DestroyConnectionEP15CSuplConnection @ 21 NONAME
- _ZN25CSuplCommunicationManager17SetPacketReceiverEP19MSuplPacketReceiver @ 22 NONAME
- _ZN25CSuplCommunicationManager4NewLER22MSuplConnectionMonitor @ 23 NONAME
- _ZN25CSuplCommunicationManagerD0Ev @ 24 NONAME
- _ZN25CSuplCommunicationManagerD1Ev @ 25 NONAME
- _ZN25CSuplCommunicationManagerD2Ev @ 26 NONAME
- _ZNK24CSUPLProtocolManagerBase17ImplementationUidEv @ 27 NONAME
- _ZNK24CSUPLProtocolManagerBase7VersionEv @ 28 NONAME
- _ZTI15CSuplConnection @ 29 NONAME
- _ZTI17CSuplSocketReader @ 30 NONAME
- _ZTI24CSUPLProtocolManagerBase @ 31 NONAME
- _ZTI25CSuplCommunicationManager @ 32 NONAME
- _ZTV15CSuplConnection @ 33 NONAME
- _ZTV17CSuplSocketReader @ 34 NONAME
- _ZTV24CSUPLProtocolManagerBase @ 35 NONAME
- _ZTV25CSuplCommunicationManager @ 36 NONAME
+ _ZN15CSuplConnection7ConnectER14TRequestStatusii @ 10 NONAME
+ _ZN24CSUPLProtocolManagerBase10ConstructLERK4TUid @ 11 NONAME
+ _ZN24CSUPLProtocolManagerBase22GetSUPLMessageVersionLERiRK6TDesC8 @ 12 NONAME
+ _ZN24CSUPLProtocolManagerBase4NewLERK4TUid @ 13 NONAME
+ _ZN24CSUPLProtocolManagerBase4NewLERK6TDesC8 @ 14 NONAME
+ _ZN24CSUPLProtocolManagerBaseC2Ev @ 15 NONAME
+ _ZN24CSUPLProtocolManagerBaseD0Ev @ 16 NONAME
+ _ZN24CSUPLProtocolManagerBaseD1Ev @ 17 NONAME
+ _ZN24CSUPLProtocolManagerBaseD2Ev @ 18 NONAME
+ _ZN25CSuplCommunicationManager10InitializeEv @ 19 NONAME
+ _ZN25CSuplCommunicationManager17CreateConnectionLERK7TDesC16iiji @ 20 NONAME
+ _ZN25CSuplCommunicationManager17CreateConnectionLERK7TDesC16ji @ 21 NONAME
+ _ZN25CSuplCommunicationManager17DestroyConnectionEP15CSuplConnection @ 22 NONAME
+ _ZN25CSuplCommunicationManager17SetPacketReceiverEP19MSuplPacketReceiver @ 23 NONAME
+ _ZN25CSuplCommunicationManager4NewLER22MSuplConnectionMonitor @ 24 NONAME
+ _ZN25CSuplCommunicationManagerD0Ev @ 25 NONAME
+ _ZN25CSuplCommunicationManagerD1Ev @ 26 NONAME
+ _ZN25CSuplCommunicationManagerD2Ev @ 27 NONAME
+ _ZNK24CSUPLProtocolManagerBase17ImplementationUidEv @ 28 NONAME
+ _ZNK24CSUPLProtocolManagerBase7VersionEv @ 29 NONAME
+ _ZTI15CSuplConnection @ 30 NONAME
+ _ZTI17CSuplSocketReader @ 31 NONAME
+ _ZTI24CSUPLProtocolManagerBase @ 32 NONAME
+ _ZTI25CSuplCommunicationManager @ 33 NONAME
+ _ZTV15CSuplConnection @ 34 NONAME
+ _ZTV17CSuplSocketReader @ 35 NONAME
+ _ZTV24CSUPLProtocolManagerBase @ 36 NONAME
+ _ZTV25CSuplCommunicationManager @ 37 NONAME
--- a/supl/locationsuplfw/protocolhandlerapi/group/epos_suplprotocolhandlerplugin.mmp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/group/epos_suplprotocolhandlerplugin.mmp Thu Aug 19 10:20:18 2010 +0300
@@ -51,7 +51,7 @@
LIBRARY insock.lib
LIBRARY securesocket.lib
LIBRARY commdb.lib
-LIBRARY centralrepository.lib
+LIBRARY centralrepository.lib extendedconnpref.lib netmeta.lib /*extendedconnpref.lib netmeta.lib Related to custom preference Api's(OCC).*/
LIBRARY flogger.lib
/* LIBRARY gba.lib */
--- a/supl/locationsuplfw/protocolhandlerapi/inc/epos_csuplconnection.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/inc/epos_csuplconnection.h Thu Aug 19 10:20:18 2010 +0300
@@ -88,6 +88,16 @@
* @return void *
*/
IMPORT_C void Connect(TRequestStatus &aStatus);
+
+ /**
+ * A method that makes Socket Connection.
+ * @since Series 60 3.1
+ * @return None
+ * @param aPrompt used to show connection prompt using OCC Api's.
+ * @param aWlanOnly used to differentiate connection for GPRS and WLAN using OCC Api's
+ */
+ IMPORT_C void Connect(TRequestStatus &aStatus,TBool aPrompt,TBool aWlanOnly);
+
IMPORT_C void CloseConnection();
@@ -395,6 +405,14 @@
// Number of client connected
TInt iConnectClients;
+ TBool iPrompt;
+
+ TBool iWlanOnly;
+
+
+
+
+
};
#endif // C_CSUPLCONNECTION_H
--- a/supl/locationsuplfw/protocolhandlerapi/inc/epos_csuplprotocolmanagerbase.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/inc/epos_csuplprotocolmanagerbase.h Thu Aug 19 10:20:18 2010 +0300
@@ -29,6 +29,7 @@
//Forword Declarations
class CSuplSessionBase;
class CSuplCommunicationManager;
+class TGeoCellInfo;
/**
@@ -374,6 +375,35 @@
*/
virtual TInt GetSUPLMessageVersionL(TInt& aMajorVersion, const TDesC8& aReceivedMessage);
+ /**
+ * Function: MakeLocationConversionRequestL
+ *
+ * @Description: Makes Location conversion request
+ *
+ * @Param: aSuplSessn,session object on which processing will start
+ *
+ * @Param: aCellInfo,cell information which needs to be converted to geo-coordinates
+ *
+ * @Param: aStatus, On return, the status of the request
+ * @Returns: returns None
+ */
+
+ virtual void MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn,
+ TGeoCellInfo& aCellInfo,
+ TRequestStatus& aStatus ) = 0;
+
+
+ /**
+ * Function: CancelLocationConversionRequest
+ *
+ * @Description: Cancels the conversion Request
+ *
+ * @Param: Session Object
+ *
+ * @Returns: None
+ */
+
+ virtual void CancelLocationConversionRequest(CSuplSessionBase* aSuplSession) = 0;
--- a/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/protocolhandlerapi/src/epos_csuplconnection.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -1,23 +1,21 @@
/*
-* Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
-* All rights reserved.
-* This component and the accompanying materials are made available
-* under the terms of "Eclipse Public License v1.0"
-* which accompanies this distribution, and is available
-* at the URL "http://www.eclipse.org/legal/epl-v10.html".
-*
-* Initial Contributors:
-* Nokia Corporation - initial contribution.
-*
-* Contributors:
-*
-* Description: SUPL Connection provides the Connection End point
-* for SUPL Session to send/receive packets from the
-* network
-*
-*/
-
-
+ * Copyright (c) 2002-2005 Nokia Corporation and/or its subsidiary(-ies).
+ * All rights reserved.
+ * This component and the accompanying materials are made available
+ * under the terms of "Eclipse Public License v1.0"
+ * which accompanies this distribution, and is available
+ * at the URL "http://www.eclipse.org/legal/epl-v10.html".
+ *
+ * Initial Contributors:
+ * Nokia Corporation - initial contribution.
+ *
+ * Contributors:
+ *
+ * Description: SUPL Connection provides the Connection End point
+ * for SUPL Session to send/receive packets from the
+ * network
+ *
+ */
// INCLUDE FILES
#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
@@ -25,7 +23,7 @@
#endif
#include <commdbconnpref.h>
#include <centralrepository.h>
-
+#include <extendedconnpref.h> //For OCC
#include "epos_csuplserverprivatecrkeys.h"
#include "epos_csuplconnection.h"
#include "epos_csuplsocketreader.h"
@@ -35,21 +33,22 @@
#include "epos_psktlsusageprivatecrkeys.h"
#include "epos_suplpskloger.h"
-const TInt KMaxGBAUsageLength = 4;
-const TInt KMaxVerLength = 4;
+const TInt KMaxGBAUsageLength = 4;
+const TInt KMaxVerLength = 4;
//const TInt KMaxNewPasswordLength = 8;
-const TInt KMaxNewPasswordLength = 16;
-const TInt KMaxPskKeyLength = 256;
+const TInt KMaxNewPasswordLength = 16;
+const TInt KMaxPskKeyLength = 256;
-const TInt KMaxRootKeyLength = 32;
+const TInt KMaxRootKeyLength = 32;
const TInt KMaxRootKeyXORLength = 16;
- //const TInt KMaxRootKeyLength = 16;
-const TInt KMaxPassKeyLength = 8;
- //const TInt KMaxPassKeyLength = 8;
-const TInt KMaxSaltLength = 128;
- //const TInt KMaxSaltLength = 64;
-
-const TInt KMaxPskIdentityHintLength = KMaxGBAUsageLength + KMaxVerLength + KMaxPassKeyLength ;
+//const TInt KMaxRootKeyLength = 16;
+const TInt KMaxPassKeyLength = 8;
+//const TInt KMaxPassKeyLength = 8;
+const TInt KMaxSaltLength = 128;
+//const TInt KMaxSaltLength = 64;
+
+const TInt KMaxPskIdentityHintLength = KMaxGBAUsageLength + KMaxVerLength
+ + KMaxPassKeyLength;
// Constant definition
@@ -59,150 +58,143 @@
_LIT8(KSaltValue,"0x19,0x31,0x45,0x69,0x69,0x45,0x31,0x19");
-void DoSelfXOR(TDes8& aDestination,const TDesC8& aSource)
- {
- aDestination.Zero();
- TInt half = aSource.Length() / 2;
- for(TInt i = 0; i < half; i++)
- {
- aDestination.Append(aSource[i] ^ aSource[half + i]);
- }
- }
+void DoSelfXOR(TDes8& aDestination, const TDesC8& aSource)
+ {
+ aDestination.Zero();
+ TInt half = aSource.Length() / 2;
+ for (TInt i = 0; i < half; i++)
+ {
+ aDestination.Append(aSource[i] ^ aSource[half + i]);
+ }
+ }
+void DoXOR(TDes8& aDestination, const TDesC8& aSource1,
+ const TDesC8& aSource2)
+ {
+ aDestination.Zero();
+ TInt srcLen1 = aSource1.Length();
+ TInt srcLen2 = aSource2.Length();
+ TInt j = 0;
+ for (TInt i = 0; i < srcLen1; i++)
+ {
+ if (j >= srcLen2)
+ {
+ j = 0;
+ }
-void DoXOR(TDes8& aDestination,const TDesC8& aSource1,const TDesC8& aSource2)
- {
- aDestination.Zero();
- TInt srcLen1 = aSource1.Length();
- TInt srcLen2 = aSource2.Length();
- TInt j = 0;
- for(TInt i = 0; i < srcLen1; i++ )
- {
- if(j >= srcLen2 )
- {
- j = 0;
- }
-
- aDestination.Append(aSource1[i] ^ aSource2[j++]);
- }
- }
+ aDestination.Append(aSource1[i] ^ aSource2[j++]);
+ }
+ }
-
//0x18,0x32,0x34,0x55,0x55,0x34,0x32,0x18
-void FormSaltKey(TDes8& aDestination,const TDesC8& aSource)
- {
- TBuf8<2> seachText(_L8("0x"));
- aDestination.Zero();
- TBuf8<KMaxSaltLength> tempSaltBuffer(aSource);
- TUint32 hexNumber;
- TBuf<2> decNumber;
- TInt offSet = tempSaltBuffer.Find(seachText);
-
- while(offSet != KErrNotFound)
- {
- offSet+=2;
- decNumber.Copy(tempSaltBuffer.Mid(offSet,2));
- tempSaltBuffer.Copy(tempSaltBuffer.Mid(offSet+2));
- TLex lex(decNumber);
- lex.Val(hexNumber,EHex);
- aDestination.Append(hexNumber);
- offSet = tempSaltBuffer.Find(seachText);
- }
- }
-
+void FormSaltKey(TDes8& aDestination, const TDesC8& aSource)
+ {
+ TBuf8<2> seachText(_L8("0x"));
+ aDestination.Zero();
+ TBuf8<KMaxSaltLength> tempSaltBuffer(aSource);
+ TUint32 hexNumber;
+ TBuf<2> decNumber;
+ TInt offSet = tempSaltBuffer.Find(seachText);
+
+ while (offSet != KErrNotFound)
+ {
+ offSet += 2;
+ decNumber.Copy(tempSaltBuffer.Mid(offSet, 2));
+ tempSaltBuffer.Copy(tempSaltBuffer.Mid(offSet + 2));
+ TLex lex(decNumber);
+ lex.Val(hexNumber, EHex);
+ aDestination.Append(hexNumber);
+ offSet = tempSaltBuffer.Find(seachText);
+ }
+ }
+
//void get_key(unsigned char key[],unsigned int keylength);
-void derive_key(const unsigned char pwd[], /* the PASSWORD */
- unsigned int pwd_len, /* and its length */
- const unsigned char salt[], /* the SALT and its */
- unsigned int salt_len, /* length */
- unsigned int iter, /* the number of iterations */
- unsigned char key[], /* space for the output key */
- unsigned int key_len);/* and its required length */
-
-
-
+void derive_key(const unsigned char pwd[], /* the PASSWORD */
+unsigned int pwd_len, /* and its length */
+const unsigned char salt[], /* the SALT and its */
+unsigned int salt_len, /* length */
+unsigned int iter, /* the number of iterations */
+unsigned char key[], /* space for the output key */
+unsigned int key_len);/* and its required length */
// ============================ MEMBER FUNCTIONS ===============================
-CSuplConnection::CSuplConnection(RSocketServ &aSocketServ):
- CActive(EPriorityStandard),
- iSocketServ(aSocketServ),
- iRefCount(0),
- iState(ENotConnected),
- iPacket(0,0),
- iVariantEnabled(ETrue),
- iPskTLSUsage(EFalse),
- iStartedListen(EFalse),
- iConnectStarted(EFalse),
- iSendInProgress(EFalse),
- iFirstPkt(EFalse),
- iListenCount(0)
+CSuplConnection::CSuplConnection(RSocketServ &aSocketServ) :
+ CActive(EPriorityStandard), iSocketServ(aSocketServ), iRefCount(0),
+ iState(ENotConnected), iPacket(0, 0), iVariantEnabled(ETrue),
+ iPskTLSUsage(EFalse), iStartedListen(EFalse), iConnectStarted(
+ EFalse), iSendInProgress(EFalse), iFirstPkt(EFalse),
+ iListenCount(0), iPrompt(EFalse), iWlanOnly(EFalse)
{
iHostAddress.Zero();
CActiveScheduler::Add(this);
}
-void CSuplConnection::ConstructL(const TDesC &aHostAddress, const TUint aPort,
- const TInt aIAPId,
- MSuplPacketNotifier *aNotifier)
+void CSuplConnection::ConstructL(const TDesC &aHostAddress,
+ const TUint aPort, const TInt aIAPId, MSuplPacketNotifier *aNotifier)
{
-
+
iTrace = CSuplConnTrace::NewL();
-
+
iTrace->Trace(_L("CSuplConnection::ConstructL"), KTraceFileName, __LINE__);
SetVariation();
iHostAddress.Append(aHostAddress);
iPort = aPort;
iIAPId = aIAPId;
-
+
// Create the Secure Socket
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("Using CSuplConnection::Secure Construction"), KTraceFileName, __LINE__);
- _LIT(KTLS1,"TLS1.0");
- iTlsSocket = CSecureSocket::NewL( iSocket, KTLS1 );
-
- TBuf8<KMaxHostAddressLen> dNSName;
- dNSName.Copy(aHostAddress);
- iTlsSocket->SetOpt(KSoSSLDomainName,KSolInetSSL,dNSName);
-
- if(iPskTLSUsage)
- {
- iTrace->Trace(_L("Considering PSK Ciphersuites for Usage..."), KTraceFileName, __LINE__);
+ if (iVariantEnabled)
+ {
+ iTrace->Trace(_L("Using CSuplConnection::Secure Construction"),
+ KTraceFileName, __LINE__);
+ _LIT(KTLS1, "TLS1.0");
+ iTlsSocket = CSecureSocket::NewL(iSocket, KTLS1);
+
+ TBuf8<KMaxHostAddressLen> dNSName;
+ dNSName.Copy(aHostAddress);
+ iTlsSocket->SetOpt(KSoSSLDomainName, KSolInetSSL, dNSName);
+
+ if (iPskTLSUsage)
+ {
+ iTrace->Trace(_L("Considering PSK Ciphersuites for Usage..."),
+ KTraceFileName, __LINE__);
+
+ // PSK TLS Start
+ TPckgBuf<MSoPskKeyHandler *> pskConfigPkg;
+ pskConfigPkg() = this;
+ User::LeaveIfError(iTlsSocket->SetOpt(KSoPskConfig, KSolInetSSL,
+ pskConfigPkg));
+ // PSK TLS End
+ }
- // PSK TLS Start
- TPckgBuf<MSoPskKeyHandler *> pskConfigPkg;
- pskConfigPkg() = this;
- User::LeaveIfError(iTlsSocket->SetOpt(KSoPskConfig, KSolInetSSL, pskConfigPkg));
- // PSK TLS End
- }
-
- iTlsSocket->SetDialogMode(EDialogModeUnattended);
-
- iSocketReader = CSuplSocketReader::NewL(iTlsSocket, aNotifier, iVariantEnabled);
- }
- else
- {
- iTrace->Trace(_L("Using CSuplConnection::NonSecure Construction"), KTraceFileName, __LINE__);
- iSocketReader = CSuplSocketReader::NewL(iSocket, aNotifier, iVariantEnabled);
- }
+ iTlsSocket->SetDialogMode(EDialogModeUnattended);
+
+ iSocketReader = CSuplSocketReader::NewL(iTlsSocket, aNotifier,
+ iVariantEnabled);
+ }
+ else
+ {
+ iTrace->Trace(_L("Using CSuplConnection::NonSecure Construction"),
+ KTraceFileName, __LINE__);
+ iSocketReader = CSuplSocketReader::NewL(iSocket, aNotifier,
+ iVariantEnabled);
+ }
iTimer = CSuplSocketTimer::NewL(this);
-
- if(iPskTLSUsage)
- {
- // PSK TLS Start
- #if WITH_GBA_OFFF
- iGbaClient = CGbaClientRequestHandler::NewL();
- #endif /* WITH_GBA */
- // PSK TLS End
- }
-
+ if (iPskTLSUsage)
+ {
+ // PSK TLS Start
+#if WITH_GBA_OFFF
+ iGbaClient = CGbaClientRequestHandler::NewL();
+#endif /* WITH_GBA */
+ // PSK TLS End
+ }
+
iConnArray.Reset();
-
+
iPktArray.Reset();
-
+
}
// -----------------------------------------------------------------------------
// CSuplConnection::ConstructL
@@ -211,14 +203,13 @@
// -----------------------------------------------------------------------------
//
//-------------------------------------------------------------------------------------------------------------
-void CSuplConnection::ConstructL(const TDesC &aHostAddress, const TUint aPort,
- const TInt aIAPId,
- TBool aTls, TBool aPskTls,
- MSuplPacketNotifier *aNotifier)
+void CSuplConnection::ConstructL(const TDesC &aHostAddress,
+ const TUint aPort, const TInt aIAPId, TBool aTls, TBool aPskTls,
+ MSuplPacketNotifier *aNotifier)
{
-
+
iTrace = CSuplConnTrace::NewL();
-
+
iTrace->Trace(_L("CSuplConnection::ConstructL"), KTraceFileName, __LINE__);
//SetVariation();
iVariantEnabled = aTls;
@@ -226,83 +217,88 @@
iHostAddress.Append(aHostAddress);
iPort = aPort;
iIAPId = aIAPId;
-
+
// Create the Secure Socket
- if(iVariantEnabled)
+ if (iVariantEnabled)
{
- iTrace->Trace(_L("Using CSuplConnection::Secure Construction"), KTraceFileName, __LINE__);
- _LIT(KTLS1,"TLS1.0");
- iTlsSocket = CSecureSocket::NewL( iSocket, KTLS1 );
-
+ iTrace->Trace(_L("Using CSuplConnection::Secure Construction"),
+ KTraceFileName, __LINE__);
+ _LIT(KTLS1, "TLS1.0");
+ iTlsSocket = CSecureSocket::NewL(iSocket, KTLS1);
+
TBuf8<KMaxHostAddressLen> dNSName;
dNSName.Copy(aHostAddress);
- iTlsSocket->SetOpt(KSoSSLDomainName,KSolInetSSL,dNSName);
-
- if(iPskTLSUsage)
- {
- iTrace->Trace(_L("Considering PSK Ciphersuites for Usage..."), KTraceFileName, __LINE__);
- // PSK TLS Start
- TPckgBuf<MSoPskKeyHandler *> pskConfigPkg;
- pskConfigPkg() = this;
- User::LeaveIfError(iTlsSocket->SetOpt(KSoPskConfig, KSolInetSSL, pskConfigPkg));
- // PSK TLS End
- }
-
+ iTlsSocket->SetOpt(KSoSSLDomainName, KSolInetSSL, dNSName);
+
+ if (iPskTLSUsage)
+ {
+ iTrace->Trace(_L("Considering PSK Ciphersuites for Usage..."),
+ KTraceFileName, __LINE__);
+ // PSK TLS Start
+ TPckgBuf<MSoPskKeyHandler *> pskConfigPkg;
+ pskConfigPkg() = this;
+ User::LeaveIfError(iTlsSocket->SetOpt(KSoPskConfig, KSolInetSSL,
+ pskConfigPkg));
+ // PSK TLS End
+ }
+
iTlsSocket->SetDialogMode(EDialogModeUnattended);
-
- iSocketReader = CSuplSocketReader::NewL(iTlsSocket, aNotifier, iVariantEnabled);
+
+ iSocketReader = CSuplSocketReader::NewL(iTlsSocket, aNotifier,
+ iVariantEnabled);
}
else
{
- iTrace->Trace(_L("Using CSuplConnection::NonSecure Construction"), KTraceFileName, __LINE__);
- iSocketReader = CSuplSocketReader::NewL(iSocket, aNotifier, iVariantEnabled);
+ iTrace->Trace(_L("Using CSuplConnection::NonSecure Construction"),
+ KTraceFileName, __LINE__);
+ iSocketReader = CSuplSocketReader::NewL(iSocket, aNotifier,
+ iVariantEnabled);
}
iTimer = CSuplSocketTimer::NewL(this);
-
- if(iPskTLSUsage)
- {
- // PSK TLS Start
- #if WITH_GBA_OFFF
- iGbaClient = CGbaClientRequestHandler::NewL();
- #endif /* WITH_GBA */
- // PSK TLS End
- }
-
+
+ if (iPskTLSUsage)
+ {
+ // PSK TLS Start
+#if WITH_GBA_OFFF
+ iGbaClient = CGbaClientRequestHandler::NewL();
+#endif /* WITH_GBA */
+ // PSK TLS End
+ }
+
iConnArray.Reset();
-
+
iPktArray.Reset();
-
+
}
-CSuplConnection* CSuplConnection::NewL(RSocketServ &aSocketServ, const TDesC &aHostAddress,
- const TUint aPort,const TInt aIAPId,
- MSuplPacketNotifier *aNotifier)
+CSuplConnection* CSuplConnection::NewL(RSocketServ &aSocketServ,
+ const TDesC &aHostAddress, const TUint aPort, const TInt aIAPId,
+ MSuplPacketNotifier *aNotifier)
{
- CSuplConnection* self = new( ELeave ) CSuplConnection(aSocketServ);
-
- CleanupStack::PushL( self );
- self->ConstructL(aHostAddress, aPort,aIAPId, aNotifier);
+ CSuplConnection* self = new (ELeave) CSuplConnection(aSocketServ);
+
+ CleanupStack::PushL(self);
+ self->ConstructL(aHostAddress, aPort, aIAPId, aNotifier);
CleanupStack::Pop();
return self;
}
-
- // --------------------------------------------ADDED NEWL TAKING TLS ALSO-------------------------------------
+
+// --------------------------------------------ADDED NEWL TAKING TLS ALSO-------------------------------------
// -----------------------------------------------------------------------------
// CSuplConnection::NewL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-CSuplConnection* CSuplConnection::NewL(RSocketServ &aSocketServ, const TDesC &aHostAddress,
- const TUint aPort,const TInt aIAPId,
- TBool aTls, TBool aPskTls,
- MSuplPacketNotifier *aNotifier)
+CSuplConnection* CSuplConnection::NewL(RSocketServ &aSocketServ,
+ const TDesC &aHostAddress, const TUint aPort, const TInt aIAPId,
+ TBool aTls, TBool aPskTls, MSuplPacketNotifier *aNotifier)
{
- CSuplConnection* self = new( ELeave ) CSuplConnection(aSocketServ);
-
- CleanupStack::PushL( self );
- self->ConstructL(aHostAddress, aPort,aIAPId, aTls, aPskTls, aNotifier);
+ CSuplConnection* self = new (ELeave) CSuplConnection(aSocketServ);
+
+ CleanupStack::PushL(self);
+ self->ConstructL(aHostAddress, aPort, aIAPId, aTls, aPskTls, aNotifier);
CleanupStack::Pop();
return self;
@@ -310,59 +306,68 @@
//------------------------------------------------------------------------------------------------------------
CSuplConnection::~CSuplConnection()
{
-
+
// Log
- if(iTrace)
- {
- iTrace->Trace(_L("CSuplConnection::Destructor"), KTraceFileName, __LINE__);
-
- iTrace->Trace(_L("CSuplConnection::Destructor...Cancelling "), KTraceFileName, __LINE__);
- }
+ if (iTrace)
+ {
+ iTrace->Trace(_L("CSuplConnection::Destructor"), KTraceFileName,
+ __LINE__);
+
+ iTrace->Trace(_L("CSuplConnection::Destructor...Cancelling "),
+ KTraceFileName, __LINE__);
+ }
// Cancel Any outstanding request
Cancel();
-
- iTrace->Trace(_L("CSuplConnection::Destructor...Deleting Socket Reader"), KTraceFileName, __LINE__);
+
+ iTrace->Trace(_L("CSuplConnection::Destructor...Deleting Socket Reader"),
+ KTraceFileName, __LINE__);
//Delete the Socket Reader
delete iSocketReader;
-
+
// Close the resolver if required
- if(iState == ELookingUp)
- {
- if(iTrace)
- iTrace->Trace(_L("CSuplConnection::Destructor...Closing Resolver"), KTraceFileName, __LINE__);
- iResolver.Close();
- }
- if(iTrace)
- iTrace->Trace(_L("CSuplConnection::Destructor...Deleting Secure Socket"), KTraceFileName, __LINE__);
+ if (iState == ELookingUp)
+ {
+ if (iTrace)
+ iTrace->Trace(
+ _L("CSuplConnection::Destructor...Closing Resolver"),
+ KTraceFileName, __LINE__);
+ iResolver.Close();
+ }
+ if (iTrace)
+ iTrace->Trace(_L(
+ "CSuplConnection::Destructor...Deleting Secure Socket"),
+ KTraceFileName, __LINE__);
// Delete the TLS Socket
delete iTlsSocket;
-
+
// Close the Socket if required
- if(iState == EConnected || iState == EConnecting)
- {
- iTrace->Trace(_L("CSuplConnection::Destructor...Closing Socket"), KTraceFileName, __LINE__);
- iSocket.Close();
- }
-
+ if (iState == EConnected || iState == EConnecting)
+ {
+ iTrace->Trace(_L("CSuplConnection::Destructor...Closing Socket"),
+ KTraceFileName, __LINE__);
+ iSocket.Close();
+ }
+
#ifndef __WINS__
// Close the RConnection
if(iTrace)
iTrace->Trace(_L("CSuplConnection::Destructor...Closing RConnection"), KTraceFileName, __LINE__);
iConnection.Close();
#endif
- if(iTrace)
- iTrace->Trace(_L("CSuplConnection::Destructor...Deleting Timer"), KTraceFileName, __LINE__);
+ if (iTrace)
+ iTrace->Trace(_L("CSuplConnection::Destructor...Deleting Timer"),
+ KTraceFileName, __LINE__);
// Delete timer
delete iTimer;
-// PSK TLS Start
+ // PSK TLS Start
#if WITH_GBA_OFFF
delete iGbaClient;
#endif /* WITH_GBA */
-// PSK TLS End
-
+ // PSK TLS End
+
iConnArray.Close();
- // Delete Trace
+ // Delete Trace
delete iTrace;
iPktArray.Close();
@@ -377,173 +382,195 @@
//
void CSuplConnection::RunL()
{
-
+
// Log
TBuf<64> msg(_L("CSuplConnection::RunL: State is "));
msg.AppendNum(iState);
msg.Append(_L(" iStatus is "));
msg.AppendNum(iStatus.Int());
- iTrace->Trace(msg, KTraceFileName, __LINE__);
-
- switch(iState)
- {
- case ERetriveIAP:
- {
- iTrace->Trace(_L("CSuplConnection::ERetriveIAP"), KTraceFileName, __LINE__);
- if(iStatus.Int() == KErrNone)
- {
- ConnectIAP();
- }
- else
- {
- iTrace->Trace(_L("Error in Retriving IAP Id... "), KTraceFileName, __LINE__);
- iConnection.Close();
- iTrace->Trace(_L("iConnection.Close();... "), KTraceFileName, __LINE__);
- //User::RequestComplete(iReqStatus, iStatus.Int());
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
+
+ switch (iState)
+ {
+ case ERetriveIAP:
+ {
+ iTrace->Trace(_L("CSuplConnection::ERetriveIAP"), KTraceFileName,
+ __LINE__);
+ if (iStatus.Int() == KErrNone)
+ {
+ ConnectIAP();
+ }
+ else
+ {
+ iTrace->Trace(_L("Error in Retriving IAP Id... "),
+ KTraceFileName, __LINE__);
+ iConnection.Close();
+ iTrace->Trace(_L("iConnection.Close();... "), KTraceFileName,
+ __LINE__);
+ //User::RequestComplete(iReqStatus, iStatus.Int());
+ CompleteConnectRequests(iStatus.Int());
+ }
+ break;
+ }
+ // Socket Connect has completed
+ case EConnecting:
+ iTimer->Cancel(); // Valid SUPL server, Cancel timer started for this purpose
+ if (iStatus == KErrNone)
+ {
+ if (iVariantEnabled)
+ {
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::RunL Making Secure Connection"),
+ KTraceFileName, __LINE__);
+ iState = EMakingSecureConn;
+
+ MakeSecureConnection();
+ }
+ else
+ {
+ // Log
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::RunL Non Secure Socket Connection Established"),
+ KTraceFileName, __LINE__);
+ // Change State
+ iState = EConnected;
+ //User::RequestComplete(iReqStatus, iStatus.Int());
CompleteConnectRequests(iStatus.Int());
- }
- break;
- }
- // Socket Connect has completed
- case EConnecting:
- iTimer->Cancel(); // Valid SUPL server, Cancel timer started for this purpose
- if(iStatus == KErrNone)
- {
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::RunL Making Secure Connection"), KTraceFileName, __LINE__);
- iState = EMakingSecureConn;
-
- MakeSecureConnection();
- }
- else
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL Non Secure Socket Connection Established"), KTraceFileName, __LINE__);
- // Change State
- iState = EConnected;
- //User::RequestComplete(iReqStatus, iStatus.Int());
- CompleteConnectRequests(iStatus.Int());
- }
- }
- else
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL Socket Connection Failed"), KTraceFileName, __LINE__);
-
- iState = EFailure;
- iSocket.Close();
- #ifndef __WINS__ // Bug Fix for close connection
- // Close the RConnection
- iConnection.Close();
- #endif
- //User::RequestComplete(iReqStatus, iStatus.Int());
+ }
+ }
+ else
+ {
+ // Log
+ iTrace->Trace(_L(
+ "CSuplConnection::RunL Socket Connection Failed"),
+ KTraceFileName, __LINE__);
+
+ iState = EFailure;
+ iSocket.Close();
+#ifndef __WINS__ // Bug Fix for close connection
+ // Close the RConnection
+ iConnection.Close();
+#endif
+ //User::RequestComplete(iReqStatus, iStatus.Int());
CompleteConnectRequests(iStatus.Int());
- iTrace->Trace(_L("CSuplConnection::SocketConn Failed Exit"), KTraceFileName, __LINE__);
- }
- break;
-
- // Secure Connection
- case ESecureHandShake:
+ iTrace->Trace(_L("CSuplConnection::SocketConn Failed Exit"),
+ KTraceFileName, __LINE__);
+ }
+ break;
+
+ // Secure Connection
+ case ESecureHandShake:
// Stop timer
iTimer->Cancel();
- if(iStatus != KErrNone)
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL Secure Connection Failed"), KTraceFileName, __LINE__);
-
- // Connection was not successful
- iState = EFailure;
- iSocket.Close();
- #ifndef __WINS__ // Bug Fix for close connection
- // Close the RConnection
- iConnection.Close();
- #endif
- }
- else
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL Secure Connection Established"), KTraceFileName, __LINE__);
- // Change State
- iState = EConnected;
- }
-
- //User::RequestComplete(iReqStatus, iStatus.Int());
+ if (iStatus != KErrNone)
+ {
+ // Log
+ iTrace->Trace(_L(
+ "CSuplConnection::RunL Secure Connection Failed"),
+ KTraceFileName, __LINE__);
+
+ // Connection was not successful
+ iState = EFailure;
+ iSocket.Close();
+#ifndef __WINS__ // Bug Fix for close connection
+ // Close the RConnection
+ iConnection.Close();
+#endif
+ }
+ else
+ {
+ // Log
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::RunL Secure Connection Established"),
+ KTraceFileName, __LINE__);
+ // Change State
+ iState = EConnected;
+ }
+
+ //User::RequestComplete(iReqStatus, iStatus.Int());
CompleteConnectRequests(iStatus.Int());
- break;
-
- // DNS Lookup has completed
- case ELookingUp:
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Complete"), KTraceFileName, __LINE__);
+ break;
+
+ // DNS Lookup has completed
+ case ELookingUp:
+ {
+ // Log
+ iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Complete"),
+ KTraceFileName, __LINE__);
iTimer->Cancel();
-
- // Close the Resolver
- iResolver.Close();
-
- if(iStatus != KErrNone)
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Failed"), KTraceFileName, __LINE__);
-
- iState = EFailure;
- iSocket.Close();
- #ifndef __WINS__ // Bug Fix for close connection
- // Close the RConnection
- iConnection.Close();
- #endif
+
+ // Close the Resolver
+ iResolver.Close();
- //User::RequestComplete(iReqStatus, iStatus.Int());
+ if (iStatus != KErrNone)
+ {
+ // Log
+ iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Failed"),
+ KTraceFileName, __LINE__);
+
+ iState = EFailure;
+ iSocket.Close();
+#ifndef __WINS__ // Bug Fix for close connection
+ // Close the RConnection
+ iConnection.Close();
+#endif
+
+ //User::RequestComplete(iReqStatus, iStatus.Int());
CompleteConnectRequests(iStatus.Int());
- break;
- }
-
- // Log
- iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Successful"), KTraceFileName, __LINE__);
-
- // Retrieve Address
- TInt addrFamily = iNameEntry().iAddr.Family();
- if(addrFamily == KAfInet)
- {
- //IPv4 Address
- iAddress.SetAddress(TInetAddr::Cast(iNameEntry().iAddr).Address());
-
- }
- if(addrFamily == KAfInet6)
- {
- //IPv6 Address
- iAddress.SetAddress(TInetAddr::Cast(iNameEntry().iAddr).Ip6Address());
- }
-
- // Set Port
- iAddress.SetPort(Port());
-
- // Connect to Remote Host
- Connect();
-
- break;
- }
- default:
- {
- if (iSendInProgress)
- {
- if (iPkt)
- iPkt->CompleteRequest(iStatus.Int());
- CheckForOutstandingPackets();
- }
- else
- {
- iState = EFailure;
- //User::RequestComplete(iReqStatus, KErrGeneral);
- CompleteConnectRequests(KErrGeneral);
- }
- break;
- }
-
- }
+ break;
+ }
+
+ // Log
+ iTrace->Trace(_L("CSuplConnection::RunL DNS Lookup Successful"),
+ KTraceFileName, __LINE__);
+
+ // Retrieve Address
+ TInt addrFamily = iNameEntry().iAddr.Family();
+ if (addrFamily == KAfInet)
+ {
+ //IPv4 Address
+ iAddress.SetAddress(
+ TInetAddr::Cast(iNameEntry().iAddr).Address());
+
+ }
+ if (addrFamily == KAfInet6)
+ {
+ //IPv6 Address
+ iAddress.SetAddress(
+ TInetAddr::Cast(iNameEntry().iAddr).Ip6Address());
+ }
+
+ // Set Port
+ iAddress.SetPort(Port());
+
+ // Connect to Remote Host
+ Connect();
+
+ break;
+ }
+ default:
+ {
+ if (iSendInProgress)
+ {
+ if (iPkt)
+ iPkt->CompleteRequest(iStatus.Int());
+ CheckForOutstandingPackets();
+ }
+ else
+ {
+ iState = EFailure;
+ //User::RequestComplete(iReqStatus, KErrGeneral);
+ CompleteConnectRequests( KErrGeneral);
+ }
+ break;
+ }
+
+ }
}
-
+
// -----------------------------------------------------------------------------
// CSuplConnection::CheckForOutstandingPackets
// Checks for outstanding packets in the send queue
@@ -552,46 +579,52 @@
// -----------------------------------------------------------------------------
//
void CSuplConnection::CheckForOutstandingPackets()
- {
- if (iFirstPkt)
- {
- iFirstPkt = EFalse;
- }
- TInt index = iPktArray.Find(iPkt);
- if (index != KErrNotFound)
- iPktArray.Remove(index);
- delete iPkt;
-
- TInt count = iPktArray.Count();
- if (count == 0)
- {
- iSendInProgress = EFalse;
- }
- else
- {
- iPkt = REINTERPRET_CAST(CSuplPacketInfo*, iPktArray[0]);
- iPkt->GetPacketData(iPacket);
-
+ {
+ if (iFirstPkt)
+ {
+ iFirstPkt = EFalse;
+ }
+ TInt index = iPktArray.Find(iPkt);
+ if (index != KErrNotFound)
+ iPktArray.Remove(index);
+ delete iPkt;
+
+ TInt count = iPktArray.Count();
+ if (count == 0)
+ {
+ iSendInProgress = EFalse;
+ }
+ else
+ {
+ iPkt = REINTERPRET_CAST(CSuplPacketInfo*, iPktArray[0]);
+ iPkt->GetPacketData(iPacket);
+
TBuf<64> msg(_L("Sending data on port "));
msg.AppendNum(iSocket.LocalPort());
- iTrace->Trace(msg, KTraceFileName, __LINE__);
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
- // Log
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::CheckForOutstandingPackets sending packet over Secure Connection"), KTraceFileName, __LINE__);
- iTlsSocket->Send(iPacket, iStatus);
- iSendInProgress = ETrue;
- SetActive();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::CheckForOutstandingPackets sending packet over NonSecure Connection"), KTraceFileName, __LINE__);
- iSocket.Send(iPacket, 0, iStatus);
- iSendInProgress = ETrue;
- SetActive();
- }
- }
+ // Log
+ if (iVariantEnabled)
+ {
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::CheckForOutstandingPackets sending packet over Secure Connection"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->Send(iPacket, iStatus);
+ iSendInProgress = ETrue;
+ SetActive();
+ }
+ else
+ {
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::CheckForOutstandingPackets sending packet over NonSecure Connection"),
+ KTraceFileName, __LINE__);
+ iSocket.Send(iPacket, 0, iStatus);
+ iSendInProgress = ETrue;
+ SetActive();
+ }
+ }
}
// -----------------------------------------------------------------------------
@@ -603,68 +636,70 @@
EXPORT_C void CSuplConnection::CancelConnect(TRequestStatus &aStatus)
{
- // Log
- iTrace->Trace(_L("CSuplConnection::CancelConnect"), KTraceFileName, __LINE__);
- iTimer->Cancel(); // Cancel all timers
- if (iConnArray.Count() > 1)
- {
- CompleteConnectCancel(aStatus);
- return;
- }
+ // Log
+ iTrace->Trace(_L("CSuplConnection::CancelConnect"), KTraceFileName,
+ __LINE__);
+ iTimer->Cancel(); // Cancel all timers
+ if (iConnArray.Count() > 1)
+ {
+ CompleteConnectCancel(aStatus);
+ return;
+ }
- TBuf<64> buff;
- //buff.Copy(_L("iState = "));
- buff.AppendNum(iState);
- iTrace->Trace(buff, KTraceFileName, __LINE__);
-
-
- switch(iState)
- {
- case ERetriveIAP:
- {
+ TBuf<64> buff;
+ //buff.Copy(_L("iState = "));
+ buff.AppendNum(iState);
+ iTrace->Trace(buff, KTraceFileName, __LINE__);
+
+ switch (iState)
+ {
+ case ERetriveIAP:
+ {
#ifndef __WINS__
- //iConnection.Stop();
- //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
- // Close is working fine at this place..
- iConnection.Close();
+ //iConnection.Stop();
+ //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
+ // Close is working fine at this place..
+ iConnection.Close();
#endif
- break;
- }
- case ESecureHandShake:
- {
- iTlsSocket->CancelHandshake();
- break;
- }
- case ELookingUp:
+ break;
+ }
+ case ESecureHandShake:
+ {
+ iTlsSocket->CancelHandshake();
+ break;
+ }
+ case ELookingUp:
+ {
+ iResolver.Cancel();
+ break;
+ }
+ default:
+ {
+ if (iVariantEnabled)
{
- iResolver.Cancel();
- break;
- }
- default:
- {
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::Secure DoCancel"), KTraceFileName, __LINE__);
- iTlsSocket->CancelAll();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"), KTraceFileName, __LINE__);
- iSocket.CancelAll();
- }
- break;
- }
- }
- if(!(iState == ENotConnected || iState == ERetriveIAP))
- {
- iSocket.CancelAll();
- }
+ iTrace->Trace(_L("CSuplConnection::Secure DoCancel"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->CancelAll();
+ }
+ else
+ {
+ iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"),
+ KTraceFileName, __LINE__);
+ iSocket.CancelAll();
+ }
+ break;
+ }
+ }
+ if (!(iState == ENotConnected || iState == ERetriveIAP))
+ {
+ iSocket.CancelAll();
+ }
- CompleteConnectCancel(aStatus);
- //TRequestStatus *reqStatus = &aStatus;
- //User::RequestComplete(reqStatus, KErrNone);
-
- }
+ CompleteConnectCancel(aStatus);
+ //TRequestStatus *reqStatus = &aStatus;
+ //User::RequestComplete(reqStatus, KErrNone);
+
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::DoCancel
// This is the method to cancel any request
@@ -673,65 +708,67 @@
//
void CSuplConnection::DoCancel()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::DoCancel"), KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::DoCancel"), KTraceFileName, __LINE__);
+
+ TBuf<64> buff;
+ buff.Copy(_L("iState = "));
+ buff.AppendNum(iState);
+ iTrace->Trace(buff, KTraceFileName, __LINE__);
- TBuf<64> buff;
- buff.Copy(_L("iState = "));
- buff.AppendNum(iState);
- iTrace->Trace(buff, KTraceFileName, __LINE__);
-
- if(!(iState == ENotConnected || iState == ERetriveIAP))
- {
- iSocket.CancelAll();
- }
-
- switch(iState)
- {
- case ERetriveIAP:
- {
+ if (!(iState == ENotConnected || iState == ERetriveIAP))
+ {
+ iSocket.CancelAll();
+ }
+
+ switch (iState)
+ {
+ case ERetriveIAP:
+ {
#ifndef __WINS__
- //iConnection.Stop();
- //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
- // Close is working fine at this place..
- iConnection.Close();
+ //iConnection.Stop();
+ //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
+ // Close is working fine at this place..
+ iConnection.Close();
#endif
- break;
- }
- case ESecureHandShake:
- {
- iTlsSocket->CancelHandshake();
- break;
- }
- case ELookingUp:
+ break;
+ }
+ case ESecureHandShake:
+ {
+ iTlsSocket->CancelHandshake();
+ break;
+ }
+ case ELookingUp:
+ {
+ iResolver.Cancel();
+ break;
+ }
+ default:
+ {
+ if (iVariantEnabled)
{
- iResolver.Cancel();
- break;
- }
- default:
- {
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::Secure DoCancel"), KTraceFileName, __LINE__);
- iTlsSocket->CancelAll();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"), KTraceFileName, __LINE__);
- iSocket.CancelAll();
- }
- break;
- }
- }
+ iTrace->Trace(_L("CSuplConnection::Secure DoCancel"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->CancelAll();
+ }
+ else
+ {
+ iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"),
+ KTraceFileName, __LINE__);
+ iSocket.CancelAll();
+ }
+ break;
+ }
+ }
#if 0
- if(iReqStatus)
- {
- User::RequestComplete(iReqStatus, KErrCancel);
- }
+ if(iReqStatus)
+ {
+ User::RequestComplete(iReqStatus, KErrCancel);
+ }
#endif
- CompleteConnectRequests(KErrCancel);
- return;
+ CompleteConnectRequests( KErrCancel);
+ return;
}
// -----------------------------------------------------------------------------
@@ -742,78 +779,80 @@
//
void CSuplConnection::TimerExpired()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::TimerExpired"), KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::TimerExpired"), KTraceFileName,
+ __LINE__);
+
+ TBuf<64> buff;
+ buff.Copy(_L("iState = "));
+ buff.AppendNum(iState);
+ iTrace->Trace(buff, KTraceFileName, __LINE__);
- TBuf<64> buff;
- buff.Copy(_L("iState = "));
- buff.AppendNum(iState);
- iTrace->Trace(buff, KTraceFileName, __LINE__);
-
- if(!(iState == ENotConnected || iState == ERetriveIAP))
- {
- iSocket.CancelAll();
- }
-
- switch(iState)
- {
- case ERetriveIAP:
- {
+ if (!(iState == ENotConnected || iState == ERetriveIAP))
+ {
+ iSocket.CancelAll();
+ }
+
+ switch (iState)
+ {
+ case ERetriveIAP:
+ {
#ifndef __WINS__
- //iConnection.Stop();
- //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
- // Close is working fine at this place..
- iConnection.Close();
+ //iConnection.Stop();
+ //Earlier it was Stop()... but somehow functionality was not working after week 26..phone was restarting...Manish
+ // Close is working fine at this place..
+ iConnection.Close();
#endif
- break;
- }
- case ESecureHandShake:
- {
- iTlsSocket->CancelHandshake();
- break;
- }
- case ELookingUp:
+ break;
+ }
+ case ESecureHandShake:
+ {
+ iTlsSocket->CancelHandshake();
+ break;
+ }
+ case ELookingUp:
+ {
+ iResolver.Cancel();
+ break;
+ }
+ case EConnecting:
+ {
+ iState = EFailure;
+ iSocket.Close();
+#ifndef __WINS__ // Bug Fix for close connection
+ // Close the RConnection
+ iConnection.Close();
+#endif
+ break;
+ }
+ default:
+ {
+ if (iVariantEnabled)
{
- iResolver.Cancel();
- break;
- }
- case EConnecting:
- {
- iState = EFailure;
- iSocket.Close();
- #ifndef __WINS__ // Bug Fix for close connection
- // Close the RConnection
- iConnection.Close();
- #endif
- break;
- }
- default:
- {
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::Secure DoCancel"), KTraceFileName, __LINE__);
- iTlsSocket->CancelAll();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"), KTraceFileName, __LINE__);
- iSocket.CancelAll();
- }
- break;
- }
- }
+ iTrace->Trace(_L("CSuplConnection::Secure DoCancel"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->CancelAll();
+ }
+ else
+ {
+ iTrace->Trace(_L("CSuplConnection::NonSecure DoCancel"),
+ KTraceFileName, __LINE__);
+ iSocket.CancelAll();
+ }
+ break;
+ }
+ }
#if 0
- if(iReqStatus)
- {
- User::RequestComplete(iReqStatus, KErrCancel);
- }
+ if(iReqStatus)
+ {
+ User::RequestComplete(iReqStatus, KErrCancel);
+ }
#endif
- CompleteConnectRequests(KErrSuplTimeout);
- return;
+ CompleteConnectRequests( KErrSuplTimeout);
+ return;
}
-
// -----------------------------------------------------------------------------
// CSuplConnection::Destroy
// This is the method through which the SUPL Connection
@@ -827,11 +866,10 @@
{
// Log
iTrace->Trace(_L("CSuplConnection::Destroy"), KTraceFileName, __LINE__);
-
+
delete this;
}
-
// -----------------------------------------------------------------------------
// CSuplConnection::RefCount
// Returns the reference count
@@ -842,7 +880,7 @@
{
// Log
iTrace->Trace(_L("CSuplConnection::RefCount"), KTraceFileName, __LINE__);
-
+
return iRefCount;
}
@@ -855,9 +893,10 @@
void CSuplConnection::IncRefCount()
{
// Log
- iTrace->Trace(_L("CSuplConnection::IncRefCount"), KTraceFileName, __LINE__);
+ iTrace->Trace(_L("CSuplConnection::IncRefCount"), KTraceFileName,
+ __LINE__);
- iRefCount ++;
+ iRefCount++;
}
// -----------------------------------------------------------------------------
@@ -868,13 +907,14 @@
//
void CSuplConnection::DecrRefCount()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::DecrRefCount"), KTraceFileName, __LINE__);
-
- if(iRefCount > 0)
- iRefCount --;
+ // Log
+ iTrace->Trace(_L("CSuplConnection::DecrRefCount"), KTraceFileName,
+ __LINE__);
+
+ if (iRefCount > 0)
+ iRefCount--;
}
-
+
// -----------------------------------------------------------------------------
// CSuplConnection::HosrAddress
// Returns the IPAdress associated with this connection
@@ -884,11 +924,12 @@
const TDesC& CSuplConnection::HostAddress()
{
// Log
- iTrace->Trace(_L("CSuplConnection::HostAddress"), KTraceFileName, __LINE__);
-
+ iTrace->Trace(_L("CSuplConnection::HostAddress"), KTraceFileName,
+ __LINE__);
+
return iHostAddress;
}
-
+
// -----------------------------------------------------------------------------
// CSuplConnection::Port
// Returns the Port associated with this connection
@@ -900,7 +941,6 @@
return iPort;
}
-
// -----------------------------------------------------------------------------
// CSuplConnection::Connect
// Makes a secure connection to Network
@@ -909,57 +949,175 @@
//
EXPORT_C void CSuplConnection::Connect(TRequestStatus &aStatus)
{
-
- // Log
- iTrace->Trace(_L("CSuplConnection::Connect"), KTraceFileName, __LINE__);
+
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect"), KTraceFileName, __LINE__);
- if (iState == EConnected)
- {
- aStatus = KRequestPending;
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrNone);
- iConnectClients++;
- return;
- }
+ if (iState == EConnected)
+ {
+ aStatus = KRequestPending;
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrNone);
+ iConnectClients++;
+ return;
+ }
- // Check if Connect() is started. If started, add status to Q
- //if (iConnectStarted)
+ // Check if Connect() is started. If started, add status to Q
+ //if (iConnectStarted)
+ {
+ aStatus = KRequestPending;
+ TRequestStatus *reqStatus = &aStatus;
+ iConnArray.Append(reqStatus);
+ }
+
+ if (!iConnectStarted)
+ {
+ iTrace->Trace(
+ _L("CSuplConnection::Connect : Connection not started"),
+ KTraceFileName, __LINE__);
+ // Connect only if not already connected
+ if (iState == ENotConnected || iState == EFailure)
{
- aStatus = KRequestPending;
- TRequestStatus *reqStatus = &aStatus;
- iConnArray.Append(reqStatus);
- }
-
- if (!iConnectStarted)
- {
- iTrace->Trace(_L("CSuplConnection::Connect : Connection not started"), KTraceFileName, __LINE__);
- // Connect only if not already connected
- if(iState == ENotConnected || iState == EFailure)
- {
- iTrace->Trace(_L("CSuplConnection::Connect : ENotConnected"), KTraceFileName, __LINE__);
+ iTrace->Trace(_L("CSuplConnection::Connect : ENotConnected"),
+ KTraceFileName, __LINE__);
iConnectStarted = ETrue;
#ifndef __WINS__
- TCommDbConnPref prefs;
- prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
- prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
+ TCommDbConnPref prefs;
+ prefs.SetDialogPreference(ECommDbDialogPrefDoNotPrompt);
+ prefs.SetDirection(ECommDbConnectionDirectionOutgoing);
prefs.SetIapId(iIAPId);
TInt ret = iConnection.Open(iSocketServ);
- // Start an Outgoing Connection with overrides
- iConnection.Start(prefs,iStatus);
- // Set state to ERetriveIAP
- iState = ERetriveIAP;
- SetActive();
+ if( ret != KErrNone )
+ {
+ TRequestStatus* statusPtr = &aStatus;
+ User::RequestComplete( statusPtr,ret );
+ return;
+ }
+ // Start an Outgoing Connection with overrides
+ iConnection.Start(prefs,iStatus);
+ // Set state to ERetriveIAP
+ iState = ERetriveIAP;
+ SetActive();
#else
- ConnectIAP();
+ ConnectIAP();
#endif
- }
- }
- else
- iTrace->Trace(_L("CSuplConnection::Connect : Conn in progress, request queued"), KTraceFileName, __LINE__);
- // Log
- iTrace->Trace(_L("CSuplConnection::Connect:Exit"), KTraceFileName, __LINE__);
+ }
+ }
+ else
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::Connect : Conn in progress, request queued"),
+ KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect:Exit"), KTraceFileName,
+ __LINE__);
+ }
+
+// -----------------------------------------------------------------------------
+// CSuplConnection::Connect
+// Makes a secure connection to Network
+// (other items were commented in a header).
+// -----------------------------------------------------------------------------
+//
+
+EXPORT_C void CSuplConnection::Connect(TRequestStatus &aStatus,
+ TBool aPrompt, TBool aWlanOnly)
+ {
+
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect"), KTraceFileName, __LINE__);
+ iPrompt = aPrompt;
+ iWlanOnly = aWlanOnly;
+
+ aStatus = KRequestPending;
+ TRequestStatus *reqStatus = &aStatus;
+
+ if (iState == EConnected)
+ {
+ User::RequestComplete(reqStatus, KErrNone);
+ iConnectClients++;
+ return;
+ }
+
+ TInt error = iConnArray.Append(reqStatus);
+ if (error != KErrNone)
+ {
+ User::RequestComplete(reqStatus, error);
+ return;
+ }
+
+ if (!iConnectStarted)
+ {
+ iTrace->Trace(
+ _L("CSuplConnection::Connect : Connection not started"),
+ KTraceFileName, __LINE__);
+ // Connect only if not already connected
+ if (iState == ENotConnected || iState == EFailure)
+ {
+ iTrace->Trace(_L("CSuplConnection::Connect : ENotConnected"),
+ KTraceFileName, __LINE__);
+ iConnectStarted = ETrue;
+
+#ifndef __WINS__
+
+ iTrace->Trace(_L("CSuplConnection::Connect ExtendedConnPref"), KTraceFileName, __LINE__);
+
+ TExtendedConnPref OCCPrefs;
+ TConnPrefList prefList;
+
+ if(iWlanOnly)
+ {
+ iTrace->Trace(_L("CSuplConnection::Connect : iWLANOnly used"), KTraceFileName, __LINE__);
+ OCCPrefs.SetBearerSet(TExtendedConnPref::EExtendedConnBearerWLAN);
+ }
+ else
+ {
+ iTrace->Trace(_L("CSuplConnection::Connect OCC GPRS Connection.."), KTraceFileName, __LINE__);
+ OCCPrefs.SetBearerSet(TExtendedConnPref::EExtendedConnBearerCellular);
+ }
+ OCCPrefs.SetSnapPurpose(CMManager::ESnapPurposeInternet);
+
+ if(!iPrompt)
+ {
+ iTrace->Trace(_L("CSuplConnection::Connect : silent connection"), KTraceFileName, __LINE__);
+ OCCPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourConnSilent);
+ }
+ else
+ {
+ iTrace->Trace(_L("CSuplConnection::Connect : Dialog prompt"), KTraceFileName, __LINE__);
+ OCCPrefs.SetNoteBehaviour(TExtendedConnPref::ENoteBehaviourDefault);
+ }
+
+ TRAP_IGNORE(prefList.AppendL(&OCCPrefs));
+
+ TInt ret = iConnection.Open(iSocketServ);
+ if( ret != KErrNone )
+ {
+ TRequestStatus* statusPtr = &iStatus;
+ User::RequestComplete( statusPtr,ret );
+ return;
+ }
+ // Start an Outgoing Connection with overrides
+ iConnection.Start(prefList,iStatus);
+ // Set state to ERetriveIAP
+ iState = ERetriveIAP;
+ SetActive();
+
+#else
+ ConnectIAP();
+#endif
+ }
+ }
+ else
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::Connect : Conn in progress, request queued"),
+ KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect:Exit"), KTraceFileName,
+ __LINE__);
}
// -----------------------------------------------------------------------------
@@ -969,25 +1127,29 @@
// -----------------------------------------------------------------------------
void CSuplConnection::CompleteConnectRequests(TInt aErr)
{
- iTrace->Trace(_L("CSuplConnection::CompleteConnectRequests"), KTraceFileName, __LINE__);
+ iTrace->Trace(_L("CSuplConnection::CompleteConnectRequests"),
+ KTraceFileName, __LINE__);
TInt statusCount = iConnArray.Count();
TBuf<32> msg(_L("Number of conns :"));
msg.AppendNum(statusCount);
- iTrace->Trace(msg, KTraceFileName, __LINE__);
-
- for(TInt loop = 0; loop < statusCount;loop++)
- {
- TRequestStatus* newStatus = REINTERPRET_CAST(TRequestStatus*, iConnArray[loop]);
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
+
+ for (TInt loop = 0; loop < statusCount; loop++)
+ {
+ TRequestStatus* newStatus = REINTERPRET_CAST(TRequestStatus*, iConnArray[loop]);
User::RequestComplete(newStatus, aErr);
if (aErr == KErrNone)
- iConnectClients++;
- iTrace->Trace(_L("CSuplConnection::CompleteConnectRequests, request completed"), KTraceFileName, __LINE__);
- }
+ iConnectClients++;
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::CompleteConnectRequests, request completed"),
+ KTraceFileName, __LINE__);
+ }
iConnArray.Reset();
iConnectStarted = EFalse;
- }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::CompleteConnectStatus
@@ -1001,11 +1163,11 @@
if (index != KErrNotFound)
{
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrCancel);
- iConnArray.Remove(index);
- }
- }
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrCancel);
+ iConnArray.Remove(index);
+ }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::Send
@@ -1013,71 +1175,79 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSuplConnection::Send(const TDesC8 &aPacket, TRequestStatus &aStatus)
+EXPORT_C void CSuplConnection::Send(const TDesC8 &aPacket,
+ TRequestStatus &aStatus)
{
- // Log
- iTrace->Trace(_L("CSuplConnection::Send"), KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Send"), KTraceFileName, __LINE__);
+
+ if (iState != EConnected || iState == EFailure)
+ {
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Send...Disconnected"),
+ KTraceFileName, __LINE__);
+ aStatus = KRequestPending;
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrDisconnected);
+ return;
+ }
- if(iState != EConnected || iState == EFailure)
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::Send...Disconnected"), KTraceFileName, __LINE__);
- aStatus = KRequestPending;
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrDisconnected);
- return;
- }
-
- // if send in progress Q it
- if (iSendInProgress)
- {
- TInt err=KErrNone;
- aStatus = KRequestPending;
- CSuplPacketInfo *packetInfo = NULL;
+ // if send in progress Q it
+ if (iSendInProgress)
+ {
+ TInt err = KErrNone;
+ aStatus = KRequestPending;
+ CSuplPacketInfo *packetInfo = NULL;
+
+ TRAP(err, packetInfo = CSuplPacketInfo::NewL(aPacket, aStatus));
+ if (err != KErrNone)
+ {
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, err);
+ return;
+ }
+ iPktArray.Append(packetInfo);
+ }
- TRAP(err, packetInfo = CSuplPacketInfo::NewL(aPacket, aStatus));
- if (err != KErrNone)
- {
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, err);
- return;
- }
- iPktArray.Append(packetInfo);
- }
-
- else
- {
- TInt err=KErrNone;
- aStatus = KRequestPending;
- TRAP(err, iPkt = CSuplPacketInfo::NewL(aPacket, aStatus));
- //iPkt->GetPacketData(iPacket, status);
- if (err != KErrNone)
- {
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, err);
- return;
- }
- iFirstPkt = ETrue;
- TBuf<64> msg(_L("Sending data on port "));
- msg.AppendNum(iSocket.LocalPort());
- iTrace->Trace(msg, KTraceFileName, __LINE__);
- // Log
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::Send sending packet over Secure Connection"), KTraceFileName, __LINE__);
- iTlsSocket->Send(aPacket, iStatus);
- iSendInProgress = ETrue;
- SetActive();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::Send sending packet over NonSecure Connection"), KTraceFileName, __LINE__);
- iSocket.Send(aPacket, 0, iStatus);
- iSendInProgress = ETrue;
- SetActive();
- }
- }
- }
+ else
+ {
+ TInt err = KErrNone;
+ aStatus = KRequestPending;
+ TRAP(err, iPkt = CSuplPacketInfo::NewL(aPacket, aStatus));
+ //iPkt->GetPacketData(iPacket, status);
+ if (err != KErrNone)
+ {
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, err);
+ return;
+ }
+ iFirstPkt = ETrue;
+ TBuf<64> msg(_L("Sending data on port "));
+ msg.AppendNum(iSocket.LocalPort());
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
+ // Log
+ if (iVariantEnabled)
+ {
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::Send sending packet over Secure Connection"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->Send(aPacket, iStatus);
+ iSendInProgress = ETrue;
+ SetActive();
+ }
+ else
+ {
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::Send sending packet over NonSecure Connection"),
+ KTraceFileName, __LINE__);
+ iSocket.Send(aPacket, 0, iStatus);
+ iSendInProgress = ETrue;
+ SetActive();
+ }
+ }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::CancelSend
@@ -1087,61 +1257,65 @@
//
EXPORT_C void CSuplConnection::CancelSend(TRequestStatus &aStatus)
{
- if (iFirstPkt)
- {
- if(iVariantEnabled)
- {
- iTrace->Trace(_L("CSuplConnection::Secure Send Cancel"), KTraceFileName, __LINE__);
- iTlsSocket->CancelSend();
- }
- else
- {
- iTrace->Trace(_L("CSuplConnection::Non Secure Send Cancel"), KTraceFileName, __LINE__);
- iSocket.CancelSend();
- }
- delete iPkt;
- iPkt = NULL;
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrCancel);
+ if (iFirstPkt)
+ {
+ if (iVariantEnabled)
+ {
+ iTrace->Trace(_L("CSuplConnection::Secure Send Cancel"),
+ KTraceFileName, __LINE__);
+ iTlsSocket->CancelSend();
}
else
{
- TInt count = iPktArray.Count();
- if (count == 1)
- {
- TInt index = iPktArray.Find(iPkt);
- if (index != KErrNotFound)
- iPktArray.Remove(index);
- delete iPkt;
- iPkt = NULL;
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrCancel);
- }
- else
- {
- for(TInt loop=0;loop<count;loop++)
+ iTrace->Trace(_L("CSuplConnection::Non Secure Send Cancel"),
+ KTraceFileName, __LINE__);
+ iSocket.CancelSend();
+ }
+ delete iPkt;
+ iPkt = NULL;
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrCancel);
+ }
+ else
+ {
+ TInt count = iPktArray.Count();
+ if (count == 1)
+ {
+ TInt index = iPktArray.Find(iPkt);
+ if (index != KErrNotFound)
+ iPktArray.Remove(index);
+ delete iPkt;
+ iPkt = NULL;
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrCancel);
+ }
+ else
+ {
+ for (TInt loop = 0; loop < count; loop++)
+ {
+ iPkt = REINTERPRET_CAST(CSuplPacketInfo*, iPktArray[0]);
+ if (iPkt->IsStatusMatches(aStatus))
{
- iPkt = REINTERPRET_CAST(CSuplPacketInfo*, iPktArray[0]);
- if (iPkt->IsStatusMatches(aStatus))
+ iTrace->Trace(_L("Found packet, deleting"),
+ KTraceFileName, __LINE__);
+ TInt index = iPktArray.Find(iPkt);
+ if (index != KErrNotFound)
{
- iTrace->Trace(_L("Found packet, deleting"), KTraceFileName, __LINE__);
- TInt index = iPktArray.Find(iPkt);
- if (index != KErrNotFound)
- {
- iTrace->Trace(_L("Found packet, deleted"), KTraceFileName, __LINE__);
- iPktArray.Remove(index);
- TRequestStatus *reqStatus = &aStatus;
- User::RequestComplete(reqStatus, KErrCancel);
- }
- delete iPkt;
- iPkt = NULL;
- break;
- }
- }
- }
- }
-
- }
+ iTrace->Trace(_L("Found packet, deleted"),
+ KTraceFileName, __LINE__);
+ iPktArray.Remove(index);
+ TRequestStatus *reqStatus = &aStatus;
+ User::RequestComplete(reqStatus, KErrCancel);
+ }
+ delete iPkt;
+ iPkt = NULL;
+ break;
+ }
+ }
+ }
+ }
+
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::Connect
@@ -1151,15 +1325,18 @@
//
void CSuplConnection::Connect()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::Connect(void)"), KTraceFileName, __LINE__);
-
- iState = EConnecting;
- iTimer->Start(4000000); // For DNS pass case , but not a valid SUPL server
- iSocket.Connect(iAddress, iStatus);
- SetActive();
- }
-
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect(void)"), KTraceFileName,
+ __LINE__);
+
+ iState = EConnecting;
+ iTimer->Start(4000000); // For DNS pass case , but not a valid SUPL server
+ iSocket.Connect(iAddress, iStatus);
+ if (!IsActive())
+ {
+ SetActive();
+ }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::ConnectIAP
// Makes a socket connection to Network
@@ -1168,79 +1345,87 @@
//
void CSuplConnection::ConnectIAP()
- {
- iTrace->Trace(_L("CSuplConnection::ConnectIAP(void)"), KTraceFileName, __LINE__);
- // Connect only if not already connected
- if(iState == ENotConnected || iState == EFailure || iState == ERetriveIAP)
- {
- // Open the Socket
+ {
+ iTrace->Trace(_L("CSuplConnection::ConnectIAP(void)"), KTraceFileName,
+ __LINE__);
+ // Connect only if not already connected
+ if (iState == ENotConnected || iState == EFailure || iState
+ == ERetriveIAP)
+ {
+ // Open the Socket
#ifndef __WINS__
- // Emulator can't handle RConnections
- TInt err = iSocket.Open( iSocketServ,
- KAfInet,
- KSockStream,
- KProtocolInetTcp,
- iConnection );
+ // Emulator can't handle RConnections
+ TInt err = iSocket.Open( iSocketServ,
+ KAfInet,
+ KSockStream,
+ KProtocolInetTcp,
+ iConnection );
#else
- TInt err = iSocket.Open( iSocketServ,
- KAfInet,
- KSockStream,
- KProtocolInetTcp) ;
+ TInt err = iSocket.Open(iSocketServ, KAfInet, KSockStream,
+ KProtocolInetTcp);
#endif
- if(KErrNone != err)
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::Socket Open Failure"), KTraceFileName, __LINE__);
-
- //User::RequestComplete(iReqStatus, err);
- CompleteConnectRequests(err);
- return;
- }
-
- // Set IP Address and Port
- if(iAddress.Input(iHostAddress) == KErrNone)
- {
- // Log
- iTrace->Trace(_L("CSuplConnection::Connect Host Address is an IP Address"), KTraceFileName, __LINE__);
+ if (KErrNone != err)
+ {
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Socket Open Failure"),
+ KTraceFileName, __LINE__);
+
+ //User::RequestComplete(iReqStatus, err);
+ CompleteConnectRequests(err);
+ return;
+ }
- iAddress.SetPort(Port());
- Connect();
- }
-
- else
- {
- // DNS Lookup
- // Log
- iTrace->Trace(_L("CSuplConnection::Connect Perform DNS lookup"), KTraceFileName, __LINE__);
+ // Set IP Address and Port
+ if (iAddress.Input(iHostAddress) == KErrNone)
+ {
+ // Log
+ iTrace->Trace(
+ _L(
+ "CSuplConnection::Connect Host Address is an IP Address"),
+ KTraceFileName, __LINE__);
+
+ iAddress.SetPort(Port());
+ Connect();
+ }
+
+ else
+ {
+ // DNS Lookup
+ // Log
+ iTrace->Trace(_L("CSuplConnection::Connect Perform DNS lookup"),
+ KTraceFileName, __LINE__);
#ifndef __WINS__
- err = iResolver.Open(iSocketServ, KAfInet, KProtocolInetUdp, iConnection);
+ err = iResolver.Open(iSocketServ, KAfInet, KProtocolInetUdp, iConnection);
#else
- err = iResolver.Open(iSocketServ, KAfInet, KProtocolInetUdp);
+ err = iResolver.Open(iSocketServ, KAfInet, KProtocolInetUdp);
#endif
- if(KErrNone != err)
- {
- //User::RequestComplete(iReqStatus, err);
- CompleteConnectRequests(err);
- return;
- }
-
- iState = ELookingUp;
- iResolver.GetByName(iHostAddress, iNameEntry, iStatus);
- iTimer->Start(10000000);
- SetActive();
- }
-
- }
-
- else
- {
- // Already Connected. Just return KErrNone
- //User::RequestComplete(iReqStatus, KErrNone);
- CompleteConnectRequests(KErrNone);
- }
-
- }
+ if (KErrNone != err)
+ {
+ //User::RequestComplete(iReqStatus, err);
+ CompleteConnectRequests(err);
+ return;
+ }
+
+ iState = ELookingUp;
+ iResolver.GetByName(iHostAddress, iNameEntry, iStatus);
+ iTimer->Start(10000000);
+ if (!IsActive())
+ {
+ SetActive();
+ }
+ }
+
+ }
+
+ else
+ {
+ // Already Connected. Just return KErrNone
+ //User::RequestComplete(iReqStatus, KErrNone);
+ CompleteConnectRequests( KErrNone);
+ }
+
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::MakeSecureConnection
// Makes a secure connection to Network
@@ -1249,19 +1434,21 @@
//
void CSuplConnection::MakeSecureConnection()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::MakeSecureConnection"), KTraceFileName, __LINE__);
-
- // Clear any pervious options
- //iTlsSocket->FlushSessionCache();
-
- iTlsSocket->StartClientHandshake( iStatus );
- iTimer->Start(10000000);
- iState = ESecureHandShake;
- SetActive();
+ // Log
+ iTrace->Trace(_L("CSuplConnection::MakeSecureConnection"),
+ KTraceFileName, __LINE__);
+
+ // Clear any pervious options
+ //iTlsSocket->FlushSessionCache();
- }
-
+ iTlsSocket->StartClientHandshake(iStatus);
+ iTimer->Start(10000000);
+ iState = ESecureHandShake;
+ if (!IsActive())
+ {
+ SetActive();
+ }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::ListenToMessages
@@ -1271,29 +1458,30 @@
//
EXPORT_C TInt CSuplConnection::ListenToMessages()
{
- // Log
- iTrace->Trace(_L("CSuplConnection::ListenToMessages"), KTraceFileName, __LINE__);
+ // Log
+ iTrace->Trace(_L("CSuplConnection::ListenToMessages"), KTraceFileName,
+ __LINE__);
- iListenCount++;
+ iListenCount++;
+
+ if (iStartedListen)
+ return KErrNone;
- if (iStartedListen)
- return KErrNone;
-
- if(iState != EConnected)
- {
- return KErrDisconnected;
- }
-
- if(iSocketReader && (!IsActive()))
- {
- iSocketReader->SetPortNum(GetPortNumberUsed());
- iSocketReader->IssueRead();
- iStartedListen = ETrue;
- return KErrNone;
- }
-
- return KErrGeneral;
- }
+ if (iState != EConnected)
+ {
+ return KErrDisconnected;
+ }
+
+ if (iSocketReader && (!IsActive()))
+ {
+ iSocketReader->SetPortNum(GetPortNumberUsed());
+ iSocketReader->IssueRead();
+ iStartedListen = ETrue;
+ return KErrNone;
+ }
+
+ return KErrGeneral;
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::GetLocalIPAddress
@@ -1302,38 +1490,38 @@
// -----------------------------------------------------------------------------
//
-EXPORT_C TInt CSuplConnection::GetLocalIPAddress(TInetAddr & aTInetAddress )
- {
- if(iState != EConnected)
- return KErrDisconnected;
-
- TSockAddr sockAddr;
- iSocket.LocalName(sockAddr);
-
- TInetAddr inetAddress(sockAddr);
-
- aTInetAddress = inetAddress;
- return KErrNone;
- }
-
+EXPORT_C TInt CSuplConnection::GetLocalIPAddress(TInetAddr & aTInetAddress)
+ {
+ if (iState != EConnected)
+ return KErrDisconnected;
+
+ TSockAddr sockAddr;
+ iSocket.LocalName(sockAddr);
+
+ TInetAddr inetAddress(sockAddr);
+
+ aTInetAddress = inetAddress;
+ return KErrNone;
+ }
+
// -----------------------------------------------------------------------------
// CSuplConnection::CancelListenToMessages
// Start reading from the socket for packets from the network
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-EXPORT_C void CSuplConnection::CancelListenToMessages()
- {
- if (iListenCount > 1)
+EXPORT_C void CSuplConnection::CancelListenToMessages()
+ {
+ if (iListenCount > 1)
{
- iListenCount--;
- return;
- }
- if(iSocketReader)
- {
- iSocketReader->Cancel();
- }
- }
+ iListenCount--;
+ return;
+ }
+ if (iSocketReader)
+ {
+ iSocketReader->Cancel();
+ }
+ }
// -----------------------------------------------------------------------------
// COMASuplProvHandler::SetVariation
@@ -1341,44 +1529,45 @@
// -----------------------------------------------------------------------------
//
void CSuplConnection::SetVariation()
-{
+ {
#if 0
- CRepository *repository = NULL;
- TRAPD( err, repository = CRepository::NewL( KCRUidSuplConfiguration));
- if ( KErrNone != err )
- {
- return;
- }
-
- TInt val;
- TInt rc = repository->Get( KSuplTLSAuthenticationVariant,val );
- if ( KErrNone == rc && val == 0 )
- {
- iVariantEnabled = EFalse;
- }
-
- if ( KErrNone == rc && (val == 1 || val == 2 ))
- {
- iVariantEnabled = ETrue;
- if(val == 2 )
- {
- iPskTLSUsage = ETrue;
- }
- }
-
- delete repository;
- #endif
-}
+ CRepository *repository = NULL;
+ TRAPD( err, repository = CRepository::NewL( KCRUidSuplConfiguration));
+ if ( KErrNone != err )
+ {
+ return;
+ }
+
+ TInt val;
+ TInt rc = repository->Get( KSuplTLSAuthenticationVariant,val );
+ if ( KErrNone == rc && val == 0 )
+ {
+ iVariantEnabled = EFalse;
+ }
+
+ if ( KErrNone == rc && (val == 1 || val == 2 ))
+ {
+ iVariantEnabled = ETrue;
+ if(val == 2 )
+ {
+ iPskTLSUsage = ETrue;
+ }
+ }
+
+ delete repository;
+#endif
+ }
EXPORT_C void CSuplConnection::CloseConnection()
{
- if(iTrace)
- iTrace->Trace(_L("CSuplConnection::CloseConnection"), KTraceFileName, __LINE__);
+ if (iTrace)
+ iTrace->Trace(_L("CSuplConnection::CloseConnection"), KTraceFileName,
+ __LINE__);
// if connection request is from multiple clients and it is not yet
// completed, just return.
if (iConnArray.Count() > 1)
- return;
+ return;
#if 0
TBuf<128> buf;
buf.Copy(_L("CSuplConnection::CloseConnection, iConnectClients = "));
@@ -1389,27 +1578,29 @@
buf.AppendNum(iState);
iTrace->Trace(buf, KTraceFileName, __LINE__);
#endif
-
+
if (iConnArray.Count() == 1)
iConnArray.Reset();
- iConnectClients--;
-
- if (iConnectClients > 0) //earlier > 1
+ iConnectClients--;
+
+ if (iConnectClients > 0) //earlier > 1
return;
-
- iResolver.Close();
- CancelListenToMessages();
+
+ iResolver.Close();
+ CancelListenToMessages();
// Close the Socket if required
- if(iState == EConnected || iState == EConnecting || iState == ESecureHandShake)
- {
- if(iTrace)
- iTrace->Trace(_L("CSuplConnection::...Closing Socket"), KTraceFileName, __LINE__);
- if(iVariantEnabled)
- iTlsSocket->Close();
- iSocket.Close();
- }
-
+ if (iState == EConnected || iState == EConnecting || iState
+ == ESecureHandShake)
+ {
+ if (iTrace)
+ iTrace->Trace(_L("CSuplConnection::...Closing Socket"),
+ KTraceFileName, __LINE__);
+ if (iVariantEnabled)
+ iTlsSocket->Close();
+ iSocket.Close();
+ }
+
#ifndef __WINS__
// Close the RConnection
if(iTrace)
@@ -1417,7 +1608,7 @@
iConnection.Close();
#endif
iState = ENotConnected;
- }
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::GetPskL
@@ -1427,105 +1618,118 @@
//
// PSK TLS Start
-void CSuplConnection::GetPskL(const HBufC8 * aPskIdentityHint, HBufC8 *& aPskIdentity, HBufC8 *& aPskKey)
+void CSuplConnection::GetPskL(const HBufC8 * aPskIdentityHint,
+ HBufC8 *& aPskIdentity, HBufC8 *& aPskKey)
{
-
- iTrace->Trace(_L("CSuplConnection::GetPskL Start"), KTraceFileName, __LINE__);
- if (aPskIdentityHint != NULL && aPskIdentityHint->Length() >= KMaxPskIdentityHintLength )
- {
- iTrace->Trace(_L("aPskIdentityHint is not null..."), KTraceFileName, __LINE__);
- TBuf8<KMaxGBAUsageLength> gbaUsage;
- TBuf8<KMaxVerLength> ver;
- TBuf8<KMaxNewPasswordLength> newPassword;
-
- gbaUsage.Copy(aPskIdentityHint->Left(KMaxGBAUsageLength));
- ver.Copy(aPskIdentityHint->Mid(KMaxGBAUsageLength,KMaxVerLength));
- newPassword.Copy(aPskIdentityHint->Mid(KMaxGBAUsageLength + KMaxVerLength));
-
- gbaUsage.UpperCase();
- ver.UpperCase();
-
- if(gbaUsage.Compare(KWGBA) == 0) //We will proceed with key generation if its WGBA
- {
- iTrace->Trace(_L("Its WGBA..."), KTraceFileName, __LINE__);
- GeneratePsk_Identity_KeyL(ver,newPassword,aPskIdentity,aPskKey);
- }
- else
- {
- TBuf<32> buf;
- buf.Copy(gbaUsage);
- iTrace->Trace(_L("Received GBA field is ..."), KTraceFileName, __LINE__);
- iTrace->Trace(buf,KTraceFileName, __LINE__);
- iTrace->Trace(_L("Leaving as of now,till GBA supports comes..."), KTraceFileName, __LINE__);
- User::LeaveIfError(KErrNotSupported);
- }
- }
+
+ iTrace->Trace(_L("CSuplConnection::GetPskL Start"), KTraceFileName,
+ __LINE__);
+ if (aPskIdentityHint != NULL && aPskIdentityHint->Length()
+ >= KMaxPskIdentityHintLength)
+ {
+ iTrace->Trace(_L("aPskIdentityHint is not null..."), KTraceFileName,
+ __LINE__);
+ TBuf8<KMaxGBAUsageLength> gbaUsage;
+ TBuf8<KMaxVerLength> ver;
+ TBuf8<KMaxNewPasswordLength> newPassword;
+
+ gbaUsage.Copy(aPskIdentityHint->Left(KMaxGBAUsageLength));
+ ver.Copy(aPskIdentityHint->Mid(KMaxGBAUsageLength, KMaxVerLength));
+ newPassword.Copy(aPskIdentityHint->Mid(KMaxGBAUsageLength
+ + KMaxVerLength));
+
+ gbaUsage.UpperCase();
+ ver.UpperCase();
+
+ if (gbaUsage.Compare(KWGBA) == 0) //We will proceed with key generation if its WGBA
+ {
+ iTrace->Trace(_L("Its WGBA..."), KTraceFileName, __LINE__);
+ GeneratePsk_Identity_KeyL(ver, newPassword, aPskIdentity, aPskKey);
+ }
+ else
+ {
+ TBuf<32> buf;
+ buf.Copy(gbaUsage);
+ iTrace->Trace(_L("Received GBA field is ..."), KTraceFileName,
+ __LINE__);
+ iTrace->Trace(buf, KTraceFileName, __LINE__);
+ iTrace->Trace(_L("Leaving as of now,till GBA supports comes..."),
+ KTraceFileName, __LINE__);
+ User::LeaveIfError( KErrNotSupported);
+ }
+ }
else
- {
- iTrace->Trace(_L("Either Hint is Null OR Hint Length is exceeded."), KTraceFileName, __LINE__);
- User::LeaveIfError(KErrArgument);
- }
+ {
+ iTrace->Trace(_L("Either Hint is Null OR Hint Length is exceeded."),
+ KTraceFileName, __LINE__);
+ User::LeaveIfError( KErrArgument);
+ }
- #ifdef _DEBUG
- LogPskKeyInfoL(aPskIdentityHint,aPskIdentity,aPskKey);
- #endif
- iTrace->Trace(_L("CSuplConnection::GetPskL End"), KTraceFileName, __LINE__);
+#ifdef _DEBUG
+ LogPskKeyInfoL(aPskIdentityHint, aPskIdentity, aPskKey);
+#endif
+ iTrace->Trace(_L("CSuplConnection::GetPskL End"), KTraceFileName,
+ __LINE__);
- }
-
+ }
+
// -----------------------------------------------------------------------------
// CSuplConnection::GeneratePsk_Identity_KeyL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSuplConnection::GeneratePsk_Identity_KeyL(const TDesC8& aSLPKeyVer,const TDesC8& aPassKey,
- HBufC8 *& aPskIdentity, HBufC8 *& aPskKey)
- {
-
- iTrace->Trace(_L("Before CR..."), KTraceFileName, __LINE__);
- CRepository* repository = CRepository::NewL( KCRUidPskTLSUsageConfiguration);
- iTrace->Trace(_L("After CR..."), KTraceFileName, __LINE__);
- CleanupStack::PushL(repository);
-
- TInt keyVersion;
-
- TLex8 verStr(aSLPKeyVer);
- TInt SLPKeyVer;
- verStr.Val(SLPKeyVer);
+void CSuplConnection::GeneratePsk_Identity_KeyL(const TDesC8& aSLPKeyVer,
+ const TDesC8& aPassKey, HBufC8 *& aPskIdentity, HBufC8 *& aPskKey)
+ {
+
+ iTrace->Trace(_L("Before CR..."), KTraceFileName, __LINE__);
+ CRepository* repository = CRepository::NewL(
+ KCRUidPskTLSUsageConfiguration);
+ iTrace->Trace(_L("After CR..."), KTraceFileName, __LINE__);
+ CleanupStack::PushL(repository);
+
+ TInt keyVersion;
+
+ TLex8 verStr(aSLPKeyVer);
+ TInt SLPKeyVer;
+ verStr.Val(SLPKeyVer);
+
+ TBuf8<KMaxPskKeyLength> pskKey;
- TBuf8<KMaxPskKeyLength> pskKey;
-
- TInt rc = repository->Get(KSuplPskTLSKeyVersion,keyVersion);
- if(rc == KErrNone && keyVersion == SLPKeyVer)
- {
- iTrace->Trace(_L("Version is matching with stored one..."), KTraceFileName, __LINE__);
- rc = repository->Get(KSuplPskTLSNewPassword,pskKey);
- if(rc == KErrNone)
- {
- aPskKey = HBufC8::NewL(KMaxPskKeyLength);
- aPskKey->Des().Copy(pskKey);
- iTrace->Trace(_L("Copied Psk Key"), KTraceFileName, __LINE__);
- PrintHex(pskKey,__LINE__);
- }
- else
- {
- iTrace->Trace(_L("KSuplPskTLSNewPassword Not Found"), KTraceFileName, __LINE__);
- User::LeaveIfError(rc);
- }
- }
- else
- {
- iTrace->Trace(_L("Version is NOT matching with stored one..."), KTraceFileName, __LINE__);
- iTrace->Trace(_L("Generating new Key..."), KTraceFileName, __LINE__);
- GeneratePskKeyL(repository,aPassKey,aPskKey,SLPKeyVer);
- PrintHex(*aPskKey,__LINE__);
- }
-
- GeneratePskIdentityL(repository,SLPKeyVer,aPskIdentity);
- CleanupStack::PopAndDestroy(repository);
-
- }
+ TInt rc = repository->Get(KSuplPskTLSKeyVersion, keyVersion);
+ if (rc == KErrNone && keyVersion == SLPKeyVer)
+ {
+ iTrace->Trace(_L("Version is matching with stored one..."),
+ KTraceFileName, __LINE__);
+ rc = repository->Get(KSuplPskTLSNewPassword, pskKey);
+ if (rc == KErrNone)
+ {
+ aPskKey = HBufC8::NewL(KMaxPskKeyLength);
+ aPskKey->Des().Copy(pskKey);
+ iTrace->Trace(_L("Copied Psk Key"), KTraceFileName, __LINE__);
+ PrintHex(pskKey, __LINE__);
+ }
+ else
+ {
+ iTrace->Trace(_L("KSuplPskTLSNewPassword Not Found"),
+ KTraceFileName, __LINE__);
+ User::LeaveIfError(rc);
+ }
+ }
+ else
+ {
+ iTrace->Trace(_L("Version is NOT matching with stored one..."),
+ KTraceFileName, __LINE__);
+ iTrace->Trace(_L("Generating new Key..."), KTraceFileName, __LINE__);
+ GeneratePskKeyL(repository, aPassKey, aPskKey, SLPKeyVer);
+ PrintHex(*aPskKey, __LINE__);
+ }
+
+ GeneratePskIdentityL(repository, SLPKeyVer, aPskIdentity);
+ CleanupStack::PopAndDestroy(repository);
+
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::GeneratePskIdentity
@@ -1533,30 +1737,31 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSuplConnection::GeneratePskIdentityL(CRepository* aRepository,TInt /*aKeyVer*/,HBufC8 *& aPskIdentity)
- {
- iTrace->Trace(_L("Start of GeneratePskIdentityL"), KTraceFileName, __LINE__);
+void CSuplConnection::GeneratePskIdentityL(CRepository* aRepository,
+ TInt /*aKeyVer*/, HBufC8 *& aPskIdentity)
+ {
+ iTrace->Trace(_L("Start of GeneratePskIdentityL"), KTraceFileName,
+ __LINE__);
+
+ TInt crKeyId;
+ TInt rc = aRepository->Get(KSuplPskTLSKeyId, crKeyId);
- TInt crKeyId;
- TInt rc = aRepository->Get(KSuplPskTLSKeyId,crKeyId);
-
- if(rc == KErrNone)
- {
- aPskIdentity = HBufC8::NewL(KMaxPskKeyLength);
- aPskIdentity->Des().Append(crKeyId);
- aPskIdentity->Des().Append(13);//newline
- iTrace->Trace(_L("Copied PskIdentityL"), KTraceFileName, __LINE__);
- TRACESTRING("PskIdentity : ")
- PrintHex(aPskIdentity->Des(),__LINE__);
- }
- else
- {
- iTrace->Trace(_L("KSuplPskTLSKeyId Not Found"), KTraceFileName, __LINE__);
- User::LeaveIfError(rc);
- }
- iTrace->Trace(_L("End of GeneratePskIdentityL"), KTraceFileName, __LINE__);
- }
-
+ if (rc == KErrNone)
+ {
+ aPskIdentity = HBufC8::NewL(KMaxPskKeyLength);
+ aPskIdentity->Des().Append(crKeyId);
+ aPskIdentity->Des().Append(13);//newline
+ iTrace->Trace(_L("Copied PskIdentityL"), KTraceFileName, __LINE__);
+TRACESTRING ("PskIdentity : ")
+ PrintHex(aPskIdentity->Des(),__LINE__);
+ }
+ else
+ {
+ iTrace->Trace(_L("KSuplPskTLSKeyId Not Found"), KTraceFileName, __LINE__);
+ User::LeaveIfError(rc);
+ }
+ iTrace->Trace(_L("End of GeneratePskIdentityL"), KTraceFileName, __LINE__);
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::GeneratePskKeyL
@@ -1564,180 +1769,181 @@
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSuplConnection::GeneratePskKeyL(CRepository* aRepository,const TDesC8& aPassKey,HBufC8 *& aPskKey,TInt aSLPKeyVersion)
- {
- unsigned char newpassword[32];
- TBuf8<KMaxRootKeyLength> rootKey;
- TBuf8<KMaxRootKeyXORLength> rootXORedPassKey;
- TBuf8<KMaxSaltLength> finalSalt;
-
- iTrace->Trace(_L("Get rootKey from CR"), KTraceFileName, __LINE__);
-
- TBuf<KMaxRootKeyLength> rootKey16;
- TInt rc = aRepository->Get(KSuplPskTLSRootPassword,rootKey16);
- rootKey.Copy(rootKey16);
-
- TBuf<64> buf;
- TRACESTRING("Root Key from CenRep")
- TRACETEXT(rootKey)
-
- buf.Copy(_L("Get(KSuplPskTLSRootPassword,rootKey16) "));
- buf.AppendNum(rc);
- buf.Append(_L(" Len of rootkey "));
- buf.AppendNum(rootKey.Length());
- iTrace->Trace(buf,KTraceFileName, __LINE__);
- User::LeaveIfError(rc);
-
- TRACESTRING("Pass Key from SLP")
- TRACETEXT(aPassKey)
-
- if(rc == KErrNone && rootKey.Length() != 0)
- {
- TBuf8<KMaxRootKeyLength> rootXORedKey;
-
- iTrace->Trace(_L("DoSelfXOR"), KTraceFileName, __LINE__);
- DoSelfXOR(rootXORedKey,rootKey);
- TRACESTRING("Self XOR")
- PrintHex(rootXORedKey,__LINE__);
+void CSuplConnection::GeneratePskKeyL(CRepository* aRepository,
+ const TDesC8& aPassKey, HBufC8 *& aPskKey, TInt aSLPKeyVersion)
+ {
+ unsigned char newpassword[32];
+ TBuf8<KMaxRootKeyLength> rootKey;
+ TBuf8<KMaxRootKeyXORLength> rootXORedPassKey;
+ TBuf8<KMaxSaltLength> finalSalt;
+
+ iTrace->Trace(_L("Get rootKey from CR"), KTraceFileName, __LINE__);
+
+ TBuf<KMaxRootKeyLength> rootKey16;
+ TInt rc = aRepository->Get(KSuplPskTLSRootPassword, rootKey16);
+ rootKey.Copy(rootKey16);
+
+ TBuf<64> buf;
+ TRACESTRING("Root Key from CenRep")
+ TRACETEXT(rootKey)
- iTrace->Trace(_L("DoXOR"), KTraceFileName, __LINE__);
- DoXOR(rootXORedPassKey,aPassKey,rootXORedKey);
- TRACESTRING("DoXOR")
- PrintHex(rootXORedPassKey,__LINE__);
+ buf.Copy(_L("Get(KSuplPskTLSRootPassword,rootKey16) "));
+ buf.AppendNum(rc);
+ buf.Append(_L(" Len of rootkey "));
+ buf.AppendNum(rootKey.Length());
+ iTrace->Trace(buf, KTraceFileName, __LINE__);
+ User::LeaveIfError(rc);
+
+ TRACESTRING("Pass Key from SLP")
+ TRACETEXT(aPassKey)
+
+ if(rc == KErrNone && rootKey.Length() != 0)
+ {
+ TBuf8<KMaxRootKeyLength> rootXORedKey;
+
+ iTrace->Trace(_L("DoSelfXOR"), KTraceFileName, __LINE__);
+ DoSelfXOR(rootXORedKey,rootKey);
+ TRACESTRING("Self XOR")
+ PrintHex(rootXORedKey,__LINE__);
+
+ iTrace->Trace(_L("DoXOR"), KTraceFileName, __LINE__);
+ DoXOR(rootXORedPassKey,aPassKey,rootXORedKey);
+ TRACESTRING("DoXOR")
+ PrintHex(rootXORedPassKey,__LINE__);
- iTrace->Trace(_L("FormSalt"), KTraceFileName, __LINE__);
- TRACETEXT(KSaltValue)
- FormSaltKey(finalSalt,KSaltValue);
- TRACESTRING("Salt Value in hex...")
- PrintHex(finalSalt,__LINE__);
+ iTrace->Trace(_L("FormSalt"), KTraceFileName, __LINE__);
+ TRACETEXT(KSaltValue)
+ FormSaltKey(finalSalt,KSaltValue);
+ TRACESTRING("Salt Value in hex...")
+ PrintHex(finalSalt,__LINE__);
+
+ iTrace->Trace(_L("Call derive key"), KTraceFileName, __LINE__);
- iTrace->Trace(_L("Call derive key"), KTraceFileName, __LINE__);
-
- buf.Copy(_L("Length of RootXORedPassKey "));
- buf.AppendNum(rootXORedPassKey.Length());
- TRACETEXT(buf)
+ buf.Copy(_L("Length of RootXORedPassKey "));
+ buf.AppendNum(rootXORedPassKey.Length());
+ TRACETEXT(buf)
- buf.Copy(_L("Length of Salt Key "));
- buf.AppendNum(finalSalt.Length());
- TRACETEXT(buf)
+ buf.Copy(_L("Length of Salt Key "));
+ buf.AppendNum(finalSalt.Length());
+ TRACETEXT(buf)
- derive_key(rootXORedPassKey.Ptr(),rootXORedPassKey.Length(),finalSalt.Ptr(),
- finalSalt.Length(),8,newpassword,32);
+ derive_key(rootXORedPassKey.Ptr(),rootXORedPassKey.Length(),finalSalt.Ptr(),
+ finalSalt.Length(),8,newpassword,32);
- iTrace->Trace(_L("Copy key into PskKey"), KTraceFileName, __LINE__);
+ iTrace->Trace(_L("Copy key into PskKey"), KTraceFileName, __LINE__);
- aPskKey = HBufC8::NewL(32);
- aPskKey->Des().Copy(newpassword,32);
-
- buf.Copy(_L("Length of Key "));
- buf.AppendNum(aPskKey->Des().Length());
- TRACETEXT(buf)
+ aPskKey = HBufC8::NewL(32);
+ aPskKey->Des().Copy(newpassword,32);
- TRACESTRING("Key...")
- PrintHex(aPskKey->Des(),__LINE__);
+ buf.Copy(_L("Length of Key "));
+ buf.AppendNum(aPskKey->Des().Length());
+ TRACETEXT(buf)
+
+ TRACESTRING("Key...")
+ PrintHex(aPskKey->Des(),__LINE__);
- aRepository->Set(KSuplPskTLSNewPassword,aPskKey->Des());
- aRepository->Set(KSuplPskTLSKeyVersion,aSLPKeyVersion);
- iTrace->Trace(_L("Copied PskKey"), KTraceFileName, __LINE__);
- }
-
- else
- {
- iTrace->Trace(_L("KSuplPskTLSRootPassword Not Found"), KTraceFileName, __LINE__);
- User::LeaveIfError(rc);
- }
-
- iTrace->Trace(_L("End GeneratePskKeyL"), KTraceFileName, __LINE__);
- }
+ aRepository->Set(KSuplPskTLSNewPassword,aPskKey->Des());
+ aRepository->Set(KSuplPskTLSKeyVersion,aSLPKeyVersion);
+ iTrace->Trace(_L("Copied PskKey"), KTraceFileName, __LINE__);
+ }
+
+ else
+ {
+ iTrace->Trace(_L("KSuplPskTLSRootPassword Not Found"), KTraceFileName, __LINE__);
+ User::LeaveIfError(rc);
+ }
+
+ iTrace->Trace(_L("End GeneratePskKeyL"), KTraceFileName, __LINE__);
+ }
// -----------------------------------------------------------------------------
// CSuplConnection::LogPskKeyInfoL
//
// (other items were commented in a header).
// -----------------------------------------------------------------------------
//
-void CSuplConnection::LogPskKeyInfoL(const HBufC8* /*aPskIdentityHint*/,HBufC8* /*aPskIdentity*/,HBufC8* /*aPskKey*/)
- {
- #if 0
- TBuf<128> buf;
- buf.Copy(_L("PSK Key :"));
+void CSuplConnection::LogPskKeyInfoL(const HBufC8* /*aPskIdentityHint*/,
+ HBufC8* /*aPskIdentity*/, HBufC8* /*aPskKey*/)
+ {
+#if 0
+ TBuf<128> buf;
+ buf.Copy(_L("PSK Key :"));
iTrace->Trace(buf, KTraceFileName, __LINE__);
- HBufC* hintbuf = NULL;
- TInt err;
- TRAP(err, hintbuf = HBufC::NewL(aPskKey->Length()));
- err = 0;
- hintbuf->Des().Copy(aPskKey->Des());
- iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
- delete hintbuf;
- hintbuf = NULL;
+ HBufC* hintbuf = NULL;
+ TInt err;
+ TRAP(err, hintbuf = HBufC::NewL(aPskKey->Length()));
+ err = 0;
+ hintbuf->Des().Copy(aPskKey->Des());
+ iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
+ delete hintbuf;
+ hintbuf = NULL;
buf.Copy(_L("PSK Identity :"));
iTrace->Trace(buf, KTraceFileName, __LINE__);
- TRAP(err, hintbuf = HBufC::NewL(aPskIdentity->Length()));
- err = 0;
- hintbuf->Des().Copy(aPskIdentity->Des());
- iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
- delete hintbuf;
- hintbuf = NULL;
+ TRAP(err, hintbuf = HBufC::NewL(aPskIdentity->Length()));
+ err = 0;
+ hintbuf->Des().Copy(aPskIdentity->Des());
+ iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
+ delete hintbuf;
+ hintbuf = NULL;
if (aPskIdentityHint != NULL)
- {
+ {
buf.Copy(_L("Rcvd Identity Hint :"));
iTrace->Trace(buf, KTraceFileName, __LINE__);
- TRAP(err, hintbuf = HBufC::NewL(aPskIdentityHint->Length()));
- err = 0;
- hintbuf->Des().Copy(*aPskIdentityHint);
- iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
- delete hintbuf;
- hintbuf = NULL;
+ TRAP(err, hintbuf = HBufC::NewL(aPskIdentityHint->Length()));
+ err = 0;
+ hintbuf->Des().Copy(*aPskIdentityHint);
+ iTrace->Trace( hintbuf->Des(),KTraceFileName, __LINE__);
+ delete hintbuf;
+ hintbuf = NULL;
}
else
- {
- iTrace->Trace(_L("Rcvd Null Identity Hint"), KTraceFileName, __LINE__);
- }
+ {
+ iTrace->Trace(_L("Rcvd Null Identity Hint"), KTraceFileName, __LINE__);
+ }
#endif
- }
-
-
-void CSuplConnection::PrintHex(const TDesC8&
+ }
+
+void CSuplConnection::PrintHex(const TDesC8&
#ifdef _DEBUG
-aBuffer
+ aBuffer
#endif
-,
-TInt
+ , TInt
#ifdef _DEBUG
-aLine
+ aLine
#endif
)
- {
- #ifdef _DEBUG
- TBuf<128> buffer;
- TBuf<8> buff;
- _LIT16(KFormat1,"%02x");
- TInt len = aBuffer.Length();
- for(TInt i = 0 ; i <len; i++)
- {
- buff.Zero();
- buff.Format(KFormat1,aBuffer[i]);
- TRACETEXT(buff)
- iTrace->Trace(buff, KTraceFileName, aLine);
- }
- #endif
- }
-
+ {
+#ifdef _DEBUG
+ TBuf<128> buffer;
+ TBuf<8> buff;
+ _LIT16(KFormat1, "%02x");
+ TInt len = aBuffer.Length();
+ for (TInt i = 0; i < len; i++)
+ {
+ buff.Zero();
+ buff.Format(KFormat1, aBuffer[i]);
+TRACETEXT (buff)
+ iTrace->Trace(buff, KTraceFileName, aLine);
+ }
+#endif
+ }
+
EXPORT_C TInt CSuplConnection::GetPortNumberUsed()
- {
- iTrace->Trace(_L("CSuplConnection::GetPortNumberUsed"), KTraceFileName, __LINE__);
+ {
+ iTrace->Trace(_L("CSuplConnection::GetPortNumberUsed"), KTraceFileName,
+ __LINE__);
if (iState == EConnected)
- {
+ {
TBuf<64> msg(_L("Port Number used is "));
msg.AppendNum(iSocket.LocalPort());
- iTrace->Trace(msg, KTraceFileName, __LINE__);
- return iSocket.LocalPort();
+ iTrace->Trace(msg, KTraceFileName, __LINE__);
+ return iSocket.LocalPort();
}
else
- return KErrGeneral;
+ return KErrGeneral;
}
-
+
// PSK TLS End
// End of File
--- a/supl/locationsuplfw/settingsapi/group/bld.inf Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/settingsapi/group/bld.inf Thu Aug 19 10:20:18 2010 +0300
@@ -27,6 +27,7 @@
../inc/epos_csuplsettingsinternal.h |../../../inc/epos_csuplsettingsinternal.h
../inc/epos_csuplsettingextensionparams.h |../../../inc/epos_csuplsettingextensionparams.h
../inc/epos_csuplsettingsinternalconstants.h |../../../inc/epos_csuplsettingsinternalconstants.h
+../inc/epos_csuplsettingsinternalcrkeys.h |../../../inc/epos_csuplsettingsinternalcrkeys.h
PRJ_MMPFILES
epos_suplsettings.mmp
--- a/supl/locationsuplfw/settingsapi/inc/epos_csuplsettingsinternalcrkeys.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/settingsapi/inc/epos_csuplsettingsinternalcrkeys.h Thu Aug 19 10:20:18 2010 +0300
@@ -32,5 +32,6 @@
const TUint32 KSuplSettigsDBPath = 0x00000008;
const TUint32 KSuplSessionDBEvent = 0x00000009;
const TUint32 KSuplSessionDBChangedSessionId = 0x0000000A;
+const TUint32 KSuplGeoInfoConvServerName = 0x0000000B;
#endif //SUPLSETTINGSINTERNALCRKEYS_H
--- a/supl/locationsuplfw/terminalinitiationapi/bwins/epos_suplterminitiationu.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/terminalinitiationapi/bwins/epos_suplterminitiationu.def Thu Aug 19 10:20:18 2010 +0300
@@ -53,4 +53,7 @@
?ConstructL@CSuplSubSessnPtrHolder@@IAEXHH@Z @ 52 NONAME ; void CSuplSubSessnPtrHolder::ConstructL(int, int)
?NewL@CSuplSubSessnPtrHolder@@SAPAV1@HH@Z @ 53 NONAME ; class CSuplSubSessnPtrHolder * CSuplSubSessnPtrHolder::NewL(int, int)
?Connect@RSuplTerminalServer@@QAEHAAVTRequestStatus@@@Z @ 54 NONAME ; int RSuplTerminalServer::Connect(class TRequestStatus &)
+ ?CancelLocationConversion@RSuplTerminalInternal@@QAEXXZ @ 55 NONAME ; void RSuplTerminalInternal::CancelLocationConversion(void)
+ ??0RSuplTerminalInternal@@QAE@XZ @ 56 NONAME ; RSuplTerminalInternal::RSuplTerminalInternal(void)
+ ?ConvertAreaInfoToCoordinates@RSuplTerminalInternal@@QAEXAAVTRequestStatus@@AAUTGeoCellInfo@@@Z @ 57 NONAME ; void RSuplTerminalInternal::ConvertAreaInfoToCoordinates(class TRequestStatus &, struct TGeoCellInfo &)
--- a/supl/locationsuplfw/terminalinitiationapi/eabi/epos_suplterminitiationu.def Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/terminalinitiationapi/eabi/epos_suplterminitiationu.def Thu Aug 19 10:20:18 2010 +0300
@@ -68,4 +68,8 @@
_ZTV22CSuplSubSessnPtrHolder @ 67 NONAME
_ZTV23RSuplTerminalSubSession @ 68 NONAME
_ZN19RSuplTerminalServer7ConnectER14TRequestStatus @ 69 NONAME
+ _ZN21RSuplTerminalInternal24CancelLocationConversionEv @ 70 NONAME
+ _ZN21RSuplTerminalInternal28ConvertAreaInfoToCoordinatesER14TRequestStatusR12TGeoCellInfo @ 71 NONAME
+ _ZN21RSuplTerminalInternalC1Ev @ 72 NONAME
+ _ZN21RSuplTerminalInternalC2Ev @ 73 NONAME
--- a/supl/locationsuplfw/terminalinitiationapi/group/bld.inf Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/terminalinitiationapi/group/bld.inf Thu Aug 19 10:20:18 2010 +0300
@@ -23,6 +23,9 @@
PRJ_EXPORTS
../inc/epos_suplparameters.h MW_LAYER_PLATFORM_EXPORT_PATH(epos_suplparameters.h)
+../inc/epos_suplterminalinternal.h |../../../inc/epos_suplterminalinternal.h
+../inc/epos_suplgeocellinfo.h |../../../inc/epos_suplgeocellinfo.h
+
PRJ_MMPFILES
epos_suplterminalapi.mmp
--- a/supl/locationsuplfw/terminalinitiationapi/group/epos_suplterminalapi.mmp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/terminalinitiationapi/group/epos_suplterminalapi.mmp Thu Aug 19 10:20:18 2010 +0300
@@ -33,6 +33,7 @@
SOURCE epos_suplterminalqop.cpp
SOURCE epos_suplterminalparams.cpp
SOURCE epos_suplterminalperiodictrigger.cpp
+SOURCE epos_suplterminalinternal.cpp
USERINCLUDE ../inc
USERINCLUDE ../../../inc
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/supl/locationsuplfw/terminalinitiationapi/inc/epos_suplgeocellinfo.h Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,54 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Data structure to hold cell information for geo tagging purposes.
+*
+*/
+
+/*! \file epos_suplgeocellinfo.h
+ \brief Triggering classes
+*/
+
+#ifndef __EPOS_SUPLGEOCELLINFO_H__
+#define __EPOS_SUPLGEOCELLINFO_H__
+
+// ==========================================
+
+/**
+ * Cell types
+ */
+enum TGeoCellType
+ {
+ /** GSM Cell. */
+ EGeoGsmCell = 0,
+ /** WCDMA cell. */
+ EGeoWcdmaCell = 1
+ };
+
+/**
+ * Class defines detailed information for gsm/wcdma cell.
+ *
+ * @since S60 5.2
+ */
+struct TGeoCellInfo
+ {
+ TInt iMNC;
+ TInt iMCC;
+ TInt iCid;
+ TInt iLac;
+ TBool iConnectionPrompt;
+ TBool iWlanOnly;
+ TGeoCellType iGeoCellType;
+ };
+
+#endif //__EPOS_SUPLGEOCELLINFO_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/supl/locationsuplfw/terminalinitiationapi/inc/epos_suplterminalinternal.h Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,81 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: SUPL Terminal Initiation internal class
+*
+*/
+
+#ifndef __EPOS_SUPLTERMINALINTERNAL_H__
+#define __EPOS_SUPLTERMINALINTERNAL_H__
+
+
+#include <epos_suplterminal.h>
+
+#include "epos_suplgeocellinfo.h"
+
+
+// Forward declarations
+
+/**
+ * This class is used to make request to convert area information to geo-coordinates.
+ */
+class RSuplTerminalInternal : public RSuplTerminalSubSession
+ {
+
+
+public:
+ /**
+ * Constructor for RSuplTerminalInternal
+ *
+ */
+ IMPORT_C RSuplTerminalInternal();
+
+ /**
+ * This is an asynchronous request to SUPL Server to determine position
+ * information corresponding to given area information.
+ * Client can have only one outstanding asynchronous request per sub-session.
+ * @param [OUT] aStatus to return result code
+ * @param[IN] aGeoCellInfo Cell information
+ * @return aStatus will have
+ * - KErrNone if request is completed sucessfully.
+ * - KErrCancel if the request was successfully cancelled
+ * - KErrNotReady if SUPL server is not ready to determine position information,
+ * client can retry after sometime.
+ * - KErrAlreadyExists if there is already an ongoing request on sub-session.
+ * - KErrServerTerminated if server got terminated due to some error
+ * - KErrNotSupported if function is called when Session is NOT Opened with SUPL_1_0 service
+ * - KErrGeneral for all other errors
+ *
+ */
+
+ IMPORT_C void ConvertAreaInfoToCoordinates(
+ TRequestStatus& aStatus,
+ TGeoCellInfo& aGeoCellInfo );
+
+ /**
+ * Cancels an outstanding asynchronous conversion request issued via ConvertAreaInfoToCoordinates
+ * Canceling requests is typically attempted when an client
+ * is closing down.
+ *
+ */
+ IMPORT_C void CancelLocationConversion();
+
+private:
+ //Cell Information
+ TGeoCellInfo iGeoCellInfo;
+
+ //To check if conversion request has issued or not
+ TBool iConversionRequestIssued;
+ };
+
+#endif // __EPOS_SUPLTERMINALINTERNAL_H__
--- a/supl/locationsuplfw/terminalinitiationapi/inc/epos_suplterminalipc.h Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/terminalinitiationapi/inc/epos_suplterminalipc.h Thu Aug 19 10:20:18 2010 +0300
@@ -61,8 +61,9 @@
ESuplTerminalSubssnStartPeriodicTriggerWithServer,
ESuplTerminalSubssnNotifyTriggerFired,
ESuplTerminalSubssnStopTriggerSession,
-
- ESuplSubssnCustomCodesBegin = ESuplCustomIpcOffset,
+ ESuplTerminalSubssnLocationConversion,
+ ESuplTerminalSubssnCancelLocationConversion,
+ ESuplSubssnCustomCodesBegin = ESuplCustomIpcOffset
};
#endif // __EPOS_SUPLTERMINALIPC_H__
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/supl/locationsuplfw/terminalinitiationapi/src/epos_suplterminalinternal.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -0,0 +1,95 @@
+/*
+* Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Client-Server communication
+*
+*/
+#include <s32mem.h>
+#include <e32std.h>
+
+#include "epos_suplterminalinternal.h"
+#include "epos_suplterminalipc.h"
+#include "epos_suplterminalerrors.h"
+#include "epos_suplterminalptrholder.h"
+
+//-----------------------------------------------------------------------------
+// RSuplTerminalInternal
+//-----------------------------------------------------------------------------
+
+// -----------------------------------------------------------------------------
+// RSuplTerminalInternal::RSuplTerminalInternal()
+// C++ default constructor can NOT contain any code, that might leave.
+// -----------------------------------------------------------------------------
+//
+EXPORT_C RSuplTerminalInternal::RSuplTerminalInternal()
+ : iConversionRequestIssued( EFalse )
+ {
+ }
+
+// ---------------------------------------------------------
+// RSuplTerminalInternal::ConvertAreaInfoToCoordinates
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+EXPORT_C void RSuplTerminalInternal::ConvertAreaInfoToCoordinates( TRequestStatus& aStatus,
+ TGeoCellInfo& aGeoCellInfo )
+ {
+ __ASSERT_ALWAYS(SubSessionHandle(),
+ User::Panic(KSuplClientFault, ESuplServerBadHandle));
+
+ // Currently only SUPL 1.0 supports cell to geo-coordinates conversion.
+ if( iSuplService != ESUPL_1_0 )
+ {
+ TRequestStatus *status = &aStatus;
+ User::RequestComplete(status,KErrNotSupported);
+ return;
+ }
+
+ // Fill the values of data member
+ iGeoCellInfo.iMNC = aGeoCellInfo.iMNC;
+ iGeoCellInfo.iMCC = aGeoCellInfo.iMCC;
+ iGeoCellInfo.iCid = aGeoCellInfo.iCid;
+ iGeoCellInfo.iLac = aGeoCellInfo.iLac;
+ iGeoCellInfo.iConnectionPrompt = aGeoCellInfo.iConnectionPrompt;
+ iGeoCellInfo.iWlanOnly = aGeoCellInfo.iWlanOnly; //OCC
+ iGeoCellInfo.iGeoCellType = aGeoCellInfo.iGeoCellType;
+
+ iPtrHolder->Ptr(0).Set(
+ reinterpret_cast<TUint8*>(&iGeoCellInfo),
+ sizeof(iGeoCellInfo),sizeof(iGeoCellInfo));
+
+ TIpcArgs args;
+
+ args.Set(0,&iPtrHolder->Ptr(0));
+ iConversionRequestIssued = ETrue;
+ SendReceive(ESuplTerminalSubssnLocationConversion, args, aStatus);
+ }
+
+// ---------------------------------------------------------
+// RSuplTerminalInternal::CancelLocationConversion
+//
+// (other items were commented in a header).
+// ---------------------------------------------------------
+//
+EXPORT_C void RSuplTerminalInternal::CancelLocationConversion()
+ {
+ __ASSERT_ALWAYS(SubSessionHandle(),
+ User::Panic(KSuplClientFault, ESuplServerBadHandle));
+ if( iConversionRequestIssued )
+ {
+ iConversionRequestIssued = EFalse;
+ SendReceive(ESuplTerminalSubssnCancelLocationConversion);
+ }
+ }
+// end of file
--- a/supl/locationsuplfw/utilities/src/epos_csupltrace.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/locationsuplfw/utilities/src/epos_csupltrace.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -140,6 +140,7 @@
const TDesC& aTraceLogFile,
TRefByValue<const TDesC> aFmt, ... )
{
+ // coverity[var_decl : FALSE]
VA_LIST list;
VA_START( list, aFmt );
--- a/supl/supltiapiimplementation/src/lbssupltirequestmanager.cpp Thu Jul 15 19:06:58 2010 +0300
+++ b/supl/supltiapiimplementation/src/lbssupltirequestmanager.cpp Thu Aug 19 10:20:18 2010 +0300
@@ -165,10 +165,12 @@
//
void CCLbsSuplTiRequestManager::CloseSession()
{
- iTrace->Trace(_L("CCLbsSuplTiRequestManager::CloseSession() start"), KTraceFileName, __LINE__);
+ if(iTrace)
+ iTrace->Trace(_L("CCLbsSuplTiRequestManager::CloseSession() start"), KTraceFileName, __LINE__);
iRequestorCollection.ResetAndDestroy(); //cancels all active requests
iServer.Close();
- iTrace->Trace(_L("CCLbsSuplTiRequestManager::CloseSession() end"), KTraceFileName, __LINE__);
+ if(iTrace)
+ iTrace->Trace(_L("CCLbsSuplTiRequestManager::CloseSession() end"), KTraceFileName, __LINE__);
}
// -----------------------------------------------------------------------------
// CCLbsSuplTiRequestManager::FindSessionId