|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @InternalComponent |
|
19 */ |
|
20 |
|
21 #include <e32base.h> |
|
22 #include "cresponsehandler.h" |
|
23 #include "cnetdatabus.h" |
|
24 |
|
25 class CNETDataBus; |
|
26 class CPositionerQ; |
|
27 |
|
28 class CNETResponseHandler : public CResponseHandler |
|
29 { |
|
30 public: |
|
31 static CNETResponseHandler* NewL(CPositionerQ* aPositionerQ, CRequestHandler* aRequestHandler); |
|
32 ~CNETResponseHandler(); |
|
33 |
|
34 public: |
|
35 TBool GetLastPosition(TPositionInfoBase& aPos, TTime aMaxAge, TBool aAllowPartial); |
|
36 |
|
37 // from MDataBusObserver |
|
38 void DataUpdate(TPositionInfo& aPosition, TInt aStatus, TInt aError, TTime aActualTime, TUint aAttributes, TUint aMode = 0); |
|
39 |
|
40 private: |
|
41 CNETResponseHandler(CPositionerQ* aPositionerQ, CRequestHandler* aRequestHandler); |
|
42 void ConstructL(); |
|
43 |
|
44 TInt ReadPositionFromLocDataBus(TPositionInfo& aPosInfo, TTime& aActualTime); |
|
45 TInt ReadFinal(TPositionInfo& aPosInfo, TTime& aActualTime); |
|
46 |
|
47 void Subscribe(); |
|
48 |
|
49 private: |
|
50 CNETDataBus* iNETDataBus; |
|
51 CPositionerQ* iPositionerQ; |
|
52 CRequestHandler* iRequestHandler; |
|
53 RLbsPositionUpdateRequests::TChannelIdentifer iChannel; |
|
54 }; |