|
1 /* |
|
2 * Copyright (c) 2004-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: Implements the CLandmarksEngineBase class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #include <EPos_CPosLandmarkDatabase.h> |
|
21 #include <EPos_CPosLandmarkSearch.h> |
|
22 |
|
23 #include "LandmarksEngineBase.h" |
|
24 #include "LandmarksLmOpWrapper.h" |
|
25 |
|
26 // ============================ MEMBER FUNCTIONS =============================== |
|
27 |
|
28 // ----------------------------------------------------------------------------- |
|
29 // ----------------------------------------------------------------------------- |
|
30 // |
|
31 CLandmarksEngineBase::CLandmarksEngineBase( |
|
32 CPosLandmarkDatabase& aDb) |
|
33 : CActive(CActive::EPriorityStandard), |
|
34 iDb(aDb) |
|
35 { |
|
36 CActiveScheduler::Add(this); |
|
37 } |
|
38 |
|
39 // ----------------------------------------------------------------------------- |
|
40 // ----------------------------------------------------------------------------- |
|
41 // |
|
42 void CLandmarksEngineBase::ConstructL() |
|
43 { |
|
44 iSearcher = CPosLandmarkSearch::NewL(iDb); |
|
45 iLmOpWrapper = new (ELeave) CLandmarksLmOpWrapper(); |
|
46 } |
|
47 |
|
48 // ----------------------------------------------------------------------------- |
|
49 // ----------------------------------------------------------------------------- |
|
50 // |
|
51 CLandmarksEngineBase::~CLandmarksEngineBase() |
|
52 { |
|
53 delete iLmOpWrapper; |
|
54 delete iSearcher; |
|
55 } |
|
56 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // ----------------------------------------------------------------------------- |
|
59 // |
|
60 void CLandmarksEngineBase::SetPrio(CActive::TPriority aPriority) |
|
61 { |
|
62 iPriority = aPriority; |
|
63 } |
|
64 |
|
65 // ----------------------------------------------------------------------------- |
|
66 // ----------------------------------------------------------------------------- |
|
67 // |
|
68 void CLandmarksEngineBase::SetPriorityAndSetActive() |
|
69 { |
|
70 if (iPriority != Priority()) |
|
71 { |
|
72 CActive::SetPriority(iPriority); |
|
73 } |
|
74 SetActive(); |
|
75 } |
|
76 |
|
77 |