|
1 /* |
|
2 * Copyright (c) 2005 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: Provides access to Blid router |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CBLIDROUTER_H |
|
20 #define CBLIDROUTER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32std.h> |
|
25 #include <f32file.h> // RFs |
|
26 #include <EPos_CPosLandmark.h> |
|
27 |
|
28 #include "MBlidRouter.h" |
|
29 |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * A Blid engine API for blid application. |
|
35 * Provides access to blid router. |
|
36 * This class implements the MBlidRouter interface provided by this dll. |
|
37 * |
|
38 */ |
|
39 class CBlidRouter : public CBase, public MBlidRouter |
|
40 { |
|
41 public: // Constructors and destructor |
|
42 /** |
|
43 * Two-phased constructor. |
|
44 */ |
|
45 static CBlidRouter* NewL(); |
|
46 |
|
47 /** |
|
48 * Destructor. |
|
49 */ |
|
50 virtual ~CBlidRouter(); |
|
51 |
|
52 private: |
|
53 /** |
|
54 * C++ default constructor. |
|
55 */ |
|
56 CBlidRouter(); |
|
57 |
|
58 /** |
|
59 * By default Symbian 2nd phase constructor is private. |
|
60 */ |
|
61 void ConstructL(); |
|
62 |
|
63 private: // From MBlidRouter |
|
64 TNamedCoordinate& At( TInt aIndex ); |
|
65 TInt AppendL( TNamedCoordinate* aCoordinate, TBool aCheckForMemory ); |
|
66 TInt RemoveL( TInt aIndex ); |
|
67 void ResetAndDestroy(); |
|
68 TInt Count(); |
|
69 TNamedCoordinate* Waypoint(); |
|
70 TInt IndexOfWaypoint() const; |
|
71 void SetWaypoint( const TInt aIndex ); |
|
72 void RemoveWaypoint(); |
|
73 void ExternalizeL( RWriteStream& aStream ); |
|
74 void InternalizeV1L( RReadStream& aStream ); |
|
75 CPosLandmark* Landmark() const; |
|
76 void SetLandmark(CPosLandmark* aLandmark); |
|
77 TBool IsWaypointSet(); |
|
78 TBool IsAnyPointSet(); |
|
79 void ClearSetPoints(); |
|
80 void SetManualWaypoint(TReal latitude, TReal longitude, TDesC& aName); |
|
81 TInt FindWaypointIndex( TNamedCoordinate* aCoordinate ); |
|
82 |
|
83 private: |
|
84 ///Own: array variable |
|
85 RPointerArray<TNamedCoordinate> iRoute; |
|
86 |
|
87 ///Ref: Current set waypoint |
|
88 TNamedCoordinate iWaypoint; |
|
89 |
|
90 ///index of waypoint |
|
91 TInt iWaypointIndex; |
|
92 |
|
93 ///to determine waypoint, landmark or none set |
|
94 TBool iIsWaypoint; |
|
95 |
|
96 ///Own:Landmark |
|
97 CPosLandmark* iLandmark; |
|
98 |
|
99 ///Own: manual waypoint set |
|
100 TNamedCoordinate iManualWaypoint; |
|
101 |
|
102 }; |
|
103 |
|
104 |
|
105 #endif // CBLIDROUTER_H |
|
106 |
|
107 // End of File |