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: This component is to store the details of harvester plugins |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CONTENTINFOMGR_H_ |
|
19 #define CONTENTINFOMGR_H_ |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 class CContentInfoDb; |
|
24 class CContentInfo; |
|
25 |
|
26 class CContentInfoMgr : public CBase |
|
27 { |
|
28 public : |
|
29 /* |
|
30 * Construction |
|
31 * @return instance of Contentinfo manager |
|
32 */ |
|
33 static CContentInfoMgr* NewL(); |
|
34 |
|
35 /* |
|
36 * Construction |
|
37 * @return instance of content info manager |
|
38 */ |
|
39 static CContentInfoMgr* NewLC(); |
|
40 |
|
41 //Destructor |
|
42 ~CContentInfoMgr(); |
|
43 |
|
44 private : |
|
45 /* |
|
46 * Default constructor |
|
47 */ |
|
48 CContentInfoMgr(); |
|
49 |
|
50 /* |
|
51 * Second phase constructor |
|
52 */ |
|
53 void ConstructL(); |
|
54 |
|
55 public : |
|
56 /* |
|
57 * @description Adds the given details of a plugin to the contentinfo DB. |
|
58 * status will be set as 1(Not Blacklisted) |
|
59 * @param aContentInfo name,indexing status,blacklist status of content |
|
60 * @return sysmbian error code |
|
61 * Leaves in case of errors. |
|
62 */ |
|
63 TInt AddL( CContentInfo* aContentInfo ); |
|
64 |
|
65 /* |
|
66 * @description Updates the blacklsit status of the plugin. |
|
67 * @param aContentName name of the plugin |
|
68 * @param aBlacklistStatus blacklist status of plugin |
|
69 * @return sysmbian error code |
|
70 * Leaves in case of errors. |
|
71 */ |
|
72 TInt UpdateBlacklistStatusL( const TDesC& aContentName , TInt aBlacklistStatus ); |
|
73 |
|
74 /* |
|
75 * @description Updates the enable status of the plugin. |
|
76 * @param aContentName name of the plugin |
|
77 * @param aIndexStatus Indexing status of plugin |
|
78 * @return sysmbian error code |
|
79 * Leaves in case of errors. |
|
80 */ |
|
81 TInt UpdatePluginIndexStatusL( const TDesC& aContentName , TInt aIndexStatus ); |
|
82 |
|
83 /* |
|
84 * @description Finds whether the given plugin exists in the |
|
85 * database or not. |
|
86 * @param aContentName name of the plugin |
|
87 * @retutn ETrue if exists else returns EFalse |
|
88 * Leaves in case of errors. |
|
89 */ |
|
90 TBool FindL( const TDesC& aContentName ); |
|
91 |
|
92 /* |
|
93 * @description Removes the given details of a plugin from the contentInfo DB. |
|
94 * @param aContentName name of the plugin |
|
95 * Leaves in case of errors. |
|
96 */ |
|
97 void RemoveL( const TDesC& aContentName ); |
|
98 |
|
99 /* |
|
100 * @description Removes all the rows in the database |
|
101 * Leaves in case of errors. |
|
102 */ |
|
103 void ResetL( ); |
|
104 |
|
105 /* |
|
106 * @description Returns the count of the content in content info DB |
|
107 * @return content count |
|
108 * Leaves in case of errors. |
|
109 */ |
|
110 TInt GetContentCountL( ); |
|
111 |
|
112 private: |
|
113 /* |
|
114 * Interface to contentinfo database.Owned |
|
115 */ |
|
116 CContentInfoDb* iContentInfoDb; |
|
117 }; |
|
118 |
|
119 #endif /* CONTENTINFOMGR_H_ */ |
|