|
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: Sis package installation event listener |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_CAWIDGETSCANNERINSTALLNOTIFIER_H |
|
20 #define C_CAWIDGETSCANNERINSTALLNOTIFIER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <e32property.h> |
|
24 |
|
25 class CCaWidgetScannerPlugin; |
|
26 |
|
27 /** |
|
28 * Central Repository notifier. |
|
29 * |
|
30 * @since S60 S60 v5.x |
|
31 */ |
|
32 class CCaWidgetScannerInstallNotifier : public CActive |
|
33 { |
|
34 /** |
|
35 * Enum defining the purpouse of the installation event. |
|
36 */ |
|
37 enum TInstOp |
|
38 { |
|
39 EInstOpNone = 0x00000000, |
|
40 EInstOpInstall = 0x00000001, |
|
41 EInstOpUninstall = 0x00000002, |
|
42 EInstOpRestore = 0x00000004 |
|
43 }; |
|
44 |
|
45 /** |
|
46 * Enum defining the exit status of the installation event. |
|
47 */ |
|
48 enum TInstOpStatus |
|
49 { |
|
50 EInstOpStatusNone = 0x00000000, |
|
51 EInstOpStatusSuccess = 0x00000100, |
|
52 EInstOpStatusAborted = 0x00000200 |
|
53 }; |
|
54 |
|
55 public: |
|
56 |
|
57 /** |
|
58 * Creates an instance of CCaWidetScannerInstallNotifier implementation. |
|
59 * @param aCallBack Reference to notifier interface. |
|
60 * @param aCategory Package uid. |
|
61 * @param aKey Key for central repository. |
|
62 */ |
|
63 static CCaWidgetScannerInstallNotifier* NewL( |
|
64 CCaWidgetScannerPlugin* aCallback, TUid aCategory, TUint aKey ); |
|
65 |
|
66 /** |
|
67 * Destructor. |
|
68 */ |
|
69 virtual ~CCaWidgetScannerInstallNotifier (); |
|
70 |
|
71 private: |
|
72 /** |
|
73 * Constructor. |
|
74 * @param aCallBack Reference to notifier interface. |
|
75 * @param aCategory Package uid. |
|
76 * @param aKey Key for central repository. |
|
77 */ |
|
78 CCaWidgetScannerInstallNotifier( CCaWidgetScannerPlugin* aCallback, |
|
79 TUid aCategory, TUint aKey ); |
|
80 |
|
81 /** |
|
82 * Symbian 2nd phase constructor. |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 /** |
|
87 * From CActive. |
|
88 */ |
|
89 void DoCancel(); |
|
90 |
|
91 /** |
|
92 * From CActive. |
|
93 */ |
|
94 void RunL(); |
|
95 |
|
96 /** |
|
97 * From CActive. |
|
98 */ |
|
99 TInt RunError( TInt aError ); |
|
100 |
|
101 private: |
|
102 /** |
|
103 * User side interface to Publish & Subscribe. |
|
104 * Own. |
|
105 */ |
|
106 RProperty iProperty; |
|
107 |
|
108 /** |
|
109 * Interface for notifying changes in SWI. |
|
110 * Not own. |
|
111 */ |
|
112 CCaWidgetScannerPlugin* iCallback; |
|
113 |
|
114 /** |
|
115 * Category uid. |
|
116 * Own. |
|
117 */ |
|
118 TUid iCategory; |
|
119 |
|
120 /** |
|
121 * Key identifier. |
|
122 * Own. |
|
123 */ |
|
124 TUint iKey; |
|
125 |
|
126 /** |
|
127 * flag provides workaround for a problem with missing notifications after install |
|
128 * |
|
129 */ |
|
130 TBool iHackFlag; // TODO find another solution |
|
131 |
|
132 }; |
|
133 |
|
134 #endif // C_CAWIDGETSCANNERINSTALLNOTIFIER_H |
|
135 // End of File |