author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Thu, 17 Dec 2009 09:09:50 +0200 | |
changeset 37 | 5d0ec8b709be |
parent 19 | 989d2f495d90 |
permissions | -rw-r--r-- |
19 | 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: CLandmarkIterable class |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
#ifndef __CLANDMARKITERABLE_H__ |
|
20 |
#define __CLANDMARKITERABLE_H__ |
|
21 |
||
22 |
//INCLUDES |
|
23 |
#include <liwvariant.h> |
|
24 |
||
25 |
//FORWARD DECLARATIONS |
|
26 |
class CPosLandmark; |
|
27 |
class CPosLandmarkDatabase; |
|
28 |
class CPosLmItemIterator; |
|
37
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
29 |
class CLandmarkHandler; |
19 | 30 |
|
31 |
/** |
|
32 |
* CLandmarkIterable |
|
33 |
* This class inherits from CLiwIterable and implements the Reset() and |
|
34 |
* NextL(TLiwVariant& aEntry) functions. This class acts as wrapper for the |
|
35 |
* CPosLmItemIterator to iterate through a list of landmarks in a database. |
|
36 |
*/ |
|
37 |
// CLASS DECLARATION |
|
38 |
NONSHARABLE_CLASS(CLandmarkIterable): public CLiwIterable |
|
39 |
{ |
|
40 |
public: //New methods |
|
41 |
||
42 |
/** |
|
43 |
* NewL. |
|
44 |
* Two-phased constructor. |
|
45 |
* Create a CLandmarkIterable object. |
|
46 |
* @param aIterator The iterator to be used for iterating landmarks. This owns the iterator. |
|
47 |
* @param aDatabaseUri The URI of the database on which the iteration is to be done. |
|
48 |
* @return A pointer to the created instance of CLandmarkIterable. |
|
49 |
*/ |
|
50 |
static CLandmarkIterable* NewL( CPosLmItemIterator* aIterator, |
|
51 |
const TDesC& aDatabaseUri ); |
|
52 |
||
53 |
/** |
|
54 |
* ~CLandmarkIterable |
|
55 |
* Destructor. |
|
56 |
*/ |
|
57 |
~CLandmarkIterable(); |
|
37
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
58 |
|
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
59 |
void SetHandler(CLandmarkHandler* aHandler); |
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
60 |
void Close(); |
19 | 61 |
|
62 |
protected: //from CLiwIterable |
|
63 |
||
64 |
// Resets the iterator. |
|
65 |
void Reset(); |
|
66 |
||
67 |
// Iterates over the collection entries to fetch the next data element. |
|
68 |
TBool NextL(TLiwVariant& aEntry); |
|
69 |
||
70 |
private: //constructor |
|
71 |
||
72 |
/** |
|
73 |
* ConstructL |
|
74 |
* 2nd phase constructor. |
|
75 |
* Perform the second phase construction of a |
|
76 |
* CLandmarkIterable object. |
|
77 |
* @param aDatabaseUri The URI of the database on which the iteration is to be done. |
|
78 |
*/ |
|
79 |
void ConstructL( const TDesC& aDatabaseUri ); |
|
80 |
||
81 |
/** |
|
82 |
* CLandmarkIterable. |
|
83 |
* C++ default constructor. |
|
84 |
* @param aIterator The iterator to be used for iterating landmarks. This owns the iterator. |
|
85 |
*/ |
|
86 |
CLandmarkIterable( CPosLmItemIterator* aIterator ); |
|
87 |
||
88 |
private: //data |
|
89 |
||
37
5d0ec8b709be
Revision: 200949
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
19
diff
changeset
|
90 |
CLandmarkHandler* iHandler; |
19 | 91 |
/** |
92 |
* iIterator |
|
93 |
* The handle to the CPosLmItemIterator landmark iterator. |
|
94 |
*/ |
|
95 |
CPosLmItemIterator* iIterator; |
|
96 |
||
97 |
/** |
|
98 |
* iDatabase |
|
99 |
* The handle to the CPosLandmarkDatabase. |
|
100 |
*/ |
|
101 |
CPosLandmarkDatabase* iDatabase; |
|
102 |
||
103 |
/** |
|
104 |
* iLandmark |
|
105 |
* The CPosLandmark instance retrieved by iterator. |
|
106 |
*/ |
|
107 |
CPosLandmark* iLandmark; |
|
108 |
||
109 |
/** |
|
110 |
* iLandmarkId |
|
111 |
* The Id of the landmark stored as string. |
|
112 |
*/ |
|
113 |
HBufC* iLandmarkId; |
|
114 |
||
115 |
/** |
|
116 |
* iCategoryIds |
|
117 |
* The Id of the landmark categories stored as string. |
|
118 |
*/ |
|
119 |
RPointerArray<HBufC> iCategoryIds; |
|
120 |
}; |
|
121 |
||
122 |
#endif // __CLANDMARKITERABLE_H__ |
|
123 |
||
124 |
// End of File |