9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: This class implements MMcsGetListCreatorInterface. It builds tree |
14 * Description: This class implements MMcsGetListCreatorInterface. It builds tree |
15 * output list for getlist operation |
15 * output list for getlist operation |
16 * |
16 * |
17 * |
17 * |
18 */ |
18 */ |
19 |
19 |
20 #ifndef MCSINSTALLNOTIFIER_H_ |
20 #ifndef MCSINSTALLNOTIFIER_H_ |
21 #define MCSINSTALLNOTIFIER_H_ |
21 #define MCSINSTALLNOTIFIER_H_ |
22 |
22 |
|
23 #include <sacls.h> |
23 #include <e32base.h> |
24 #include <e32base.h> |
24 #include <e32property.h> |
25 #include <e32property.h> |
25 |
26 |
|
27 class CMcsNotifierStrategy; |
|
28 class MMcsInstallListener; |
|
29 |
|
30 /** |
|
31 * MCS Install notifier. |
|
32 * |
|
33 * @since S60 v5.0 |
|
34 */ |
|
35 NONSHARABLE_CLASS( CMcsInstallNotifier ) : public CActive |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * Enum defining notification type. |
|
41 */ |
|
42 enum TNotificationType |
|
43 { |
|
44 ENoNotification, ///< No notification. |
|
45 ESisInstallNotification, ///< System installation notification. |
|
46 EJavaInstallNotification, ///< Java instalation and uninstallation notification. |
|
47 }; |
|
48 |
|
49 /** |
|
50 * Creates an instance of CCaInstallNotifier. |
|
51 * @param aNotifier Reference to notifier interface. |
|
52 * @param aNotificationType Notification type. |
|
53 */ |
|
54 static CMcsInstallNotifier* NewL( MMcsInstallListener& aListener, |
|
55 TNotificationType aNotificationType ); |
|
56 |
|
57 /** |
|
58 * Destructor. |
|
59 */ |
|
60 virtual ~CMcsInstallNotifier(); |
|
61 |
|
62 private: |
|
63 |
|
64 /** |
|
65 * Constructor. |
|
66 * @param aListener Reference to listener interface. |
|
67 */ |
|
68 CMcsInstallNotifier( MMcsInstallListener& aListener ); |
|
69 |
|
70 /** |
|
71 * Symbian 2nd phase constructor. |
|
72 * @param aNotificationType Notification type. |
|
73 */ |
|
74 void ConstructL( TNotificationType aNotificationType ); |
|
75 |
|
76 /** |
|
77 * From CActive. |
|
78 */ |
|
79 void DoCancel(); |
|
80 |
|
81 /** |
|
82 * From CActive. |
|
83 */ |
|
84 void RunL(); |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 */ |
|
89 TInt RunError( TInt aError ); |
|
90 |
|
91 private: |
|
92 |
|
93 /** |
|
94 * RProperty - own. |
|
95 */ |
|
96 RProperty iProperty; |
|
97 |
|
98 /** |
|
99 * MMcsInstallListener - own. |
|
100 */ |
|
101 MMcsInstallListener& iListener; |
|
102 |
|
103 /* |
|
104 * Notification strategy - own. |
|
105 */ |
|
106 CMcsNotifierStrategy* iNotifierStrategy; |
|
107 |
|
108 }; |
26 |
109 |
27 /** |
110 /** |
28 * Interface for updating after installer events. |
111 * Interface for updating after installer events. |
29 * |
112 * |
30 * @since S60 v5.0 |
113 * @since S60 v5.0 |
31 */ |
114 */ |
32 class MMcsInstallListener |
115 class MMcsInstallListener |
33 { |
116 { |
34 protected: |
117 public: |
|
118 |
35 /** |
119 /** |
36 * Enum defining the purpouse of the installation event. |
120 * Pure virtual method. |
|
121 * @param aUid uid of installed application. |
|
122 * @param aOperation operation type, see TSASwisOperation. |
37 */ |
123 */ |
38 enum TInstOp |
124 virtual void HandleInstallNotifyL( TUid aUid, |
39 { |
125 CMcsInstallNotifier::TNotificationType aNotificationType ) = 0; |
40 EInstOpNone = 0x00000000, |
|
41 EInstOpInstall = 0x00000001, |
|
42 EInstOpUninstall = 0x00000002, |
|
43 EInstOpRestore = 0x00000004 |
|
44 }; |
|
45 public: |
|
46 virtual void HandleInstallNotifyL(TInt aEvent) = 0; |
|
47 }; |
126 }; |
48 |
127 |
49 |
128 |
50 /** |
|
51 * MCS Install notifier. |
|
52 * |
|
53 * @since S60 v5.0 |
|
54 */ |
|
55 NONSHARABLE_CLASS( CMcsInstallNotifier ) : |
|
56 public CActive |
|
57 { |
|
58 /** |
|
59 * Enum defining the purpouse of the installation event. |
|
60 */ |
|
61 enum TInstOp |
|
62 { |
|
63 EInstOpNone = 0x00000000, |
|
64 EInstOpInstall = 0x00000001, |
|
65 EInstOpUninstall = 0x00000002, |
|
66 EInstOpRestore = 0x00000004 |
|
67 }; |
|
68 |
|
69 enum TInstOpStatus |
|
70 { |
|
71 EInstOpStatusNone = 0x00000000, |
|
72 EInstOpStatusSuccess = 0x00000100, |
|
73 EInstOpStatusAborted = 0x00000200 |
|
74 }; |
|
75 public: |
|
76 |
|
77 /** |
|
78 * Creates an instance of CMCSInstallNotifier implementation. |
|
79 * @param aNotifier Reference to notifier interface. |
|
80 * @param aCategory Package uid. |
|
81 * @param aKey Key for central repository. |
|
82 */ |
|
83 static CMcsInstallNotifier* NewL(MMcsInstallListener& aListener, TInt aKey ); |
|
84 |
|
85 /** |
|
86 * Destructor. |
|
87 */ |
|
88 virtual ~CMcsInstallNotifier(); |
|
89 |
|
90 private: |
|
91 |
|
92 /** |
|
93 * Constructor. |
|
94 * @param aNotifier Reference to notifier interface. |
|
95 * @param aCategory Package uid. |
|
96 * @param aKey Key for central repository. |
|
97 */ |
|
98 CMcsInstallNotifier( MMcsInstallListener& aListener, TInt aKey ); |
|
99 |
|
100 /** |
|
101 * Symbian 2nd phase constructor. |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 /** |
|
106 * From CActive. |
|
107 */ |
|
108 void DoCancel(); |
|
109 |
|
110 /** |
|
111 * From CActive. |
|
112 */ |
|
113 void RunL(); |
|
114 |
|
115 /** |
|
116 * From CActive. |
|
117 */ |
|
118 TInt RunError( TInt aError ); |
|
119 |
|
120 private: |
|
121 /**. |
|
122 * Own. |
|
123 */ |
|
124 RProperty iProperty; |
|
125 |
|
126 /** |
|
127 * Interface for notifying changes in folder. |
|
128 * Not Own. |
|
129 */ |
|
130 MMcsInstallListener& iListener; |
|
131 |
|
132 /* |
|
133 * |
|
134 */ |
|
135 TInt iKey; |
|
136 }; |
|
137 |
|
138 |
|
139 #endif /* MCSINSTALLNOTIFIER_H_ */ |
129 #endif /* MCSINSTALLNOTIFIER_H_ */ |