|
1 /* |
|
2 * Copyright (c) 2010 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: Class declaration of PosLocationServicesEnginePrivate. |
|
15 * |
|
16 */ |
|
17 #ifndef POSLOCATIONSERVICESENGINEPRIVATE_H |
|
18 #define POSLOCATIONSERVICESENGINEPRIVATE_H |
|
19 |
|
20 #include "poslocationservicescommon.h" |
|
21 #include <epos_msuplsessionobserver.h> |
|
22 |
|
23 // Forward declaration |
|
24 class CSuplSettings; |
|
25 |
|
26 /** |
|
27 * The class defines the interface to get notification on location |
|
28 * service update.The class interested in location service update |
|
29 * should inherit from this class. |
|
30 */ |
|
31 class PosLocationServiceUpdateObserver |
|
32 { |
|
33 public: |
|
34 virtual void handleLocationServiceUpdate() = 0; |
|
35 }; |
|
36 |
|
37 |
|
38 /** |
|
39 * PosLocationServicesEnginePrivate class implements the engine logic.This |
|
40 * provides wrapper over SUPL settings API |
|
41 */ |
|
42 class PosLocationServicesEnginePrivate : public MSuplSessionObserver |
|
43 { |
|
44 public: |
|
45 /** |
|
46 * Constructor |
|
47 */ |
|
48 PosLocationServicesEnginePrivate( PosLocationServiceUpdateObserver& |
|
49 aObserver ); |
|
50 |
|
51 /** |
|
52 * Destructor |
|
53 */ |
|
54 virtual ~PosLocationServicesEnginePrivate(); |
|
55 |
|
56 /** |
|
57 * Retrieves all location services info. |
|
58 * |
|
59 * @param[out] locationServiceList List of location |
|
60 * services info. |
|
61 * @return - KErrNone if location services information retrieved successfully. |
|
62 * - KErrNotFound if there are no location services. |
|
63 * otherwise system wide error codes. |
|
64 */ |
|
65 int GetLocationServices( QList<PosLocationServiceInfo>& |
|
66 aLocationServiceList ); |
|
67 |
|
68 /** |
|
69 * Retrieves all location services info. |
|
70 * |
|
71 * @param[out] locationServiceList List of location |
|
72 * services info. |
|
73 * @leaves - KErrNone if location services information retrieved successfully. |
|
74 * - KErrNotFound if there are no location services. |
|
75 * otherwise system wide error codes. |
|
76 */ |
|
77 void GetLocationServicesL( QList<PosLocationServiceInfo>& |
|
78 aLocationServiceList ); |
|
79 /** |
|
80 * Removes location service based on the service Id. |
|
81 * |
|
82 * @param [in] serviceId Location service Id. |
|
83 * |
|
84 * @return following error codes |
|
85 * - KErrNone if successful |
|
86 * - KErrNotFound if service is not found |
|
87 * otherwise system wide error codes. |
|
88 */ |
|
89 int RemoveLocationService( int aServiceId ); |
|
90 |
|
91 public: // From MSuplSessionObserver |
|
92 virtual void HandleSuplSessionChangeL( |
|
93 TSuplSessionEventType aEvent,TInt64 aSessionId ); |
|
94 |
|
95 private:// Data members |
|
96 |
|
97 /** |
|
98 * Reference to location service update observer. |
|
99 */ |
|
100 PosLocationServiceUpdateObserver& mObserver; |
|
101 |
|
102 /** |
|
103 * Pointer to SUPL settings object. |
|
104 * Own |
|
105 */ |
|
106 CSuplSettings* mSuplSettings; |
|
107 }; |
|
108 |
|
109 #endif /* POSLOCATIONSERVICESENGINEPRIVATE_H */ |