37 |
33 |
38 /** |
34 /** |
39 * Pure virtual method. |
35 * Pure virtual method. |
40 * @param aEvent event type. |
36 * @param aEvent event type. |
41 */ |
37 */ |
42 virtual void HandleInstallNotifyL(TInt aEvent) = 0; |
38 virtual void HandleInstallNotifyL() = 0; |
43 }; |
39 }; |
44 |
40 |
45 /** |
41 /** |
46 * CA Install notifier. |
42 * CA Install notifier. |
47 * |
43 * |
48 * @since S60 v5.0 |
44 * @since S60 v5.0 |
49 */ |
45 */ |
50 NONSHARABLE_CLASS( CCaInstallNotifier ) : public CActive |
46 NONSHARABLE_CLASS( CCaInstallNotifier ) : public CBase, |
|
47 public Usif::MSifOperationsHandler |
51 { |
48 { |
52 |
49 |
53 public: |
50 public: |
54 |
51 |
55 /** |
52 /** |
57 */ |
54 */ |
58 enum TNotificationType |
55 enum TNotificationType |
59 { |
56 { |
60 ENoNotification, ///< No notification. |
57 ENoNotification, ///< No notification. |
61 ESisInstallNotification, ///< System installation notification. |
58 ESisInstallNotification, ///< System installation notification. |
62 EJavaInstallNotification, ///< Java instalation and uninstallation notification. |
59 EAllTypesNotification, ///< System installation notification. |
63 EUsifUninstallNotification, ///< Usif's uninstalation notification. |
|
64 }; |
60 }; |
65 |
61 |
66 /** |
62 /** |
67 * Creates an instance of CCaInstallNotifier. |
63 * Creates an instance of CCaInstallNotifier. |
68 * @param aNotifier Reference to notifier interface. |
64 * @param aNotifier Reference to notifier interface. |
69 * @param aNotificationType Notification type. |
65 * @param aNotificationType Notification type. |
70 */ |
66 */ |
71 IMPORT_C static CCaInstallNotifier* NewL( MCaInstallListener& aListener, |
67 IMPORT_C static CCaInstallNotifier* NewL( MCaInstallListener& aListener, |
72 TNotificationType aNotificationType ); |
68 TNotificationType aNotificationType = EAllTypesNotification ); |
|
69 |
|
70 /** |
|
71 * Called when a new operation is started. The client should use the S |
|
72 * ubscribeL() method (@see CSifOperationsNotifier) to register for progress |
|
73 * and end notification for this operation. This function should return |
|
74 * quickly as this is run as part of an active object request completion |
|
75 * handler. |
|
76 |
|
77 * @param aKey The Start End key of the operation. |
|
78 * @param aStartData Start operation related information. |
|
79 */ |
|
80 void StartOperationHandler( |
|
81 TUint aKey, const Usif::CSifOperationStartData& aStartData); |
|
82 |
|
83 /** |
|
84 * Called when an operation completes. |
|
85 * This function should return quickly as this is run as part of an active |
|
86 * object request completion handler. |
|
87 |
|
88 * @param aEndData End operation related information. |
|
89 */ |
|
90 void EndOperationHandler(const Usif::CSifOperationEndData& aEndData); |
|
91 |
|
92 /** |
|
93 * Called whenever a progress update is available. |
|
94 * This function should return quickly as this is run as part of an active |
|
95 * object request completion handler. |
|
96 |
|
97 * @param aProgressData Progress operation related information. |
|
98 */ |
|
99 void ProgressOperationHandler( |
|
100 const Usif::CSifOperationProgressData& aProgressData); |
73 |
101 |
74 /** |
102 /** |
75 * Destructor. |
103 * Destructor. |
76 */ |
104 */ |
77 virtual ~CCaInstallNotifier(); |
105 virtual ~CCaInstallNotifier(); |
88 * Symbian 2nd phase constructor. |
116 * Symbian 2nd phase constructor. |
89 * @param aNotificationType Notification type. |
117 * @param aNotificationType Notification type. |
90 */ |
118 */ |
91 void ConstructL( TNotificationType aNotificationType ); |
119 void ConstructL( TNotificationType aNotificationType ); |
92 |
120 |
93 /** |
|
94 * From CActive. |
|
95 */ |
|
96 void DoCancel(); |
|
97 |
|
98 /** |
|
99 * From CActive. |
|
100 */ |
|
101 void RunL(); |
|
102 |
|
103 /** |
|
104 * From CActive. |
|
105 */ |
|
106 TInt RunError( TInt aError ); |
|
107 |
|
108 private: |
121 private: |
109 |
|
110 /** |
|
111 * RProperty. |
|
112 * Own. |
|
113 */ |
|
114 RProperty iProperty; |
|
115 |
122 |
116 /** |
123 /** |
117 * Interface for notifying changes in folder. |
124 * Interface for notifying changes in folder. |
118 * Not Own. |
125 * Not Own. |
119 */ |
126 */ |
120 MCaInstallListener& iListener; |
127 MCaInstallListener& iListener; |
121 |
128 |
122 /* |
129 /** |
123 * Notification strategy. |
130 * USIF notifier |
|
131 * Own. |
124 */ |
132 */ |
125 CNotifierStrategy* iNotifierStrategy; |
133 Usif::CSifOperationsNotifier* iNotifier; |
|
134 |
|
135 TUint iKey; |
|
136 |
|
137 TNotificationType iNotificationType; |
126 |
138 |
127 }; |
139 }; |
128 |
140 |
129 #endif /* CAINSTALLNOTIFIER_H */ |
141 #endif /* CAINSTALLNOTIFIER_H */ |
130 |
142 |