|
1 /* |
|
2 * Copyright (c) 2006-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 "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 CHARVESTERPLUGINVALIDATOR_H |
|
20 #define CHARVESTERPLUGINVALIDATOR_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32hashtab.h> |
|
25 #include "cpluginvalidator.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class CBlacklistHandler; |
|
29 |
|
30 //CONSTS |
|
31 //PubSub Category AI plug-in registry API |
|
32 const TUid KPSUidActiveIdle2 = {0x102750F0}; // ActiveIdle2 SID |
|
33 // Indicates that all the CPS Harvester plugins have been updated |
|
34 const TUint KActiveIdleCpsPluginsUpdated = 0x0000000C; |
|
35 enum EPSActiveIdleCpsPluginsUpdated |
|
36 { |
|
37 EPSAiPluginsNotUpdated = 0, |
|
38 EPSAiPluginsUpdated |
|
39 }; |
|
40 |
|
41 /** |
|
42 * Class used to maintain required ECOM plugins implementations |
|
43 * |
|
44 * |
|
45 * @lib cpclient.dll |
|
46 * @since S60 v 5.0 |
|
47 */ |
|
48 NONSHARABLE_CLASS( CHarvesterPluginValidator ): public CPluginValidator |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Two-phased constructor. |
|
54 * |
|
55 */ |
|
56 IMPORT_C static CHarvesterPluginValidator* NewL( TUid aUid, |
|
57 TAny *aParameter = NULL ); |
|
58 |
|
59 /** |
|
60 * Two-phased constructor. |
|
61 * |
|
62 */ |
|
63 IMPORT_C static CHarvesterPluginValidator* NewLC( TUid aUid, |
|
64 TAny *aParameter = NULL ); |
|
65 |
|
66 /** |
|
67 * Desctructor. |
|
68 */ |
|
69 ~CHarvesterPluginValidator(); |
|
70 |
|
71 |
|
72 private: |
|
73 |
|
74 /** |
|
75 * C++ default constructor. |
|
76 */ |
|
77 CHarvesterPluginValidator( TUid aUid, TAny *aParameter ); |
|
78 |
|
79 /** |
|
80 * Perform the second phase construction of a CPluginValidator object. |
|
81 */ |
|
82 void ConstructL(); |
|
83 |
|
84 /** |
|
85 * Loads or destroys plugins |
|
86 */ |
|
87 void ManagePluginsL(); |
|
88 |
|
89 /** |
|
90 * Loads ECOM plugins |
|
91 */ |
|
92 void LoadPluginL( TPluginInfo& aPluginInfo ); |
|
93 |
|
94 /** |
|
95 * Calls UpdateL() for every plugin |
|
96 */ |
|
97 void UpdatePluginsL(); |
|
98 |
|
99 /** |
|
100 * Callback used for delayed update |
|
101 */ |
|
102 static TInt UpdateCallback( TAny* aValidator ); |
|
103 |
|
104 private: |
|
105 |
|
106 /** |
|
107 * Blacklist Handler |
|
108 * Own |
|
109 */ |
|
110 CBlacklistHandler* iBlacklist; |
|
111 |
|
112 /* |
|
113 * Property indicating the status of load operation |
|
114 * Own |
|
115 */ |
|
116 RProperty iInProgressProperty; |
|
117 |
|
118 /* |
|
119 * Idle AO used for delayed update |
|
120 * Own |
|
121 */ |
|
122 CIdle* iUpdateIdle; |
|
123 }; |
|
124 |
|
125 #endif // CHARVESTERPLUGINVALIDATOR_H |