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