author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 13 Oct 2010 14:34:59 +0300 | |
branch | RCL_3 |
changeset 29 | c9b63fff5abf |
parent 25 | c6bafb5162d8 |
permissions | -rw-r--r-- |
25 | 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 |
#include "VRUSBStateHanlder.h" |
|
31 |
// FORWARD DECLARATIONS |
|
32 |
class MVRSelectionProvider; |
|
33 |
class CErrorUI; |
|
34 |
class MVRLayoutChangeObserver; |
|
35 |
class CAknWaitDialog; |
|
36 |
||
37 |
// CLASS DECLARATION |
|
38 |
/** |
|
39 |
* This class is a part of the standard application framework. |
|
40 |
* It instantiates the application views. |
|
41 |
* It also acts as the default command handler for the application. |
|
42 |
*/ |
|
43 |
class CVRAppUi |
|
44 |
: public CAknViewAppUi |
|
45 |
{ |
|
46 |
public: // Constructors and destructor |
|
47 |
||
48 |
/** |
|
49 |
* Default constructor. |
|
50 |
*/ |
|
51 |
CVRAppUi(); |
|
52 |
||
53 |
/** |
|
54 |
* Destructor. |
|
55 |
*/ |
|
56 |
~CVRAppUi(); |
|
57 |
||
58 |
/** |
|
59 |
* 2nd phase constructor. |
|
60 |
*/ |
|
61 |
void ConstructL(); |
|
62 |
||
63 |
/** |
|
64 |
* Receive file handle and observer for recording |
|
65 |
* for file new service |
|
66 |
* @param aFile File handle |
|
67 |
* @param aObserver Observer for handing events back to file service |
|
68 |
*/ |
|
69 |
void RecordNewFileL( RFile& aFile, MVREmbeddedObserver* aObserver ); |
|
70 |
||
71 |
/** |
|
72 |
* Method for setting observer for file new service |
|
73 |
* @param aObserver Observer for handing events back to file service |
|
74 |
*/ |
|
75 |
void SetEmbeddedObserver( MVREmbeddedObserver* aObserver ); |
|
76 |
||
77 |
private: // from CEikAppUi |
|
78 |
||
79 |
/** |
|
80 |
* Takes care of command handling. |
|
81 |
* @param aCommand Command to be handled |
|
82 |
*/ |
|
83 |
void HandleCommandL( TInt aCommand ); |
|
84 |
||
85 |
/** |
|
86 |
* Handles a change to the application's resources |
|
87 |
* @param aType The type of changed resource |
|
88 |
*/ |
|
89 |
void HandleResourceChangeL( TInt aType ); |
|
90 |
||
91 |
/** |
|
92 |
* CEikAppUi::ProcessCommandParametersL() is overwritten here, because |
|
93 |
* otherwise it messes with the document name. |
|
94 |
* @param aCommand The shell command sent to the application |
|
95 |
* @param aDocumentName The document name that will be given to OpenFileL() |
|
96 |
* @param aTail The rest of the command line |
|
97 |
* @return Whether the final document name represents an existing file |
|
98 |
*/ |
|
99 |
TBool ProcessCommandParametersL( TApaCommand aCommand, |
|
100 |
TFileName& aDocumentName, const TDesC8& aTail ); |
|
101 |
||
102 |
/** |
|
103 |
* Handles events from window group |
|
104 |
* @param aType The type of event |
|
105 |
*/ |
|
106 |
||
107 |
void HandleApplicationSpecificEventL(TInt aType, const TWsEvent& aEvent); |
|
108 |
||
109 |
private: // from MVRUSBEventObserver |
|
110 |
void HandleUSBEventL(); |
|
111 |
||
112 |
private: // new methods |
|
113 |
||
114 |
/** |
|
115 |
* Provides access to the current view's MVRSelectionProvider |
|
116 |
* interface. |
|
117 |
* @return pointer to the active view as MVRSelectionProvider. |
|
118 |
*/ |
|
119 |
MVRSelectionProvider* SelectionProviderL(); |
|
120 |
||
29
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
121 |
|
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
122 |
/** |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
123 |
* This method show a dialog to warn user to insert the SD card. |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
124 |
* @return if user insert the SD card or not |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
125 |
*/ |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
126 |
static TBool ShowDialogForWaitStorageCardL(); |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
127 |
|
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
128 |
/** |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
129 |
* This method show a dialog to warn user to plug the usb cable. |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
130 |
* @return if user plug the usb cable or not |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
131 |
*/ |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
132 |
static TBool ShowDialogForWaitUSBPluggingOutL(); |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
133 |
|
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
134 |
/** |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
135 |
* Make user insert the SD card, and choose SD card as the memo storage |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
136 |
*/ |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
137 |
void SetDriveL(); |
c9b63fff5abf
Revision: 201039
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
25
diff
changeset
|
138 |
|
25 | 139 |
private: // data |
140 |
/** |
|
141 |
* CActiveScheduler wrapper object. Owned. |
|
142 |
*/ |
|
143 |
CActiveSchedulerWait iActiveWait; |
|
144 |
||
145 |
/** |
|
146 |
* Owned: CErrorUI object used to display notes when errors occur |
|
147 |
* in embedded activation |
|
148 |
*/ |
|
149 |
CErrorUI* iErrorUI; |
|
150 |
||
151 |
/** |
|
152 |
* Pointer to object that observers layout changes and forwards |
|
153 |
* notification to all UI controls |
|
154 |
*/ |
|
155 |
MVRLayoutChangeObserver* iLayoutChangeObserver; |
|
156 |
||
157 |
/** |
|
158 |
* Pointer to embedded observer which is notified (if not null) when |
|
159 |
* embedded recording is ready |
|
160 |
*/ |
|
161 |
MVREmbeddedObserver* iEmbeddedObserver; |
|
162 |
||
163 |
/* |
|
164 |
* For help context, whether settings page is active. |
|
165 |
*/ |
|
166 |
TBool iIsSettingsOpen; |
|
167 |
||
168 |
||
169 |
}; |
|
170 |
||
171 |
#endif // __CVRAPPUI_H__ |