|
1 /* |
|
2 * Copyright (c) 2007-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: AppMngr2 GS Installation Files plugin implementation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_APPMNGR2GSINSTFILESPLUGIN_H |
|
20 #define C_APPMNGR2GSINSTFILESPLUGIN_H |
|
21 |
|
22 #include <gsplugininterface.h> // CGSPluginInterface |
|
23 #include <AknServerApp.h> // MAknServerAppExitObserver |
|
24 #include <ConeResLoader.h> // RConeResourceLoader |
|
25 #include <apadoc.h> |
|
26 |
|
27 class CAknNullService; |
|
28 |
|
29 const TInt KAppMngr2InstFilesUidValue = 0x10282D8D; |
|
30 const TUid KAppMngr2InstFilesPluginUid = { KAppMngr2InstFilesUidValue }; |
|
31 |
|
32 |
|
33 /** |
|
34 * CAppMngrInstFilesPlugin launches embedded AppMngr2 application to show |
|
35 * Installation Files view. It is an EGSItemTypeSettingDialog type GS plug-in |
|
36 * and hence the GS framework calls HandleSelection() instead of DoActivate(). |
|
37 * CAknView functionality is not supported although the base class is derived |
|
38 * from CAknView via CGSPluginInterface. |
|
39 */ |
|
40 class CAppMngr2GsInstFilesPlugin : public CGSPluginInterface, |
|
41 public MAknServerAppExitObserver |
|
42 { |
|
43 public: // constructors and destructor |
|
44 static CAppMngr2GsInstFilesPlugin* NewL( TAny* aInitParams ); |
|
45 ~CAppMngr2GsInstFilesPlugin(); |
|
46 |
|
47 public: // from CGSPluginInterface |
|
48 void GetCaptionL( TDes& aCaption ) const; |
|
49 void HandleSelection( const TGSSelectionTypes aSelectionType ); |
|
50 TGSListboxItemTypes ItemType(); |
|
51 CGulIcon* CreateIconL( const TUid aIconType ); |
|
52 TInt PluginProviderCategory() const; |
|
53 |
|
54 public: // from CAknView, via CGSPluginInterface |
|
55 TUid Id() const; |
|
56 |
|
57 protected: // from CAknView, via CGSPluginInterface |
|
58 void DoActivateL( const TVwsViewId& aPrevViewId, TUid aCustomMessageId, |
|
59 const TDesC8& aCustomMessage ); |
|
60 void DoDeactivate(); |
|
61 |
|
62 private: // new functions |
|
63 CAppMngr2GsInstFilesPlugin(); |
|
64 void ConstructL(); |
|
65 void OpenLocalizedResourceFileL( const TDesC& aResourceFileName, |
|
66 RConeResourceLoader& aResourceLoader ); |
|
67 void LaunchAppManagerL(); |
|
68 void EmbedAppL( const TUid& aAppUid ); |
|
69 |
|
70 protected: // data |
|
71 RConeResourceLoader iResources; |
|
72 CAknNullService* iNullService; |
|
73 CApaDocument* iEmbedded; |
|
74 }; |
|
75 |
|
76 #endif // C_APPMNGR2GSINSTFILESPLUGIN_H |
|
77 |