95 } |
95 } |
96 // Destructor |
96 // Destructor |
97 CSuplSessionRequest::~CSuplSessionRequest() |
97 CSuplSessionRequest::~CSuplSessionRequest() |
98 { |
98 { |
99 DEBUG_TRACE("CSuplSessionRequest::~CSuplSessionRequest", __LINE__) |
99 DEBUG_TRACE("CSuplSessionRequest::~CSuplSessionRequest", __LINE__) |
100 iSessnMgr.RemoveFromQueueForReIssueRequest(*this); |
100 //iSessnMgr.RemoveFromQueueForReIssueRequest(*this); |
101 |
101 |
102 if (iParamExtendedFallback) |
102 if (iParamExtendedFallback) |
|
103 { |
103 delete iParamExtendedFallback; |
104 delete iParamExtendedFallback; |
|
105 } |
104 |
106 |
105 if (IsActive()) |
107 if (IsActive()) |
106 Cancel(); |
108 Cancel(); |
107 } |
109 } |
108 |
110 |
120 TBool fallBack = ETrue; |
122 TBool fallBack = ETrue; |
121 TBuf<KMaxHslpAddressLength> aHslpAddress (KNullDesC); |
123 TBuf<KMaxHslpAddressLength> aHslpAddress (KNullDesC); |
122 |
124 |
123 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aFirstReq); |
125 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aFirstReq); |
124 SetActive(); |
126 SetActive(); |
125 iSessionStarted = ETrue; |
|
126 iParamFallback = ETrue; |
127 iParamFallback = ETrue; |
127 iParamSuplSessn = aSuplSessn; |
128 iParamSuplSessn = aSuplSessn; |
128 iParamSetCaps = aSetCaps; |
129 iParamSetCaps = aSetCaps; |
129 iParamReqId = aReqId; |
130 iParamReqId = aReqId; |
130 iParamFirstReq = aFirstReq; |
131 iParamFirstReq = aFirstReq; |
|
132 if (iParamExtendedFallback) |
|
133 { |
|
134 delete iParamExtendedFallback; |
|
135 iParamExtendedFallback = NULL; |
|
136 } |
131 iParamExtendedQopUsed = EFalse; |
137 iParamExtendedQopUsed = EFalse; |
132 } |
138 } |
133 // --------------------------------------------------------- |
139 // --------------------------------------------------------- |
134 // CSuplSessionRequest::MakeSuplSessionRequestL |
140 // CSuplSessionRequest::MakeSuplSessionRequestL |
135 // |
141 // |
145 TBuf<KMaxHslpAddressLength> aHslpAddress ( KNullDesC); |
151 TBuf<KMaxHslpAddressLength> aHslpAddress ( KNullDesC); |
146 |
152 |
147 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aQop, aFirstReq); |
153 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, fallBack, aSetCaps, aReqId, aQop, aFirstReq); |
148 SetActive(); |
154 SetActive(); |
149 |
155 |
150 iSessionStarted = ETrue; |
|
151 iParamFallback = ETrue; |
156 iParamFallback = ETrue; |
152 iParamSuplSessn = aSuplSessn; |
157 iParamSuplSessn = aSuplSessn; |
153 iParamSetCaps = aSetCaps; |
158 iParamSetCaps = aSetCaps; |
154 iParamReqId = aReqId; |
159 iParamReqId = aReqId; |
155 iParamFirstReq = aFirstReq; |
160 iParamFirstReq = aFirstReq; |
|
161 if (iParamExtendedFallback) |
|
162 { |
|
163 delete iParamExtendedFallback; |
|
164 iParamExtendedFallback = NULL; |
|
165 } |
156 iParamQop = aQop; |
166 iParamQop = aQop; |
157 iParamExtendedQopUsed = ETrue; |
167 iParamExtendedQopUsed = ETrue; |
158 } |
168 } |
159 |
169 |
160 void CSuplSessionRequest::MakeSuplSessionRequestL(CSuplSessionBase* aSuplSessn,const TDesC& aHslpAddress, TBool aFallBack, TInt aSetCaps, TInt aReqId, TBool aFirstReq) |
170 void CSuplSessionRequest::MakeSuplSessionRequestL(CSuplSessionBase* aSuplSessn,const TDesC& aHslpAddress, TBool aFallBack, TInt aSetCaps, TInt aReqId, TBool aFirstReq) |
163 iRequestPhase = ESuplSessionRequest; |
173 iRequestPhase = ESuplSessionRequest; |
164 iStatus = KRequestPending; |
174 iStatus = KRequestPending; |
165 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aFirstReq); |
175 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aFirstReq); |
166 SetActive(); |
176 SetActive(); |
167 |
177 |
168 iSessionStarted = ETrue; |
|
169 iParamFallback = aFallBack; |
178 iParamFallback = aFallBack; |
170 iParamSuplSessn = aSuplSessn; |
179 iParamSuplSessn = aSuplSessn; |
171 iParamSetCaps = aSetCaps; |
180 iParamSetCaps = aSetCaps; |
172 iParamReqId = aReqId; |
181 iParamReqId = aReqId; |
173 iParamFirstReq = aFirstReq; |
182 iParamFirstReq = aFirstReq; |
187 iRequestPhase = ESuplSessionRequest; |
196 iRequestPhase = ESuplSessionRequest; |
188 iStatus = KRequestPending; |
197 iStatus = KRequestPending; |
189 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aQop, aFirstReq); |
198 iSessnMgr.RunSuplSessionL(aSuplSessn, iStatus, aHslpAddress, aFallBack, aSetCaps, aReqId, aQop, aFirstReq); |
190 SetActive(); |
199 SetActive(); |
191 |
200 |
192 iSessionStarted = ETrue; |
|
193 iParamFallback = aFallBack; |
201 iParamFallback = aFallBack; |
194 iParamSuplSessn = aSuplSessn; |
202 iParamSuplSessn = aSuplSessn; |
195 iParamSetCaps = aSetCaps; |
203 iParamSetCaps = aSetCaps; |
196 iParamReqId = aReqId; |
204 iParamReqId = aReqId; |
197 iParamFirstReq = aFirstReq; |
205 iParamFirstReq = aFirstReq; |
266 void CSuplSessionRequest::RunL() |
273 void CSuplSessionRequest::RunL() |
267 { |
274 { |
268 DEBUG_TRACE("CSuplSessionRequest::RunL", __LINE__) |
275 DEBUG_TRACE("CSuplSessionRequest::RunL", __LINE__) |
269 TInt err = iStatus.Int(); |
276 TInt err = iStatus.Int(); |
270 |
277 |
271 iSessionStarted = EFalse; |
|
272 if(err != KErrNone && iRequestPhase == ESuplSessionRequest) |
278 if(err != KErrNone && iRequestPhase == ESuplSessionRequest) |
273 { |
279 { |
274 DEBUG_TRACE("Retrying session", __LINE__) |
280 DEBUG_TRACE("Retrying session", __LINE__) |
275 iRequestPhase = ESuplWaitingToRetrySession; |
281 iRequestPhase = ESuplWaitingToRetrySession; |
276 iSessnMgr.QueueForReIssueRequestL(*this); |
282 iSessnMgr.QueueForReIssueRequestL(*this); |
309 { |
315 { |
310 iRequestPhase = ESuplReqInactive; |
316 iRequestPhase = ESuplReqInactive; |
311 iNetObserver->CompleteForwardMessageL(iHandle); |
317 iNetObserver->CompleteForwardMessageL(iHandle); |
312 break; |
318 break; |
313 } |
319 } |
|
320 |
|
321 case ESuplLocationConversionRequest: |
|
322 case ESuplCancelLocationConversionRequest: |
|
323 { |
|
324 iRequestPhase = ESuplReqInactive; |
|
325 iObserver->CompleteRunSession(err); |
|
326 break; |
|
327 } |
|
328 |
|
329 |
|
330 |
314 |
331 |
315 default : |
332 default : |
316 DebugPanic(EPosSuplServerPanicRequestInconsistency); |
333 DebugPanic(EPosSuplServerPanicRequestInconsistency); |
317 } |
334 } |
318 } |
335 } |
481 // |
498 // |
482 void CSuplSessionRequest::CancelTriggerringRequest() |
499 void CSuplSessionRequest::CancelTriggerringRequest() |
483 { |
500 { |
484 DEBUG_TRACE("CSuplSessionRequest::CancelTriggerringRequest", __LINE__) |
501 DEBUG_TRACE("CSuplSessionRequest::CancelTriggerringRequest", __LINE__) |
485 iRequestPhase = ESuplStopTriggerRequest; |
502 iRequestPhase = ESuplStopTriggerRequest; |
486 iSessnMgr.CancelTriggerringSession(iSuplSessn); |
503 iSessnMgr.CancelTriggerringSession(iSuplSessn); |
487 //SetActive(); |
504 //SetActive(); |
|
505 } |
|
506 |
|
507 // --------------------------------------------------------- |
|
508 // CSuplSessionRequest::MakeLocationConversionRequestL |
|
509 // |
|
510 // (other items were commented in a header). |
|
511 // --------------------------------------------------------- |
|
512 // |
|
513 void CSuplSessionRequest::MakeLocationConversionRequestL( CSuplSessionBase* aSuplSessn, |
|
514 TGeoCellInfo& aCellInfo ) |
|
515 { |
|
516 DEBUG_TRACE("CSuplSessionRequest::MakeLocationConversionRequestL", __LINE__) |
|
517 iRequestPhase = ESuplLocationConversionRequest; |
|
518 iStatus = KRequestPending; |
|
519 iSessnMgr.MakeLocationConversionRequestL(aSuplSessn,aCellInfo,iStatus ); |
|
520 SetActive(); |
|
521 } |
|
522 |
|
523 |
|
524 // --------------------------------------------------------- |
|
525 // CSuplSessionRequest::CancelLocationConversionRequest |
|
526 // |
|
527 // (other items were commented in a header). |
|
528 // --------------------------------------------------------- |
|
529 // |
|
530 void CSuplSessionRequest::CancelLocationConversionRequest() |
|
531 { |
|
532 DEBUG_TRACE("CSuplSessionRequest::CancelLocationConversionRequest", __LINE__) |
|
533 iRequestPhase = ESuplCancelLocationConversionRequest; |
|
534 iSessnMgr.CancelLocationConversionRequest(iSuplSessn); |
488 } |
535 } |
489 |
536 |
490 // End of File |
537 // End of File |