|
1 /* |
|
2 * Copyright (c) 2007-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 CPOSCONSTMANAGER_H |
|
21 #define CPOSCONSTMANAGER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <lbs.h> |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CRepository; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * This class manages contant values that are configurable during |
|
34 * ROM creation time. |
|
35 */ |
|
36 class CPosConstManager : public CBase |
|
37 { |
|
38 public: // Constructors and destructor |
|
39 |
|
40 /** |
|
41 * Get an instance of CPosConstManager. |
|
42 * |
|
43 * @return The new instance of this class. |
|
44 */ |
|
45 static CPosConstManager* GetInstanceL(); |
|
46 |
|
47 /** |
|
48 * Release the instance of CPosConstManager |
|
49 */ |
|
50 void ReleaseInstance(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CPosConstManager(); |
|
56 |
|
57 /** |
|
58 * Get timeshift value. In microseconds. |
|
59 * |
|
60 * @param aTtff Time to first fix value. |
|
61 * @param aTtnf Time to next fix value. |
|
62 * @param aDeviceStatus The device status. |
|
63 * @return Timeshift timeout value. |
|
64 */ |
|
65 TTimeIntervalMicroSeconds GetTimeshiftValue( |
|
66 TTimeIntervalMicroSeconds aTtff, |
|
67 TTimeIntervalMicroSeconds aTtnf, |
|
68 TPositionModuleStatus::TDeviceStatus aDeviceStatus ); |
|
69 |
|
70 /** |
|
71 * Get PSY state unkwown timeout value. in microseconds. |
|
72 * |
|
73 * @return Unused timeout value. |
|
74 */ |
|
75 TTimeIntervalMicroSeconds GetUnusedTimeoutValue() const; |
|
76 |
|
77 /** |
|
78 * Get external GPS fix state checking timeout value. |
|
79 * |
|
80 * @return External GPS PSY checking timeout value. |
|
81 */ |
|
82 TTimeIntervalMicroSeconds GetExternalGpsCheckingTimeoutValue() const; |
|
83 |
|
84 /** |
|
85 * Get cleanup timeout value. |
|
86 * |
|
87 * @return Cleanup timeout value. |
|
88 */ |
|
89 TTimeIntervalMicroSeconds GetCleanupTimeoutValue() const; |
|
90 |
|
91 /** |
|
92 * Get last time working GPS PSY from CenRep. |
|
93 * |
|
94 * @return Module ID of last time working GPS PSY. |
|
95 */ |
|
96 TPositionModuleId GetLastWorkingGpsPsyId(); |
|
97 |
|
98 /** |
|
99 * Set last time working GPS PSY to CenRep |
|
100 * Error is ignored. |
|
101 * |
|
102 * @param @aId Module ID of last time working GPS PSY. |
|
103 */ |
|
104 void SetLastWorkingGpsPsyId( TPositionModuleId aId ); |
|
105 |
|
106 private: |
|
107 |
|
108 /** |
|
109 * C++ default constructor. |
|
110 */ |
|
111 CPosConstManager(); |
|
112 |
|
113 /** |
|
114 * EPOC constructor. |
|
115 */ |
|
116 void ConstructL(); |
|
117 |
|
118 // By default, prohibit copy constructor |
|
119 CPosConstManager(const CPosConstManager&); |
|
120 // Prohibit assigment operator |
|
121 CPosConstManager& operator= (const CPosConstManager&); |
|
122 |
|
123 private: // Data |
|
124 //Central Repository |
|
125 CRepository* iRepository; |
|
126 |
|
127 //Refernce count |
|
128 TInt iRefCount; |
|
129 |
|
130 // Maximum Timeshift value whne PSY is in active or ready state |
|
131 TInt iMaxTimeshiftInActiveOrReady; |
|
132 |
|
133 // Maximum timeshift value when PSY is not in active or ready state |
|
134 TInt iMaxTimeshiftNotInActiveOrReady; |
|
135 |
|
136 // PSY state unknown timeout value |
|
137 TInt iPsyStateUnknownTimeout; |
|
138 |
|
139 // External GPS checking timeout value |
|
140 TInt iExternalGpsCheckingTimeout; |
|
141 |
|
142 // Cleanup timeout |
|
143 TInt iCleanupTimeout; |
|
144 |
|
145 // Last working GPS PSY module ID |
|
146 TPositionModuleId iLastWorkingGpsPsyId; |
|
147 |
|
148 }; |
|
149 |
|
150 #endif // CPOSCONSTMANAGER_H |
|
151 |
|
152 // End of File |