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