|
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 MPOSPARAMETEROBSERVER_H |
|
21 #define MPOSPARAMETEROBSERVER_H |
|
22 |
|
23 // FORWARD DECLARATION |
|
24 class TPositionQuality; |
|
25 |
|
26 // CLASS DECLARATION |
|
27 |
|
28 /** |
|
29 * Interface implemented by the Location Server to supply positioning related |
|
30 * parameter values. |
|
31 */ |
|
32 class MPosParameterObserver |
|
33 { |
|
34 public: // New functions |
|
35 |
|
36 /** |
|
37 * Get the quality of service requested by the client. |
|
38 * |
|
39 * @param aPositionQuality The requested quality of service. |
|
40 * @return KErrNotFound if there is no requested quality of service, |
|
41 * KErrNone if there is. |
|
42 */ |
|
43 virtual TInt GetRequiredPositionQuality( |
|
44 /* OUT */ TPositionQuality& aPositionQuality |
|
45 ) const = 0; |
|
46 |
|
47 /** |
|
48 * Get the earliest allowed time of an old position fix, based on the |
|
49 * current max age set by the client. |
|
50 * |
|
51 * The PSY may save the result from the latest position request and |
|
52 * return the same result in the next position request if the client |
|
53 * says it's ok. Max age tells the PSY how old the stored position is |
|
54 * allowed to be. If the stored position is too old or the PSY does not |
|
55 * support max age, a normal positioning should be performed. |
|
56 * |
|
57 * @param aMaxAge On return, will contain the earliest allowed time of |
|
58 * an old position fix. If no max age is defined aMaxAge will contain |
|
59 * a time set to zero. |
|
60 */ |
|
61 virtual void GetMaxAge( |
|
62 /* IN */ TTime& aMaxAge |
|
63 ) const = 0; |
|
64 |
|
65 /** |
|
66 * Checks if the client allows a partial position update. |
|
67 * |
|
68 * A partial update result does not need to contain all parameters. The |
|
69 * only mandatory parameters are latitude, longitude and time of fix. |
|
70 * Everything else is optional. |
|
71 * |
|
72 * If a partial update is returned to the client in a |
|
73 * NotifyPositionUpdate call, the completion code must be set to |
|
74 * KPositionPartialUpdate. |
|
75 * |
|
76 * @return ETrue if partial position updates are allowed, otherwise |
|
77 * EFalse. |
|
78 */ |
|
79 virtual TBool IsPartialUpdateAllowed() const = 0; |
|
80 |
|
81 |
|
82 |
|
83 /** |
|
84 * Returns the location update timeout associated with the subsession. The method returns a real timeout, |
|
85 * which is defined and used by the Location Server. It may be different from the timeout set by the client |
|
86 * or default PSY timeout. |
|
87 * |
|
88 * @param aUpdateTimeOut [Out] The location update timeout. |
|
89 */ |
|
90 virtual void GetUpdateTimeOut(TTimeIntervalMicroSeconds& aUpdateTimeOut) const = 0; |
|
91 |
|
92 /** |
|
93 * Called to inform the Location Server about the PSY default update timeout. The Location |
|
94 * Server may use this value to calculate the update timeout it uses. |
|
95 * When this method is called, it does not affect the currect request. So, it must be called in advance |
|
96 * before a request comes from the Location Server. |
|
97 * |
|
98 * @param aUpdateTimeOut [In] The PSY default location update timeout. |
|
99 */ |
|
100 virtual void SetPsyDefaultUpdateTimeOut(const TTimeIntervalMicroSeconds& aUpdateTimeOut) = 0; |
|
101 |
|
102 |
|
103 /** |
|
104 * Extends the active request timeout by the value specified. Only the current active request is |
|
105 * affected and the changes are not stored. That is the value returned by GetUpdateTimeOut and |
|
106 * the default PSY timeout set by SetPsyDefaultUpdateTimeOut are not changed. |
|
107 * This method is used, for example, to apply FNP lag. |
|
108 * |
|
109 * @param aUpdateTimeOut [In] The time to extend timeout for. |
|
110 */ |
|
111 virtual void ExtendUpdateTimeOut(const TTimeIntervalMicroSeconds& aAdditionalTime) = 0; |
|
112 |
|
113 }; |
|
114 |
|
115 #endif // MPOSPARAMETEROBSERVER_H |
|
116 |
|
117 // End of File |