|
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 /** |
|
27 * Interface for updating after installer events. |
|
28 * |
|
29 * @since S60 v5.0 |
|
30 */ |
|
31 class MCaInstallListener |
|
32 { |
|
33 |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Pure virtual method. |
|
38 * @param aEvent event type. |
|
39 */ |
|
40 virtual void HandleInstallNotifyL( TInt aEvent ) = 0; |
|
41 }; |
|
42 |
|
43 /** |
|
44 * CA Install notifier. |
|
45 * |
|
46 * @since S60 v5.0 |
|
47 */ |
|
48 NONSHARABLE_CLASS( CCaInstallNotifier ): public CActive |
|
49 { |
|
50 |
|
51 public: |
|
52 |
|
53 /** |
|
54 * Enum defining the operation type. |
|
55 */ |
|
56 enum TInstOp |
|
57 { |
|
58 EInstOpNone = 0x00000000, |
|
59 EInstOpInstall = 0x00000001, |
|
60 EInstOpUninstall = 0x00000002, |
|
61 EInstOpRestore = 0x00000004 |
|
62 }; |
|
63 |
|
64 /** |
|
65 * Enum defining the operation status. |
|
66 */ |
|
67 enum TInstOpStatus |
|
68 { |
|
69 EInstOpStatusNone = 0x00000000, |
|
70 EInstOpStatusSuccess = 0x00000100, |
|
71 EInstOpStatusAborted = 0x00000200 |
|
72 }; |
|
73 |
|
74 /** |
|
75 * Enum defining notification type. |
|
76 */ |
|
77 enum TNotificationType |
|
78 { |
|
79 ENoNotification = 0x00000000, |
|
80 ESisInstallNotification = KUidSwiLatestInstallation, ///< installation notification |
|
81 }; |
|
82 |
|
83 /** |
|
84 * Creates an instance of CCaInstallNotifier implementation. |
|
85 * @param aNotifier Reference to notifier interface. |
|
86 * @param aNotificationType Notification type. |
|
87 */ |
|
88 static CCaInstallNotifier* NewL( MCaInstallListener& aListener, |
|
89 TNotificationType aNotificationType ); |
|
90 |
|
91 /** |
|
92 * Destructor. |
|
93 */ |
|
94 virtual ~CCaInstallNotifier(); |
|
95 |
|
96 private: |
|
97 |
|
98 /** |
|
99 * Constructor. |
|
100 * @param aNotifier Reference to notifier interface. |
|
101 */ |
|
102 CCaInstallNotifier( MCaInstallListener& aListener, |
|
103 TNotificationType aNotificationType ); |
|
104 |
|
105 /** |
|
106 * Symbian 2nd phase constructor. |
|
107 * @param aNotificationType Notification type. |
|
108 */ |
|
109 void ConstructL(); |
|
110 |
|
111 /** |
|
112 * From CActive. |
|
113 */ |
|
114 void DoCancel(); |
|
115 |
|
116 /** |
|
117 * From CActive. |
|
118 */ |
|
119 void RunL(); |
|
120 |
|
121 /** |
|
122 * From CActive. |
|
123 */ |
|
124 TInt RunError( TInt aError ); |
|
125 |
|
126 private: |
|
127 |
|
128 /** |
|
129 * RProperty. |
|
130 * Own. |
|
131 */ |
|
132 RProperty iProperty; |
|
133 |
|
134 /** |
|
135 * Interface for notifying changes in folder. |
|
136 * Not Own. |
|
137 */ |
|
138 MCaInstallListener& iListener; |
|
139 |
|
140 /* |
|
141 * Notification type. |
|
142 */ |
|
143 TInt iRPropertyKey; |
|
144 |
|
145 }; |
|
146 |
|
147 #endif /* CAINSTALLNOTIFIER_H */ |
|
148 |
|
149 // End of File |
|
150 |