|
1 /* |
|
2 * Copyright (c) 2008 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: Interface for Location API landmark store |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MLAPILANDMARKSTORE_H |
|
20 #define MLAPILANDMARKSTORE_H |
|
21 |
|
22 // EXTERNAL INCLUDES |
|
23 #include <e32std.h> |
|
24 #include <e32def.h> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MLAPICategoryManager; |
|
28 class CLAPILandmark; |
|
29 |
|
30 /** |
|
31 * Interface to Location API landmark store implementation |
|
32 * This interface provides the basic functionalities for handling |
|
33 * individual landmarks such as adding, deleting and updating landmarks |
|
34 * |
|
35 * The interface also provides methods for reading partial landmark data |
|
36 * and full landmarks. Partial landmarks should be used for better performance |
|
37 * when reading multiple landmarks from a landmark store |
|
38 * |
|
39 * @lib N/A |
|
40 * @since S60 3.2 |
|
41 */ |
|
42 NONSHARABLE_CLASS(MLAPILandmarkStore) |
|
43 { |
|
44 public: // New functions |
|
45 |
|
46 /** |
|
47 * Reads the full landmark data from the database. The data |
|
48 * is added to the item which is passed as a parameter. Note |
|
49 * that this function may be time consuming if it is called |
|
50 * for huge amount of landmarks subsequently. |
|
51 * |
|
52 * The function should only be used when the item is needed |
|
53 * to be fully writen into the native database. |
|
54 * |
|
55 * @param aLandmark The landmark which will be read from the database |
|
56 */ |
|
57 virtual void ReadFullLandmarkL(CLAPILandmark& aLandmark) = 0; |
|
58 |
|
59 /** |
|
60 * Reads the requested attributes to a landmark from |
|
61 * the native database. It also possible to read certain |
|
62 * position fields from the native database. |
|
63 * |
|
64 * @param aLandmark The landmark which is to be read |
|
65 * @param aAttributes The attributes which are read |
|
66 * @param aAddressInfos The requested address info fields which |
|
67 * are read from the native database. If this parameter is |
|
68 * NULL, then no position fields are read. Note that the |
|
69 * ownership of the array does NOT transfer to this class |
|
70 */ |
|
71 virtual void ReadLandmarkAttributesL(CLAPILandmark& aLandmark, |
|
72 const TUint aAttributes, const RArray<TUint>* aAddressInfos) = 0; |
|
73 |
|
74 /** |
|
75 * Returns the category manager for this database. If NULL is returned |
|
76 * this database does not support categories at all. |
|
77 * |
|
78 * @return Category manager for this landmark store. The ownership is |
|
79 * NOT transferred to the caller. NULL indicates that the store |
|
80 * does not support category management |
|
81 */ |
|
82 virtual MLAPICategoryManager* CategoryManagerL() const = 0; |
|
83 |
|
84 /** |
|
85 * Indicates that a landmark is going to be disposed. This removes |
|
86 * any possible references to the landmark from this store if the |
|
87 * landmark belongs to the store |
|
88 * |
|
89 * @param aLandmark A references to the disposed landmark object |
|
90 */ |
|
91 virtual void LandmarkDisposed(CLAPILandmark& aLandmark) = 0; |
|
92 |
|
93 protected: |
|
94 |
|
95 /** |
|
96 * Destructor. |
|
97 */ |
|
98 virtual ~MLAPILandmarkStore() |
|
99 {} |
|
100 |
|
101 } |
|
102 ; |
|
103 |
|
104 #endif // MLAPILANDMARKSTORE_H |
|
105 // End of file |