19 #define C_CCHSWIPLUGIN_H |
19 #define C_CCHSWIPLUGIN_H |
20 |
20 |
21 #include <contentharvesterplugin.h> |
21 #include <contentharvesterplugin.h> |
22 #include <apgnotif.h> |
22 #include <apgnotif.h> |
23 |
23 |
24 #include "chswimassmodeobserver.h" |
|
25 |
|
26 class MLiwInterface; |
24 class MLiwInterface; |
27 class CLiwGenericParamList; |
25 class CLiwGenericParamList; |
28 |
|
29 class CCHSwiUsbHandler; |
|
30 class CCHSwiUsbObserver; |
|
31 |
26 |
32 /** |
27 /** |
33 * Active Data plugin for SIS installation events. |
28 * Active Data plugin for SIS installation events. |
34 * |
29 * |
35 * @since S60 S60 v3.1 |
30 * @since S60 S60 v3.1 |
36 */ |
31 */ |
37 class CCHSwiPlugin: public CContentHarvesterPlugin, |
32 class CCHSwiPlugin: public CContentHarvesterPlugin, |
38 MApaAppListServObserver, MCHSwiMassModeObserver |
33 MApaAppListServObserver |
39 { |
34 { |
40 |
35 |
41 public: |
36 public: |
42 /** |
37 /** |
43 * Two-phased constructor. |
38 * Two-phased constructor. |
56 * or when the MMC is removed/inserted. |
51 * or when the MMC is removed/inserted. |
57 */ |
52 */ |
58 void UpdateL(); |
53 void UpdateL(); |
59 |
54 |
60 private: |
55 private: |
61 |
|
62 // from MCHSwiMassModeObserver |
|
63 void SetMassStorageMode( TBool aMode ); |
|
64 TBool IsMassStorageMode(); |
|
65 void HandleMassStorageModeEndEvent(); |
|
66 void HandleSuccessfulAsynchDriveScan(); |
|
67 |
|
68 // from MApaAppListServObserver |
56 // from MApaAppListServObserver |
69 |
57 |
70 void HandleAppListEvent( TInt aEvent ); |
58 void HandleAppListEvent( TInt aEvent ); |
71 /** |
59 /** |
72 * Performs the second phase construction of a CADatSwi object. |
60 * Performs the second phase construction of a CADatSwi object. |
77 * Default Constructor. |
65 * Default Constructor. |
78 * @param aActiveSpace An instance of the Active Space Client. |
66 * @param aActiveSpace An instance of the Active Space Client. |
79 */ |
67 */ |
80 CCHSwiPlugin( MLiwInterface* aInterface ); |
68 CCHSwiPlugin( MLiwInterface* aInterface ); |
81 |
69 |
82 /** |
70 |
83 * Removes publishers from database when an applicaion |
71 /** |
84 * is uninstalled or when the MMC is removed. |
72 * This function removes publishers from database when |
|
73 * an applicaion is uninstalled or when the MMC is removed. |
85 */ |
74 */ |
86 void UpdateWidgetsL(); |
75 void UpdateWidgetsL(); |
87 |
76 |
88 /** |
77 |
89 * Removes widgets. |
|
90 * @param aWidgets Widgets list. |
|
91 */ |
|
92 void RemoveWidgetsL( CLiwGenericParamList* aWidgets ); |
78 void RemoveWidgetsL( CLiwGenericParamList* aWidgets ); |
93 |
79 |
94 /** |
|
95 * Removes single widget. |
|
96 * @param aType Widget type. |
|
97 * @param aContentId Widget UID. |
|
98 */ |
|
99 void RemoveWidgetL( const TDesC& aType, |
80 void RemoveWidgetL( const TDesC& aType, |
100 const TDesC& aContentId ); |
81 const TDesC& aContentId ); |
101 |
82 |
102 |
83 |
103 private: |
84 private: |
104 |
85 |
105 /** |
86 /** |
106 * An interface to Content Publisher Service |
87 * An interface to Content Publisher Service |
107 */ |
88 */ |
108 MLiwInterface* iCPSInterface; |
89 MLiwInterface* iCPSInterface; |
109 |
90 |
|
91 |
110 /** |
92 /** |
111 * AppArc session. |
93 * AppArc session. |
112 * Own. |
94 * Own. |
113 */ |
95 */ |
114 RApaLsSession iApaLsSession; |
96 RApaLsSession iApaLsSession; |
115 |
97 |
116 /** |
98 CApaAppListNotifier* iNotifier; ///< Change notifier. Own. |
117 * File session. |
|
118 */ |
|
119 RFs iFs; |
|
120 |
|
121 /** |
|
122 * Change notifier. |
|
123 * Own. |
|
124 */ |
|
125 CApaAppListNotifier* iNotifier; |
|
126 |
|
127 /** |
|
128 * Mass storage mode handler. |
|
129 * Own. |
|
130 */ |
|
131 CCHSwiUsbHandler* iUsbHandler; |
|
132 |
|
133 /** |
|
134 * Disk observer for monitoring status of mass drive. |
|
135 * Own. |
|
136 */ |
|
137 CCHSwiUsbObserver* iUsbObserver; |
|
138 |
|
139 /** |
|
140 * Mass storage mode flag. |
|
141 */ |
|
142 TBool iMassStorageMode; |
|
143 }; |
|
144 |
99 |
145 |
100 }; |
146 |
101 |
147 #endif // C_CCHSWIPLUGIN_H |
102 #endif // C_CCHSWIPLUGIN_H |
|
103 |