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 * Declares Store for WidgetManager |
|
16 * |
|
17 */ |
|
18 |
|
19 #ifndef ___WMSTORE_H__ |
|
20 #define ___WMSTORE_H__ |
|
21 |
|
22 #include <AknServerApp.h> //MAknServerAppExitObserver |
|
23 |
|
24 #include "wmcommon.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class CWmMainContainer; |
|
28 class CFbsBitmap; |
|
29 class CWmConfiguration; |
|
30 class CWmConfItem; |
|
31 class CWmProcessMonitor; |
|
32 class CBrowserLauncher; |
|
33 class CWmImageConverter; |
|
34 class CWmResourceLoader; |
|
35 |
|
36 /** |
|
37 * Store ( ovi, operator ) class for Wm |
|
38 * |
|
39 * @class CWmStore wmStore.h |
|
40 */ |
|
41 NONSHARABLE_CLASS( CWmStore ) : public CBase, |
|
42 public MAknServerAppExitObserver |
|
43 { |
|
44 public: |
|
45 /** Store Id */ |
|
46 enum TStoreId |
|
47 { |
|
48 EUnknown = 0, |
|
49 EOvi, |
|
50 EStore1, |
|
51 EStore2, // for future use. Can be extented |
|
52 ELastItem // do not use as store id |
|
53 }; |
|
54 |
|
55 /* |
|
56 * Two-phased constructor. |
|
57 * |
|
58 * @param aStoreIndex index of this Store (0 or 1) |
|
59 * @param aWmConfiguration Store config |
|
60 * @param aResourceLoader wm resource loader |
|
61 */ |
|
62 static CWmStore* NewL( CWmConfItem& aWmConfItem, |
|
63 CWmResourceLoader& aResourceLoader ); |
|
64 |
|
65 /** Destructor */ |
|
66 virtual ~CWmStore(); |
|
67 |
|
68 public: // New Functions |
|
69 |
|
70 /** |
|
71 * Executes action for store |
|
72 */ |
|
73 void ExecuteL(); |
|
74 |
|
75 /** |
|
76 * Icon of store |
|
77 * |
|
78 * @return icon of Store ( ownership not transfered ) |
|
79 */ |
|
80 CFbsBitmap* StoreIcon(); |
|
81 |
|
82 /** |
|
83 * Mask for icon of store. |
|
84 * |
|
85 * @return mask of Store icon ( ownership not transfered ) |
|
86 */ |
|
87 CFbsBitmap* StoreMask(); |
|
88 |
|
89 /** |
|
90 * Heading of store |
|
91 * |
|
92 * @return heading of store. |
|
93 */ |
|
94 const TDesC& Heading(); |
|
95 |
|
96 /** |
|
97 * Order of store |
|
98 * |
|
99 * @return order of store. |
|
100 */ |
|
101 TInt Order() const; |
|
102 |
|
103 protected: // from MAknServerAppExitObserver |
|
104 |
|
105 /** Observes when browser is exited */ |
|
106 void HandleServerAppExit( TInt aReason ); |
|
107 |
|
108 protected: // Constructors |
|
109 |
|
110 /** Constructor for performing 1st stage construction */ |
|
111 CWmStore( CWmConfItem& aWmConfItem ); |
|
112 |
|
113 /** 2nd phase constructor */ |
|
114 void ConstructL( CWmResourceLoader& aResourceLoader ); |
|
115 |
|
116 private: |
|
117 |
|
118 /** Runs ovi store launcher */ |
|
119 void RunOviL(); |
|
120 |
|
121 /** Starts browser */ |
|
122 void StartBrowserL( const TDesC& aUrl ); |
|
123 |
|
124 /** Starts application */ |
|
125 void RunApplicationL(); |
|
126 |
|
127 /** Starts rprocess by given values */ |
|
128 void StartProcessL( TUid aUid, const TDesC& aParam ); |
|
129 |
|
130 /** |
|
131 * Opens cwrt/wrt widget to fullscreen. |
|
132 * @param aAppUid Uid of the widget |
|
133 * @param aParams Optional parameters |
|
134 * */ |
|
135 void StartWidgetL( TUid aAppUid, const TDesC& aParams ); |
|
136 |
|
137 private: //data members |
|
138 |
|
139 /** |
|
140 * the image converter utility |
|
141 */ |
|
142 CWmImageConverter* iImageConverter; |
|
143 |
|
144 /** |
|
145 * Configuration item for store data |
|
146 */ |
|
147 CWmConfItem& iWmConfItem; |
|
148 |
|
149 /** icon */ |
|
150 CFbsBitmap* iIcon; |
|
151 |
|
152 /** icon mask */ |
|
153 CFbsBitmap* iMask; |
|
154 |
|
155 /** |
|
156 * Monitors process |
|
157 */ |
|
158 CWmProcessMonitor* iProcessMonitor; |
|
159 |
|
160 /** |
|
161 * Broswer launcher. |
|
162 */ |
|
163 CBrowserLauncher* iBrowserLauncher; |
|
164 |
|
165 }; |
|
166 |
|
167 #endif //___WMSTORE_H__ |
|
168 |
|
169 // End of File |
|