1 /* |
|
2 * Copyright (c) 2006 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 the License "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: Header file for CVideoServicesAppUi |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef VideoServicesAPPUI_H |
|
20 #define VideoServicesAPPUI_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <eikapp.h> |
|
24 #include <eikdoc.h> |
|
25 #include <eikproc.h> |
|
26 #include <e32std.h> |
|
27 #include <coeccntx.h> |
|
28 #include <aknappui.h> |
|
29 #include <browserlauncher.h> |
|
30 #include <downloadedcontenthandler.h> |
|
31 #include <centralrepository.h> |
|
32 #include <httpcachemanagerinternalcrkeys.h> |
|
33 #include "VideoServicesPrivateCRKeys.h" |
|
34 |
|
35 #include <favouriteslimits.h> // KFavouritesMaxUrl |
|
36 #include <browseroverriddensettings.h> |
|
37 |
|
38 // CONSTANTS |
|
39 const TUid KUidBrowserApplication = { 0x10008d39 }; //Browser UID |
|
40 _LIT( KBrowserPath, "Z:\\system\\apps\\Browser\\Browser.app" ); //Browser path |
|
41 |
|
42 // FORWARD DECLARATIONS |
|
43 class CVideoServicesContainer; |
|
44 class CVideoServicesAppUi; |
|
45 |
|
46 // CLASS DECLARATION |
|
47 |
|
48 /** |
|
49 * Application UI class. |
|
50 * Provides support for the EIKON control architecture |
|
51 * |
|
52 * @since Series 60 3.1 |
|
53 */ |
|
54 class CVideoServicesAppUi : public CAknAppUi, |
|
55 public MDownloadedContentHandler, |
|
56 MApaEmbeddedDocObserver |
|
57 { |
|
58 public: // Constructors and destructor |
|
59 |
|
60 /** |
|
61 * Default Constructor |
|
62 */ |
|
63 CVideoServicesAppUi(); |
|
64 |
|
65 /** |
|
66 * Destructor. |
|
67 */ |
|
68 ~CVideoServicesAppUi(); |
|
69 |
|
70 public: // From MDownloadedContentHandler |
|
71 |
|
72 /** |
|
73 * Handle downloaded content that has been saved to a file, |
|
74 * and return ETrue if it was handled successfully. |
|
75 * @param aFileName File name with path. |
|
76 * @param aParamList Generic parameter list. |
|
77 * @param aContinue Output parameter: It must be ETrue if the caller wants |
|
78 * Browser not to terminate after the content is handled. |
|
79 * @return ETrue if the implementer has processed the content. If it is |
|
80 * EFalse, BrowserLauncher opens that content in an |
|
81 * appropriate viewer application. |
|
82 */ |
|
83 TBool HandleContentL( const TDesC& aFileName, const CAiwGenericParamList& aParamList, TBool& aContinue ); |
|
84 |
|
85 /** |
|
86 * Reserved for future use. |
|
87 */ |
|
88 TAny* DownloadedContentHandlerReserved1( TAny* aAnyParam ); |
|
89 |
|
90 private: |
|
91 /** |
|
92 * EPOC Default Constructor |
|
93 */ |
|
94 void ConstructL(); |
|
95 |
|
96 /** |
|
97 * From CEikAppUi, takes care of command handling. |
|
98 * @param aCommand command to be handled |
|
99 * @return void |
|
100 * @since Series 60 3.1 |
|
101 */ |
|
102 void HandleCommandL( TInt aCommand ); |
|
103 |
|
104 /** |
|
105 * From CEikAppUi, handles key events. |
|
106 * @param aKeyEvent Event to handled. |
|
107 * @param aType Type of the key event. |
|
108 * @return Response code (EKeyWasConsumed, EKeyWasNotConsumed). |
|
109 * @since Series 60 3.1 |
|
110 */ |
|
111 virtual TKeyResponse HandleKeyEventL( |
|
112 const TKeyEvent& aKeyEvent,TEventCode aType ); |
|
113 |
|
114 private: // From MApaEmbeddedDocObserver |
|
115 /** |
|
116 * From MApaEmbeddedDocObserver, observes when the |
|
117 * embedded browser exits |
|
118 * @param aMode The browser exit mode (ignored in VideoServices) |
|
119 * @return void |
|
120 * @since Series 60 3.1 |
|
121 */ |
|
122 void NotifyExit( TExitMode aMode ); |
|
123 |
|
124 private: // New functions |
|
125 /** |
|
126 * Launches browser with "Operator-specified" url as start page |
|
127 * @return void |
|
128 * @since Series 60 3.1 |
|
129 */ |
|
130 void LaunchBrowserEmbeddedWithVideoUrlL(); |
|
131 |
|
132 public: // New functions |
|
133 /** |
|
134 * Launches the browser according to the available parameters |
|
135 * ( "Operator-specified" video url ) |
|
136 * @return void |
|
137 * @since Series 60 3.1 |
|
138 */ |
|
139 void LaunchBrowserL(); |
|
140 |
|
141 public: // Functions from MEikStatusPaneObserver |
|
142 |
|
143 /** |
|
144 * Handles status pane size change. |
|
145 * @return void |
|
146 * @since Series 60 3.1 |
|
147 */ |
|
148 void HandleStatusPaneSizeChange(); |
|
149 |
|
150 private: // Data |
|
151 |
|
152 // VideoServices App view container (not shown in final App) |
|
153 CVideoServicesContainer* iAppContainer; |
|
154 |
|
155 // Access central repository of VideoServices |
|
156 CRepository* iVideoServicesRepository; |
|
157 |
|
158 // Buffer where the url is read |
|
159 TBuf<KFavouritesMaxUrl> iUrl; |
|
160 }; |
|
161 |
|
162 #endif |
|
163 |
|
164 // End of File |
|