|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MUSUILIVESHARINGCONTROLLER_H |
|
20 #define MUSUILIVESHARINGCONTROLLER_H |
|
21 |
|
22 #include "musuisendcontroller.h" |
|
23 #include "musenglivesessionobserver.h" |
|
24 #include "musunittesting.h" |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <badesca.h> |
|
28 |
|
29 class MMusUiLiveSharingObserver; |
|
30 class CMusEngLiveSession; |
|
31 |
|
32 /** |
|
33 * |
|
34 * |
|
35 * @lib musui.exe |
|
36 */ |
|
37 class CMusUiLiveSharingController : public CMusUiSendController, |
|
38 public MMusEngLiveSessionObserver |
|
39 { |
|
40 |
|
41 MUS_UNITTEST( UT_CMusUiLiveSharingController; ) |
|
42 MUS_UNITTEST( UT_CMusUiEventController; ) |
|
43 |
|
44 public: |
|
45 |
|
46 static CMusUiLiveSharingController* NewL( |
|
47 MMusUiEventObserver& aEventObserver, |
|
48 MMusUiSharingObserver& aSharingObserver, |
|
49 MMusUiSendObserver& aSendObserver, |
|
50 MMusUiLiveSharingObserver& aLiveObserver, |
|
51 const TRect& aRect ); |
|
52 |
|
53 virtual ~CMusUiLiveSharingController(); |
|
54 |
|
55 |
|
56 private: |
|
57 |
|
58 CMusUiLiveSharingController( |
|
59 MMusUiEventObserver& aEventObserver, |
|
60 MMusUiSharingObserver& aSharingObserver, |
|
61 MMusUiSendObserver& aSendObserver, |
|
62 MMusUiLiveSharingObserver& aLiveObserver ); |
|
63 |
|
64 void ConstructL( const TRect& aRect ); |
|
65 |
|
66 |
|
67 public: // From CMusUiEventController: |
|
68 |
|
69 virtual void PlayL(); |
|
70 |
|
71 virtual void PauseL(); |
|
72 |
|
73 virtual void OfferToolbarEventL( TInt aCommand ); |
|
74 |
|
75 virtual void HandleCommandL( TInt aCommand ); |
|
76 |
|
77 virtual void DeleteEngineSession(); |
|
78 |
|
79 |
|
80 public: // from CMusUiSendController |
|
81 |
|
82 virtual CMusEngMceOutSession* EngineOutSession(); |
|
83 |
|
84 virtual void InviteL( const TDesC& aRecipient ); |
|
85 |
|
86 virtual void HandleSliderValueChangeL( TInt aNewLevel ); |
|
87 |
|
88 |
|
89 public: // new functions |
|
90 |
|
91 TMusUiNaviMediaDecorator RecordIcon(); |
|
92 |
|
93 TBool IsBrightnessSupported(); |
|
94 |
|
95 TBool IsDiskFull(); |
|
96 |
|
97 /** |
|
98 * Determines whether zoom adjustment is selected either from toolbar |
|
99 * or menu |
|
100 */ |
|
101 TBool ZoomSelected(); |
|
102 |
|
103 /** |
|
104 * Determines whether brightness adjustment is selected either from toolbar |
|
105 * or menu |
|
106 */ |
|
107 TBool BrightnessSelected(); |
|
108 |
|
109 void LevelIndicatorDismissed(); |
|
110 TBool ToolbarZoomSelected(); |
|
111 |
|
112 TBool ToolbarBrightnessSelected(); |
|
113 |
|
114 void ResetToolbarSelected(); |
|
115 |
|
116 |
|
117 private: // new functions: |
|
118 |
|
119 void ZoomInL(); |
|
120 |
|
121 void ZoomOutL(); |
|
122 |
|
123 void IncreaseBrightnessL(); |
|
124 |
|
125 void DecreaseBrightnessL(); |
|
126 |
|
127 void ZoomL(); |
|
128 |
|
129 void BrightnessL(); |
|
130 |
|
131 void HandleMiddleSoftkeyOkL(); |
|
132 public: // From MMusEngLiveSessionObserver |
|
133 |
|
134 void DiskFull(); |
|
135 |
|
136 |
|
137 public: // from MMusEngSessionObserver |
|
138 |
|
139 void SessionEstablished(); |
|
140 |
|
141 void SessionTerminated(); |
|
142 |
|
143 void SessionConnectionLost(); |
|
144 |
|
145 void SessionFailed(); |
|
146 |
|
147 void StreamIdle(); |
|
148 |
|
149 void StreamStreaming(); |
|
150 |
|
151 void SessionTimeChanged( const TTimeIntervalSeconds& aSeconds ); |
|
152 |
|
153 void InactivityTimeout(); |
|
154 |
|
155 |
|
156 private: |
|
157 |
|
158 MMusUiLiveSharingObserver& iLiveObserver; |
|
159 |
|
160 CMusEngLiveSession* iSession; |
|
161 |
|
162 TBool iToolbarZoomSelected; |
|
163 |
|
164 TBool iToolbarBrightnessSelected; |
|
165 |
|
166 TBool iZoomSelected; |
|
167 |
|
168 TBool iBrightnessSelected; |
|
169 |
|
170 TBool iDiskFull; |
|
171 |
|
172 }; |
|
173 |
|
174 #endif // MUSUILIVESHARINGCONTROLLER_H |
|
175 |
|
176 // end of file |