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