|
1 // Copyright (c) 2007-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 // Definition of a handler of updates received from Location Server due to |
|
15 // an early completion from the Location Server's client. |
|
16 // The handler is an active object that listens for location updates being |
|
17 // published by the Location Server on a bus to which the handler subscribes. |
|
18 // |
|
19 // |
|
20 |
|
21 /** |
|
22 @file |
|
23 @internalTechnology |
|
24 */ |
|
25 |
|
26 #ifndef __LBSLOCUPDATEHANDLER_H__ |
|
27 #define __LBSLOCUPDATEHANDLER_H__ |
|
28 |
|
29 #include <e32base.h> |
|
30 #include <lbspositioninfo.h> |
|
31 #include "LbsInternalInterface.h" |
|
32 |
|
33 class MLbsEarlyCompletionUpdateObserver |
|
34 { |
|
35 public: |
|
36 |
|
37 // Notify observers of the update used by a LocationServer client |
|
38 virtual void EarlyCompletionUpdate |
|
39 ( |
|
40 TPositionInfo& earlyCompletionUpdate, |
|
41 TTime& aTargetTime, |
|
42 TTime& aActualTime |
|
43 ) = 0; |
|
44 }; |
|
45 |
|
46 |
|
47 class CEarlyCompletionUpdateHandler : public CActive |
|
48 { |
|
49 public: |
|
50 |
|
51 static CEarlyCompletionUpdateHandler* NewL(MLbsEarlyCompletionUpdateObserver* aObserver); |
|
52 |
|
53 ~CEarlyCompletionUpdateHandler(); |
|
54 |
|
55 void ListenForEarlyCompletionUpdates(); |
|
56 |
|
57 protected: |
|
58 CEarlyCompletionUpdateHandler(MLbsEarlyCompletionUpdateObserver* aObserver); |
|
59 void ConstructL(); |
|
60 |
|
61 // From CActive |
|
62 virtual void RunL(); |
|
63 virtual void DoCancel(); |
|
64 virtual TInt RunError(TInt aError); |
|
65 |
|
66 private: |
|
67 MLbsEarlyCompletionUpdateObserver* iObserver; |
|
68 RLbsPositionUpdates iEarlyCompletionPosUpdates; |
|
69 }; |
|
70 |
|
71 #endif // __LBSLOCUPDATEHANDLER_H__ |
|
72 |