|
1 /* |
|
2 * Copyright (c) 2005 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: The MUS application's UI class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MUSUILIVESHARINGVIEW_H |
|
21 #define MUSUILIVESHARINGVIEW_H |
|
22 |
|
23 |
|
24 #include "musuisendview.h" // Base view class |
|
25 #include "musuilivesharingobserver.h" |
|
26 |
|
27 #include <aknview.h> |
|
28 |
|
29 class CMusUiLiveSharingViewContainer; |
|
30 class CMusUiLiveSharingController; |
|
31 class CMusUiActivityManager; |
|
32 class CMusUiBackgroundViewContainer; |
|
33 class CAknToolbar; |
|
34 |
|
35 |
|
36 /** |
|
37 * The MUS application's live sharing view. |
|
38 * |
|
39 * @lib musui.exe |
|
40 */ |
|
41 class CMusUiLiveSharingView : public CMusUiSendView, |
|
42 public MMusUiLiveSharingObserver |
|
43 { |
|
44 |
|
45 public: // constructors and destructor |
|
46 |
|
47 /** |
|
48 * EPOC 2nd phase constructor. |
|
49 */ |
|
50 void ConstructL(); |
|
51 |
|
52 /** |
|
53 * Destructor. |
|
54 */ |
|
55 virtual ~CMusUiLiveSharingView(); |
|
56 |
|
57 |
|
58 public: // from base class CAknView |
|
59 |
|
60 /** |
|
61 * From CAknView returns Uid of View |
|
62 * @return TUid uid of the view |
|
63 */ |
|
64 TUid Id() const; |
|
65 |
|
66 // From MEikMenuObserver, Called by framework before constructing menupane |
|
67 void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane ); |
|
68 |
|
69 |
|
70 public: // from CMusUiGeneralView |
|
71 |
|
72 void HandleToolbarCommandL( TInt aCommand ); |
|
73 |
|
74 virtual void SetInitialFocusedItemL(); |
|
75 |
|
76 void RefreshAudioRoutingButton(); |
|
77 public: // from base class MAknToolbarObserver |
|
78 |
|
79 void DynInitToolbarL( TInt aResourceId, CAknToolbar* aToolbar ); |
|
80 |
|
81 |
|
82 public: // from MMusUiLiveSharingObserver |
|
83 |
|
84 void SetZoomValues( TInt aMinZoom, TInt aMaxZoom ); |
|
85 |
|
86 void SetBrightnessValues( TInt aMinBrightness, TInt aMaxBrightness ); |
|
87 |
|
88 void SetZoomL( TInt aZoomLevel ); |
|
89 |
|
90 void SetBrightnessL( TInt aBrightnessLevel ); |
|
91 |
|
92 void SetZoomVisible( TBool aVisible ); |
|
93 |
|
94 void SetBrightnessVisible( TBool aVisible ); |
|
95 |
|
96 void ReplaceToolbarCommand( TInt aOldCommand, |
|
97 TInt aNewCommand, |
|
98 TBool aSetNewCommandFocused ); |
|
99 |
|
100 |
|
101 public: // new functions |
|
102 |
|
103 void RefreshView(); |
|
104 |
|
105 void LevelIndicatorDismissed(); |
|
106 |
|
107 void HandleKeyUpArrowL(); |
|
108 |
|
109 void HandleKeyDownArrowL(); |
|
110 |
|
111 /* In order to receive right oriented frames from camera when |
|
112 * orientation changed, it has to be recreated.Only way to do |
|
113 * from UI is to pause and play. |
|
114 * |
|
115 * aNewRect : New rectangle co-ordinates. |
|
116 * This will be compared to old rectangle co-ordinates |
|
117 * to find out whether orientation changed. |
|
118 */ |
|
119 void RefreshCameraOrientationL(TRect& aNewRect); |
|
120 |
|
121 /* ----------------------------------------------------------------------------- |
|
122 * When Live sharing paused , camera source will be unavilable, hence |
|
123 * it is inappropriate to show the zoom and brightness |
|
124 * so hide those item. And unhide it again when unpaused. |
|
125 * |
|
126 * @aIsPaused : ETrue if paused else EFalse |
|
127 */ |
|
128 void HideToolbarCommandForPause( TBool aIsPaused ); |
|
129 |
|
130 void ResetToolBarSelected(); |
|
131 |
|
132 protected: // from CMusUiSendView |
|
133 |
|
134 virtual CMusUiSendController* SendController() const; |
|
135 |
|
136 virtual CMusUiSendViewContainer* SendContainer() const; |
|
137 |
|
138 |
|
139 private: |
|
140 |
|
141 /** |
|
142 * Gets called by the framework when it's activating this view. |
|
143 * |
|
144 * @param aPrevViewId Previous view id |
|
145 * @param aCustomMessageId Custom message's id |
|
146 * @param aCustomMessage Custom message |
|
147 */ |
|
148 void DoActivateL( const TVwsViewId& aPrevViewId, |
|
149 TUid aCustomMessageId, |
|
150 const TDesC8& aCustomMessage ); |
|
151 |
|
152 /** |
|
153 * Gets called by the framework when it's deactivating this view. |
|
154 */ |
|
155 void DoDeactivate(); |
|
156 |
|
157 |
|
158 private: // data |
|
159 |
|
160 /** Container for all controls in this view. Owns. */ |
|
161 CMusUiLiveSharingViewContainer* iContainer; |
|
162 |
|
163 CMusUiLiveSharingController* iController; |
|
164 |
|
165 TBool iPauseSelected; |
|
166 |
|
167 }; |
|
168 |
|
169 |
|
170 #endif // MUSUILIVESHARINGVIEW_H |
|
171 |
|
172 // end of file |