5
|
1 |
/*
|
|
2 |
* Copyright (c) 2005-2006 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 the License "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: CLandmarkCmdBase class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef __CLANDMARKCMDBASE_H__
|
|
20 |
#define __CLANDMARKCMDBASE_H__
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <e32base.h>
|
|
24 |
|
|
25 |
//FORWARD DECLARATION
|
|
26 |
class CLandmarkHandler;
|
|
27 |
class CLandmarkFilter;
|
|
28 |
class MLandmarkObserver;
|
|
29 |
class CPosLmOperation;
|
|
30 |
class CLandmarkManageObjects;
|
|
31 |
|
|
32 |
/**
|
|
33 |
* CLandmarkCmdBase
|
|
34 |
* This class inherits from CActive.
|
|
35 |
* This forms the base class for all active objects related to landmarks database async requests.
|
|
36 |
* TransactionId() returns the transaction id of the active object.
|
|
37 |
* StartL ( CLandmarkHandler* aHandle, TInt32 aTransactionId,
|
|
38 |
* CLandmarkFilter* aFilter ) is a pure virtual function that has to be implemented.
|
|
39 |
*/
|
|
40 |
// CLASS DECLARATION
|
|
41 |
NONSHARABLE_CLASS(CLandmarkCmdBase): public CActive
|
|
42 |
{
|
|
43 |
public: //destructor
|
|
44 |
|
|
45 |
/**
|
|
46 |
* ~CLandmarkCmdBase.
|
|
47 |
* Destructor.
|
|
48 |
*/
|
|
49 |
virtual ~CLandmarkCmdBase()
|
|
50 |
{}
|
|
51 |
|
|
52 |
/**
|
|
53 |
* TransactionId.
|
|
54 |
* @return The transaction id of the active object.
|
|
55 |
*/
|
|
56 |
inline TInt32 TransactionId();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* StartL.
|
|
60 |
* This function has to be implemented for starting the asynchronous search operation.
|
|
61 |
* @param aHandle The CLandmarkHandler instance that has the handle to the database
|
|
62 |
* on which the search operation is to be made.
|
|
63 |
* @param aTransactionId The transaction id assigned to the asynchronous call.
|
|
64 |
* @param aFilter The filter to be used for the search.
|
|
65 |
*/
|
|
66 |
virtual void StartL ( CLandmarkHandler* aHandle, TInt32 aTransactionId,
|
|
67 |
CLandmarkFilter& aFilter ) = 0;
|
|
68 |
|
|
69 |
protected: //constructor
|
|
70 |
|
|
71 |
/**
|
|
72 |
* CLandmarkCmdBase.
|
|
73 |
* Constructor.
|
|
74 |
*/
|
|
75 |
inline CLandmarkCmdBase();
|
|
76 |
|
|
77 |
protected: // Data members
|
|
78 |
|
|
79 |
/**
|
|
80 |
* iTransactionId
|
|
81 |
* The tranaction id assigned to aync request.
|
|
82 |
*/
|
|
83 |
TInt32 iTransactionId;
|
|
84 |
|
|
85 |
/**
|
|
86 |
* iObserver
|
|
87 |
* The handle to the MLandmarkObserver.
|
|
88 |
*/
|
|
89 |
MLandmarkObserver* iObserver;
|
|
90 |
|
|
91 |
/**
|
|
92 |
* iHandle
|
|
93 |
* The handle to the CLandmarkHandler.
|
|
94 |
*/
|
|
95 |
CLandmarkHandler* iHandle;
|
|
96 |
|
|
97 |
/**
|
|
98 |
* iSearchOperation
|
|
99 |
* The handle to the CPosLmOperation.
|
|
100 |
*/
|
|
101 |
CPosLmOperation* iSearchOperation;
|
|
102 |
|
|
103 |
/**
|
|
104 |
* iManageObjects
|
|
105 |
* The handle to the garbage collector.
|
|
106 |
*/
|
|
107 |
CLandmarkManageObjects* iManageObjects;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* iProgress
|
|
111 |
* To keep track of search progress.
|
|
112 |
*/
|
|
113 |
TReal32 iProgress;
|
|
114 |
};
|
|
115 |
|
|
116 |
#include "clandmarkcmdbase.inl"
|
|
117 |
|
|
118 |
#endif // __CLANDMARKCMDBASE_H__
|
|
119 |
|
|
120 |
// End of File
|