equal
deleted
inserted
replaced
18 |
18 |
19 |
19 |
20 // INCLUDE FILES |
20 // INCLUDE FILES |
21 #include <e32cmn.h> |
21 #include <e32cmn.h> |
22 #include <centralrepository.h> |
22 #include <centralrepository.h> |
23 #include <lbsSuplPsyAdaptation.h> |
23 #include <lbssuplpsyadaptation.h> |
24 #include "suplpsyrequestor.h" |
24 #include "suplpsyrequestor.h" |
25 #include "suplpsygenericinfouser.h" |
25 #include "suplpsygenericinfouser.h" |
26 #include "suplpsylogging.h" |
26 #include "suplpsylogging.h" |
27 #include "suplpsypanic.h" |
27 #include "suplpsypanic.h" |
28 #include "suplpsy.hrh" |
28 #include "suplpsy.hrh" |
65 CRepository *repository = CRepository::NewL(KCRUidSuplPsy); |
65 CRepository *repository = CRepository::NewL(KCRUidSuplPsy); |
66 |
66 |
67 //TInt keyValue; |
67 //TInt keyValue; |
68 |
68 |
69 TInt ret = repository->Get(KPSYTimeToNextFix, iTtnf); |
69 TInt ret = repository->Get(KPSYTimeToNextFix, iTtnf); |
|
70 |
|
71 if (KErrNone != repository->Get(KPSYPmUid, iPmUid)) |
|
72 { |
|
73 // Use default UID (SUPL Proxy PM) |
|
74 iPmUid = 0x102871EC; |
|
75 } |
70 |
76 |
71 delete repository; |
77 delete repository; |
72 repository = NULL; |
78 repository = NULL; |
73 |
79 |
74 TRACESTRING( "CSuplPsyRequestor::ConstructL end" ) |
80 TRACESTRING( "CSuplPsyRequestor::ConstructL end" ) |
144 //Call callback function |
150 //Call callback function |
145 if ( aReason >= KErrNone ) |
151 if ( aReason >= KErrNone ) |
146 { |
152 { |
147 //Get position info |
153 //Get position info |
148 TRACESTRING( "Extracting position... " ) |
154 TRACESTRING( "Extracting position... " ) |
149 HPositionGenericInfo* posInfo = static_cast < HPositionGenericInfo*> ( &aPosition ); |
155 HPositionGenericInfo* posInfo = static_cast < HPositionGenericInfo*> ( &aPosition ); |
150 |
156 |
151 if ( aReason >= KErrNone ) |
|
152 { |
|
153 //Set module Id |
157 //Set module Id |
154 iPositionInfo->SetModuleId( TUid::Uid( KSuplPsyImplUid ) ); |
158 iPositionInfo->SetModuleId( TUid::Uid( KSuplPsyImplUid ) ); |
155 |
159 |
156 //Set time |
160 //Set time |
157 TPosition pos; |
161 TPosition pos; |
158 posInfo->GetPosition( pos ); |
162 posInfo->GetPosition( pos ); |
159 TTime now; |
163 TTime now; |
160 now.UniversalTime(); |
164 now.UniversalTime(); |
161 pos.SetTime( now ); |
165 pos.SetTime( now ); |
162 iPositionInfo->SetPosition( pos ); |
166 iPositionInfo->SetPosition( pos ); |
163 iPrevFixSuccess = ETrue; |
167 iPrevFixSuccess = ETrue; |
164 //posInfo = NULL; |
168 |
165 } |
169 } |
166 else |
170 else |
167 { |
171 { |
168 //delete posInfo; |
172 iPrevFixSuccess = EFalse; |
169 //posInfo = NULL; |
173 } |
170 iPrevFixSuccess = EFalse; |
|
171 } |
|
172 } |
|
173 iObserver.CallBack(); |
174 iObserver.CallBack(); |
174 TRACESTRING( "CSuplPsyRequestor::OnLocationUpdate end" ) |
175 TRACESTRING( "CSuplPsyRequestor::OnLocationUpdate end" ) |
175 } |
176 } |
176 |
177 |
177 // ----------------------------------------------------------------------------- |
178 // ----------------------------------------------------------------------------- |
197 |
198 |
198 TRACESTRING( "Calling SUPL FW RunSession... " ) |
199 TRACESTRING( "Calling SUPL FW RunSession... " ) |
199 //Make location request |
200 //Make location request |
200 iRequestId = GetRequestId(); |
201 iRequestId = GetRequestId(); |
201 |
202 |
202 const TUint KProtocolModuleUidValue = 0x102871EC; |
203 const TUint KProtocolModuleUidValue = iPmUid; |
203 const TUid KProtocolModuleUid = { KProtocolModuleUidValue }; |
204 const TUid KProtocolModuleUid = { KProtocolModuleUidValue }; |
204 iPsyAdaptation->RequestLocationUpdate(iRequestId, ETrue, KProtocolModuleUid); |
205 iPsyAdaptation->RequestLocationUpdate(iRequestId, ETrue, KProtocolModuleUid); |
205 if (iFirstReq) |
206 if (iFirstReq) |
206 { |
207 { |
207 iFirstReq = EFalse; |
208 iFirstReq = EFalse; |