1 /* |
|
2 * Copyright (c) 2002 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 * This class is a part of the standard application framework. |
|
16 * It instantiates the application views. |
|
17 * It also acts as the default command handler for the application. |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef __CVRAPPUI_H__ |
|
23 #define __CVRAPPUI_H__ |
|
24 |
|
25 // INCLUDES |
|
26 #include <aknViewAppUi.h> |
|
27 #include <apparc.h> // MApaEmbeddedDocObserver |
|
28 |
|
29 #include "MVREmbeddedObserver.h" |
|
30 |
|
31 // FORWARD DECLARATIONS |
|
32 class MVRSelectionProvider; |
|
33 class CErrorUI; |
|
34 class MVRLayoutChangeObserver; |
|
35 |
|
36 // CLASS DECLARATION |
|
37 /** |
|
38 * This class is a part of the standard application framework. |
|
39 * It instantiates the application views. |
|
40 * It also acts as the default command handler for the application. |
|
41 */ |
|
42 class CVRAppUi |
|
43 : public CAknViewAppUi |
|
44 { |
|
45 public: // Constructors and destructor |
|
46 |
|
47 /** |
|
48 * Default constructor. |
|
49 */ |
|
50 CVRAppUi(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 ~CVRAppUi(); |
|
56 |
|
57 /** |
|
58 * 2nd phase constructor. |
|
59 */ |
|
60 void ConstructL(); |
|
61 |
|
62 /** |
|
63 * Receive file handle and observer for recording |
|
64 * for file new service |
|
65 * @param aFile File handle |
|
66 * @param aObserver Observer for handing events back to file service |
|
67 */ |
|
68 void RecordNewFileL( RFile& aFile, MVREmbeddedObserver* aObserver ); |
|
69 |
|
70 /** |
|
71 * Method for setting observer for file new service |
|
72 * @param aObserver Observer for handing events back to file service |
|
73 */ |
|
74 void SetEmbeddedObserver( MVREmbeddedObserver* aObserver ); |
|
75 |
|
76 private: // from CEikAppUi |
|
77 |
|
78 /** |
|
79 * Takes care of command handling. |
|
80 * @param aCommand Command to be handled |
|
81 */ |
|
82 void HandleCommandL( TInt aCommand ); |
|
83 |
|
84 /** |
|
85 * Handles a change to the application's resources |
|
86 * @param aType The type of changed resource |
|
87 */ |
|
88 void HandleResourceChangeL( TInt aType ); |
|
89 |
|
90 /** |
|
91 * CEikAppUi::ProcessCommandParametersL() is overwritten here, because |
|
92 * otherwise it messes with the document name. |
|
93 * @param aCommand The shell command sent to the application |
|
94 * @param aDocumentName The document name that will be given to OpenFileL() |
|
95 * @param aTail The rest of the command line |
|
96 * @return Whether the final document name represents an existing file |
|
97 */ |
|
98 TBool ProcessCommandParametersL( TApaCommand aCommand, |
|
99 TFileName& aDocumentName, const TDesC8& aTail ); |
|
100 |
|
101 private: // new methods |
|
102 |
|
103 /** |
|
104 * Provides access to the current view's MVRSelectionProvider |
|
105 * interface. |
|
106 * @return pointer to the active view as MVRSelectionProvider. |
|
107 */ |
|
108 MVRSelectionProvider* SelectionProviderL(); |
|
109 |
|
110 /** |
|
111 * Check USB connection state |
|
112 * interface. |
|
113 * @return True/False |
|
114 */ |
|
115 TBool IsUsbActive(); |
|
116 |
|
117 private: // data |
|
118 /** |
|
119 * CActiveScheduler wrapper object. Owned. |
|
120 */ |
|
121 CActiveSchedulerWait iActiveWait; |
|
122 |
|
123 /** |
|
124 * Owned: CErrorUI object used to display notes when errors occur |
|
125 * in embedded activation |
|
126 */ |
|
127 CErrorUI* iErrorUI; |
|
128 |
|
129 /** |
|
130 * Pointer to object that observers layout changes and forwards |
|
131 * notification to all UI controls |
|
132 */ |
|
133 MVRLayoutChangeObserver* iLayoutChangeObserver; |
|
134 |
|
135 /** |
|
136 * Pointer to embedded observer which is notified (if not null) when |
|
137 * embedded recording is ready |
|
138 */ |
|
139 MVREmbeddedObserver* iEmbeddedObserver; |
|
140 |
|
141 /* |
|
142 * For help context, whether settings page is active. |
|
143 */ |
|
144 TBool iIsSettingsOpen; |
|
145 |
|
146 }; |
|
147 |
|
148 #endif // __CVRAPPUI_H__ |
|