1 /* |
1 /* |
2 * Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
18 |
18 |
19 #ifndef C_APPMNGR2WIDGETRUNTIME_H |
19 #ifndef C_APPMNGR2WIDGETRUNTIME_H |
20 #define C_APPMNGR2WIDGETRUNTIME_H |
20 #define C_APPMNGR2WIDGETRUNTIME_H |
21 |
21 |
22 #include <appmngr2runtime.h> // CAppMngr2Runtime |
22 #include <appmngr2runtime.h> // CAppMngr2Runtime |
23 #include <widgetregistryclient.h> // RWidgetRegistryClientSession |
23 #include <WidgetRegistryClient.h> // RWidgetRegistryClientSession |
24 |
24 |
25 class CAppMngr2PackageInfo; |
25 class CAppMngr2PackageInfo; |
26 class CAknIconArray; |
26 class CAknIconArray; |
27 |
27 |
28 const TInt KAppMngr2WidgetUidValue = 0x20016BFA; |
28 const TInt KAppMngr2WidgetUidValue = 0x20016BFA; |
29 const TUid KAppMngr2WidgetUid = { KAppMngr2WidgetUidValue }; |
29 const TUid KAppMngr2WidgetUid = { KAppMngr2WidgetUidValue }; |
30 |
30 |
31 _LIT8( KDataTypeWgzWidget, "application/x-nokia-widget" ); |
31 _LIT8( KDataTypeWidget, "application/x-nokia-widget" ); |
32 _LIT8( KDataTypeWgtWidget, "application/widget" ); |
|
33 |
32 |
34 |
33 |
35 class CAppMngr2WidgetRuntime : public CAppMngr2Runtime |
34 class CAppMngr2WidgetRuntime : public CAppMngr2Runtime |
36 { |
35 { |
37 public: // constructor and destructor |
36 public: // constructor and destructor |
38 static CAppMngr2WidgetRuntime* NewL( MAppMngr2RuntimeObserver& aObserver ); |
37 static CAppMngr2WidgetRuntime* NewL( MAppMngr2RuntimeObserver& aObserver ); |
39 ~CAppMngr2WidgetRuntime(); |
38 ~CAppMngr2WidgetRuntime(); |
40 |
39 |
41 public: // from CAppMngr2Runtime |
40 public: // new CAppMngr2Runtime |
42 void LoadIconsL( CAknIconArray& aIconArray ); |
41 void LoadIconsL( CAknIconArray& aIconArray ); |
43 void GetSupportedDataTypesL( CDataTypeArray& aDataTypeArray ); |
42 void GetSupportedDataTypesL( CDataTypeArray& aDataTypeArray ); |
44 void GetInstallationFilesL( RPointerArray<CAppMngr2PackageInfo>& aPackageInfos, |
43 void GetInstallationFilesL( RPointerArray<CAppMngr2PackageInfo>& aPackageInfos, |
45 const RPointerArray<CAppMngr2RecognizedFile>& aFileList, |
44 const RPointerArray<CAppMngr2RecognizedFile>& aFileList, |
46 RFs& aFsSession, TRequestStatus& aStatus ); |
45 RFs& aFsSession, TRequestStatus& aStatus ); |
47 void CancelGetInstallationFiles(); |
46 void CancelGetInstallationFiles(); |
48 void GetInstalledAppsL( RPointerArray<CAppMngr2AppInfo>& aApps, |
47 void GetInstalledAppsL( RPointerArray<CAppMngr2AppInfo>& aApps, |
49 RFs& aFsSession, TRequestStatus& aStatus ); |
48 RFs& aFsSession, TRequestStatus& aStatus ); |
50 void CancelGetInstalledApps(); |
49 void CancelGetInstalledApps(); |
51 |
|
52 public: // new functions |
|
53 HBufC8* GetMimeTypeL( const TUid& aWidgetUid ); |
|
54 |
50 |
55 private: // new functions |
51 private: // new functions |
56 CAppMngr2WidgetRuntime( MAppMngr2RuntimeObserver& aObserver ); |
52 CAppMngr2WidgetRuntime( MAppMngr2RuntimeObserver& aObserver ); |
57 void ConstructL(); |
53 void ConstructL(); |
58 |
54 |