|
1 /* |
|
2 * Copyright (c) 2007 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 #ifndef C_CCHSWIPLUGIN_H |
|
19 #define C_CCHSWIPLUGIN_H |
|
20 |
|
21 #include <contentharvesterplugin.h> |
|
22 #include <apgnotif.h> |
|
23 |
|
24 class MLiwInterface; |
|
25 class CLiwGenericParamList; |
|
26 |
|
27 /** |
|
28 * Active Data plugin for SIS installation events. |
|
29 * |
|
30 * @since S60 S60 v3.1 |
|
31 */ |
|
32 class CCHSwiPlugin: public CContentHarvesterPlugin, |
|
33 MApaAppListServObserver |
|
34 { |
|
35 |
|
36 public: |
|
37 /** |
|
38 * Two-phased constructor. |
|
39 * @param aInterface liw interface |
|
40 */ |
|
41 static CCHSwiPlugin* NewL( MLiwInterface* aInterface ); |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 virtual ~CCHSwiPlugin(); |
|
47 |
|
48 /** |
|
49 * From CContentHarvesterPlugin. |
|
50 * This function updates all data entries which could change when an applicaion is installed |
|
51 * or when the MMC is removed/inserted. |
|
52 */ |
|
53 void UpdateL(); |
|
54 |
|
55 private: |
|
56 // from MApaAppListServObserver |
|
57 |
|
58 void HandleAppListEvent( TInt aEvent ); |
|
59 /** |
|
60 * Performs the second phase construction of a CADatSwi object. |
|
61 */ |
|
62 void ConstructL(); |
|
63 |
|
64 /** |
|
65 * Default Constructor. |
|
66 * @param aActiveSpace An instance of the Active Space Client. |
|
67 */ |
|
68 CCHSwiPlugin( MLiwInterface* aInterface ); |
|
69 |
|
70 |
|
71 /** |
|
72 * This function removes publishers from database when |
|
73 * an applicaion is uninstalled or when the MMC is removed. |
|
74 */ |
|
75 void UpdateWidgetsL(); |
|
76 |
|
77 |
|
78 void RemoveWidgetsL( CLiwGenericParamList* aWidgets ); |
|
79 |
|
80 void RemoveWidgetL( const TDesC& aType, |
|
81 const TDesC& aContentId ); |
|
82 |
|
83 |
|
84 private: |
|
85 |
|
86 /** |
|
87 * An interface to Content Publisher Service |
|
88 */ |
|
89 MLiwInterface* iCPSInterface; |
|
90 |
|
91 |
|
92 /** |
|
93 * AppArc session. |
|
94 * Own. |
|
95 */ |
|
96 RApaLsSession iApaLsSession; |
|
97 |
|
98 CApaAppListNotifier* iNotifier; ///< Change notifier. Own. |
|
99 |
|
100 }; |
|
101 |
|
102 #endif // C_CCHSWIPLUGIN_H |
|
103 |