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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CPSTORAGE_H |
|
20 #define C_CPSTORAGE_H |
|
21 |
|
22 // FORWARD DECLARATIONS |
|
23 class CLiwMap; |
|
24 class CLiwGenericParamList; |
|
25 class CLiwDefaultList; |
|
26 |
|
27 /** |
|
28 * Callback Interface for observing changes in Content Publisher Database |
|
29 * |
|
30 * @since S60 v5.0 |
|
31 */ |
|
32 class MCPChangeNotifier |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * This method should be implemented by subscriber for changes in |
|
38 * database |
|
39 * |
|
40 * @param Map containing change information |
|
41 * @param Id of changed entry |
|
42 * @return |
|
43 */ |
|
44 virtual void HandleChangeL( CLiwDefaultList* aListOfMaps ) = 0; |
|
45 |
|
46 }; |
|
47 |
|
48 /** |
|
49 * Interface for CPS database implementations |
|
50 * |
|
51 */ |
|
52 class CCpStorage : public CBase |
|
53 { |
|
54 public: |
|
55 |
|
56 /** |
|
57 * Fetches data from database |
|
58 * |
|
59 * @param aMap Filtering and sorting criteria |
|
60 * @param aList Target for results |
|
61 */ |
|
62 virtual void GetListL( const CLiwMap* aMap, |
|
63 CLiwGenericParamList& aList ) = 0; |
|
64 /** |
|
65 * Adds or Updates data & action to database |
|
66 * @param Map containing data item |
|
67 * @return id of added entry |
|
68 */ |
|
69 virtual TInt32 AddL( const CLiwMap* aMap ) = 0; |
|
70 |
|
71 /** |
|
72 * Removes data item from database |
|
73 * @param Filtering and sorting criteria |
|
74 */ |
|
75 virtual void RemoveL( const CLiwMap* aMap ) = 0; |
|
76 |
|
77 /** |
|
78 * Set database observer |
|
79 * @param Callback pointer |
|
80 */ |
|
81 virtual void SetCallback( MCPChangeNotifier* aCallback ) = 0; |
|
82 |
|
83 }; |
|
84 |
|
85 #endif //C_CPSTORAGE_H |
|