|
1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 #ifndef __MENUUNINSTALLOPERATION_H__ |
|
18 #define __MENUUNINSTALLOPERATION_H__ |
|
19 |
|
20 #include "mcsmenuoperation.h" |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <SWInstApi.h> |
|
24 |
|
25 class RMenu; |
|
26 class CMenuItem; |
|
27 |
|
28 /** |
|
29 * Uninstall CMenuOperation |
|
30 * Encapsulates the functionality of uninstalling an application. |
|
31 */ |
|
32 NONSHARABLE_CLASS( CMenuUninstallOperation ) : public CMenuOperation |
|
33 { |
|
34 |
|
35 public: // construction |
|
36 |
|
37 virtual ~CMenuUninstallOperation(); |
|
38 |
|
39 static CMenuUninstallOperation* NewL( |
|
40 RMenu &aMenu, |
|
41 TInt aPriority, |
|
42 TRequestStatus &aObserverStatus, |
|
43 CMenuItem& aItem ); |
|
44 |
|
45 private: // construction |
|
46 |
|
47 CMenuUninstallOperation( |
|
48 RMenu &aMenu, |
|
49 TInt aPriority, |
|
50 TRequestStatus &aObserverStatus ); |
|
51 |
|
52 void ConstructL( CMenuItem& aItem ); |
|
53 |
|
54 void AppInfoL( const TUid& aAppUid, TPtrC8& aMimeType, TUid& aPackageUid ); |
|
55 |
|
56 TBool GetInstallPkgUidL( const TDesC& aAppFullName, TUid& aPackageUid ); |
|
57 void GetJavaSuitUidL( const TUid& aAppUid, TUid& aPackageUid ); |
|
58 TBool IsWidgetL( const TUid& aAppUid ); |
|
59 |
|
60 private: // from CActive |
|
61 |
|
62 void RunL(); |
|
63 void DoCancel(); |
|
64 TInt RunError( TInt aError ); |
|
65 |
|
66 private: |
|
67 |
|
68 enum TUninstState |
|
69 { |
|
70 EIdle, |
|
71 EUninstalling, |
|
72 ERemoving |
|
73 } iState; |
|
74 SwiUI::RSWInstLauncher iUninstaller; |
|
75 CMenuOperation* iRemoveOperation; |
|
76 TInt iId; |
|
77 }; |
|
78 |
|
79 #endif // __MENUUNINSTALLOPERATION_H__ |