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: |
|
15 * Retrieving maptile path from lookup db |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef __MAPTILEDBLOOKUPTABLE_H__ |
|
20 #define __MAPTILEDBLOOKUPTABLE_H__ |
|
21 |
|
22 //Headers needed |
|
23 #include <f32file.h> //RFs |
|
24 #include <d32dbms.h> //RDbNamedDatabase,RDbView |
|
25 |
|
26 #include "mylocationsdefines.h" |
|
27 /** |
|
28 * CLookupMapTileDatabase class. |
|
29 * This class handles all the operations related to maptile lookup database. |
|
30 * |
|
31 */ |
|
32 class CLookupMapTileDatabase : public CBase |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * This is a static function, which creates and returns an instance of this class. |
|
38 */ |
|
39 static CLookupMapTileDatabase* NewL( const TDesC& aLookupTableName ); |
|
40 |
|
41 /** |
|
42 * This is a static function, which creates and returns an instance of this class. |
|
43 * Pushes the created object to the cleanup stack. |
|
44 */ |
|
45 static CLookupMapTileDatabase* NewLC( const TDesC& aLookupTableName ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 ~CLookupMapTileDatabase(); |
|
51 |
|
52 public: |
|
53 |
|
54 /** |
|
55 * Finds an entry in the lookup table. |
|
56 * @param[in/out] aLookupItem The lookup item to be found in the database. |
|
57 * The source iUid is passed in the lookup item |
|
58 */ |
|
59 void FindEntryL( TLookupItem& aLookupItem ); |
|
60 |
|
61 /** |
|
62 * Finds the number of address present in db associated with the aId. |
|
63 * @param id, entry (calendar/contact) uid. |
|
64 * @return Number of address a contact has. |
|
65 */ |
|
66 int FindNumberOfAddressL( int& aId ); |
|
67 |
|
68 private: |
|
69 |
|
70 // default constructor |
|
71 CLookupMapTileDatabase(); |
|
72 |
|
73 // Second phase constructor |
|
74 void ConstructL( const TDesC& aLookupTableName ); |
|
75 |
|
76 private: |
|
77 |
|
78 // Handle to the items database |
|
79 RDbNamedDatabase iItemsDatabase; |
|
80 |
|
81 // handle to the file session |
|
82 RFs iFsSession; |
|
83 |
|
84 // holds the database file name |
|
85 TFileName iDbFileName; |
|
86 |
|
87 // holds the info about database existence. |
|
88 TBool iDatabaseExists; |
|
89 |
|
90 }; |
|
91 |
|
92 |
|
93 #endif // __MAPTILEDBLOOKUPTABLE_H__` |
|
94 |
|
95 // End of file |
|
96 |
|