|
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 C_CAUSIFUNINSTALLOPERATION_H |
|
19 #define C_CAUSIFUNINSTALLOPERATION_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <usif/sif/sif.h> |
|
23 |
|
24 using namespace Usif; |
|
25 |
|
26 /** |
|
27 * Uninstall Operation |
|
28 * Encapsulates the functionality of uninstalling an application. |
|
29 * |
|
30 * @lib caclient.lib |
|
31 */ |
|
32 NONSHARABLE_CLASS(CCaUsifUninstallOperation): public CActive { |
|
33 |
|
34 public: |
|
35 /** |
|
36 * Destructor |
|
37 */ |
|
38 virtual ~CCaUsifUninstallOperation(); |
|
39 |
|
40 /** |
|
41 * Two-phased constructor. Leaves on failure. |
|
42 * Allocates memory for and constructs an uninstaller object. After that |
|
43 * starts asynchronous uninnstallation of the requested entry |
|
44 * @param aEntry entry to be uninstalled |
|
45 * @param aPriority priority of the active scheduler responsible for handling |
|
46 * asynchronous installation operation |
|
47 * @return The constructed object. |
|
48 */ |
|
49 static CCaUsifUninstallOperation *NewL(TComponentId, TInt aPriority = |
|
50 CActive::EPriorityStandard); |
|
51 |
|
52 private: |
|
53 // construction |
|
54 /** |
|
55 * Constructor. |
|
56 * Starts active scheduler. |
|
57 * @param aEntry entry to be uninstalle |
|
58 * @param aPriority priority of the active scheduler responsible for handling |
|
59 * asynchronous installation operation |
|
60 */ |
|
61 CCaUsifUninstallOperation(TInt aPriority); |
|
62 |
|
63 /** |
|
64 * Initializes the object and starts asynchronous uninstallation process. |
|
65 * @param aEntry entry to be uninstalle |
|
66 * asynchronous installation operation |
|
67 */ |
|
68 void ConstructL(TComponentId aComponentId); |
|
69 |
|
70 |
|
71 |
|
72 private: |
|
73 // from CActive |
|
74 |
|
75 void RunL(); |
|
76 void DoCancel(); |
|
77 TInt RunError(TInt aError); |
|
78 |
|
79 private: |
|
80 COpaqueNamedParams* iArguments; |
|
81 COpaqueNamedParams* iResults; |
|
82 |
|
83 RSoftwareInstall iUninstaller; |
|
84 }; |
|
85 |
|
86 #endif // C_CAUSIFUNINSTALLOPERATION_H |