83
|
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 |
* Handles istalling for wm
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
#ifndef __WMINSTALLER_
|
|
20 |
#define __WMINSTALLER_
|
|
21 |
|
|
22 |
#include <SWInstApi.h> //installer
|
|
23 |
|
|
24 |
class CIdle;
|
|
25 |
class CWmWidgetData;
|
|
26 |
class TUid;
|
|
27 |
class CWmPlugin;
|
|
28 |
|
|
29 |
/**
|
|
30 |
* CWmInstaller
|
|
31 |
*/
|
|
32 |
NONSHARABLE_CLASS( CWmInstaller ) : public CActive
|
|
33 |
{
|
|
34 |
public:
|
|
35 |
/**
|
|
36 |
* Two-phased constructors.
|
|
37 |
* @param aWmPlugin Reference to plugin root
|
|
38 |
*/
|
|
39 |
static CWmInstaller* NewL( CWmPlugin& aWmPlugin );
|
|
40 |
static CWmInstaller* NewLC( CWmPlugin& aWmPlugin );
|
|
41 |
|
|
42 |
/** Destructor */
|
|
43 |
~CWmInstaller();
|
|
44 |
|
|
45 |
private:
|
|
46 |
/** constructor */
|
|
47 |
CWmInstaller( CWmPlugin& aWmPlugin );
|
|
48 |
|
|
49 |
/** 2nd phase constructor */
|
|
50 |
void ConstructL();
|
|
51 |
|
|
52 |
protected: // implementation of CActive
|
|
53 |
/**
|
|
54 |
* Implements cancellation of an outstanding request.
|
|
55 |
*
|
|
56 |
* @see CActive::DoCancel
|
|
57 |
*/
|
|
58 |
void DoCancel();
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Handles an active object's request completion event.
|
|
62 |
*
|
|
63 |
* @see CActive::RunL
|
|
64 |
*/
|
|
65 |
void RunL();
|
|
66 |
|
|
67 |
/**
|
|
68 |
* RunError
|
|
69 |
*
|
|
70 |
* @see CActive::RunError
|
|
71 |
*/
|
|
72 |
TInt RunError(TInt aError);
|
|
73 |
|
|
74 |
private:
|
|
75 |
|
|
76 |
static TInt CloseSwiSession( TAny* aPtr );
|
|
77 |
|
|
78 |
public:
|
|
79 |
/**
|
|
80 |
* Uninstall given widget
|
|
81 |
*
|
|
82 |
* @param aData widget to unistall
|
|
83 |
*/
|
|
84 |
void UninstallL( CWmWidgetData* aData );
|
|
85 |
|
|
86 |
/**
|
|
87 |
* Returns wrt widget uid current been unistalled.
|
|
88 |
* If installer is not active returns KNullUid.
|
|
89 |
*/
|
|
90 |
TUid UninstallUid();
|
|
91 |
|
|
92 |
private:
|
|
93 |
|
|
94 |
/**
|
|
95 |
* instance of the CIdle class for async swinstaller delete
|
|
96 |
*/
|
|
97 |
CIdle* iIdle;
|
|
98 |
|
|
99 |
/**
|
|
100 |
* silent installer
|
|
101 |
*/
|
|
102 |
SwiUI::RSWInstSilentLauncher iInstaller;
|
|
103 |
|
|
104 |
/**
|
|
105 |
* wrt widget that is currently been uninstalled
|
|
106 |
*/
|
|
107 |
TUid iUid;
|
|
108 |
|
|
109 |
/**
|
|
110 |
* mime type of widget currently being uninstalled.
|
|
111 |
*/
|
|
112 |
HBufC8* iMime;
|
|
113 |
|
|
114 |
/** reference to plugin root */
|
|
115 |
CWmPlugin& iWmPlugin;
|
|
116 |
};
|
|
117 |
|
|
118 |
#endif // __WMPLUGIN_
|