|
1 /* |
|
2 * Copyright (c) 2008 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CAINSTALLNOTIFIER_H |
|
19 #define CAINSTALLNOTIFIER_H |
|
20 |
|
21 #include <sacls.h> |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 #include "castorage_global.h" |
|
25 |
|
26 class CNotifierStrategy; |
|
27 |
|
28 /** |
|
29 * Interface for updating after installer events. |
|
30 * |
|
31 * @since S60 v5.0 |
|
32 */ |
|
33 class MCaInstallListener |
|
34 { |
|
35 |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Pure virtual method. |
|
40 * @param aEvent event type. |
|
41 */ |
|
42 virtual void HandleInstallNotifyL(TInt aEvent) = 0; |
|
43 }; |
|
44 |
|
45 /** |
|
46 * CA Install notifier. |
|
47 * |
|
48 * @since S60 v5.0 |
|
49 */ |
|
50 NONSHARABLE_CLASS( CCaInstallNotifier ) : public CActive |
|
51 { |
|
52 |
|
53 public: |
|
54 |
|
55 /** |
|
56 * Enum defining notification type. |
|
57 */ |
|
58 enum TNotificationType |
|
59 { |
|
60 ENoNotification, ///< No notification. |
|
61 ESisInstallNotification, ///< System installation notification. |
|
62 EJavaInstallNotification, ///< Java instalation and uninstallation notification. |
|
63 EUsifUninstallNotification, ///< Usif's uninstalation notification. |
|
64 }; |
|
65 |
|
66 /** |
|
67 * Creates an instance of CCaInstallNotifier. |
|
68 * @param aNotifier Reference to notifier interface. |
|
69 * @param aNotificationType Notification type. |
|
70 */ |
|
71 IMPORT_C static CCaInstallNotifier* NewL( MCaInstallListener& aListener, |
|
72 TNotificationType aNotificationType ); |
|
73 |
|
74 /** |
|
75 * Destructor. |
|
76 */ |
|
77 virtual ~CCaInstallNotifier(); |
|
78 |
|
79 private: |
|
80 |
|
81 /** |
|
82 * Constructor. |
|
83 * @param aNotifier Reference to notifier interface. |
|
84 */ |
|
85 CCaInstallNotifier( MCaInstallListener& aListener ); |
|
86 |
|
87 /** |
|
88 * Symbian 2nd phase constructor. |
|
89 * @param aNotificationType Notification type. |
|
90 */ |
|
91 void ConstructL( TNotificationType aNotificationType ); |
|
92 |
|
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: |
|
109 |
|
110 /** |
|
111 * RProperty. |
|
112 * Own. |
|
113 */ |
|
114 RProperty iProperty; |
|
115 |
|
116 /** |
|
117 * Interface for notifying changes in folder. |
|
118 * Not Own. |
|
119 */ |
|
120 MCaInstallListener& iListener; |
|
121 |
|
122 /* |
|
123 * Notification strategy. |
|
124 */ |
|
125 CNotifierStrategy* iNotifierStrategy; |
|
126 |
|
127 }; |
|
128 |
|
129 #endif /* CAINSTALLNOTIFIER_H */ |
|
130 |
|
131 // End of File |
|
132 |