|
1 /* |
|
2 * Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef CPOSFIXEDDATACONTROLLER_H |
|
21 #define CPOSFIXEDDATACONTROLLER_H |
|
22 |
|
23 // INCLUDES |
|
24 // #include <e32base.h> |
|
25 #include <lbspositioninfo.h> |
|
26 #include "EPos_CPosControllerBase.h" |
|
27 #include "EPos_CPosSimulationPositioner.h" |
|
28 |
|
29 |
|
30 /** |
|
31 * |
|
32 * A controller class that returns fixed location information. |
|
33 * |
|
34 */ |
|
35 class CPosFixedDataController : public CPosControllerBase |
|
36 { |
|
37 public: // Constructors and destructor |
|
38 |
|
39 /** |
|
40 * Two-phased constructor. |
|
41 */ |
|
42 static CPosFixedDataController* NewL(); |
|
43 |
|
44 /** |
|
45 * Destructor. |
|
46 */ |
|
47 virtual ~CPosFixedDataController(); |
|
48 |
|
49 public: // From base classes |
|
50 |
|
51 /** |
|
52 * From CPosControllerBase. Requests position info asynchronously. |
|
53 * |
|
54 * @param aPosInfo A reference to a position info object. This object |
|
55 * must be in scope until the request has completed. |
|
56 * @param aStatus The request status. |
|
57 */ |
|
58 void NotifyPositionUpdate( |
|
59 /* IN/OUT */ TPositionInfoBase& aPosInfo, |
|
60 /* OUT */ TRequestStatus& aStatus, |
|
61 /* IN */ CPosSimulationPositioner& aSimPos |
|
62 ); |
|
63 |
|
64 /** |
|
65 * From CPosControllerBase. Cancels position info request. |
|
66 */ |
|
67 void CancelNotifyPositionUpdate(); |
|
68 |
|
69 private: // Constructors and destructor |
|
70 |
|
71 /** |
|
72 * C++ default constructor. |
|
73 */ |
|
74 CPosFixedDataController(); |
|
75 |
|
76 /** |
|
77 * EPOC constructor. |
|
78 * |
|
79 */ |
|
80 void ConstructL(); |
|
81 |
|
82 // Prohibit copy constructor |
|
83 CPosFixedDataController( const CPosFixedDataController& ); |
|
84 // Prohibit assignment operator |
|
85 CPosFixedDataController& operator= ( const CPosFixedDataController& ); |
|
86 |
|
87 private: // New functions |
|
88 |
|
89 /** |
|
90 * Completes all requests with the specified error code |
|
91 * @param aErrorCode The error code - KErrNone if everything went OK. |
|
92 * If error code is something else, the position is invalid. |
|
93 */ |
|
94 void CompleteRequest(TInt aErrorCode); |
|
95 |
|
96 private: // Functions from base classes |
|
97 |
|
98 /** |
|
99 * From CActive. Handles an active object’s request completion |
|
100 * event. |
|
101 */ |
|
102 void RunL(); |
|
103 |
|
104 /** |
|
105 * From CActive. Implements cancellation of an outstanding |
|
106 * request. |
|
107 */ |
|
108 void DoCancel(); |
|
109 |
|
110 }; |
|
111 |
|
112 #endif // CPOSFIXEDDATACONTROLLER_H |
|
113 |
|
114 // End of File |