|
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 MUSHENGMCESESSION_H |
|
20 #define MUSHENGMCESESSION_H |
|
21 |
|
22 // USER |
|
23 #include "musengsession.h" |
|
24 #include "lcsession.h" |
|
25 #include "lcwindow.h" |
|
26 #include "lcaudiocontrol.h" |
|
27 |
|
28 |
|
29 // CLASS DECLARATION |
|
30 |
|
31 /** |
|
32 * Base class for Multimedia Sharing Engine MCE sessions, inherited by |
|
33 * CMusEngLiveSession CMusEngClipSession and CMusEngReceiveSession. |
|
34 * |
|
35 * CMusEngMceSession encapsulates CMCESession and simplifies use of |
|
36 * MCE Sessions to user interface. Also splits observers messy events |
|
37 * to simplified function calls. |
|
38 * |
|
39 * @lib musengine.lib |
|
40 */ |
|
41 class CMusEngMceSession : public CMusEngSession, |
|
42 public MLcSession, |
|
43 public MLcWindow, |
|
44 public MLcAudioControl |
|
45 { |
|
46 |
|
47 public: |
|
48 |
|
49 /** |
|
50 * Destructor |
|
51 */ |
|
52 ~CMusEngMceSession(); |
|
53 |
|
54 |
|
55 public: // from MLcSession |
|
56 |
|
57 TLcSessionState LcSessionState() const; |
|
58 |
|
59 virtual void EstablishLcSessionL(); |
|
60 |
|
61 void TerminateLcSessionL(); |
|
62 |
|
63 virtual MLcVideoPlayer* RemoteVideoPlayer(); |
|
64 |
|
65 virtual MLcVideoPlayer* LocalVideoPlayer(); |
|
66 |
|
67 virtual const TDesC& LocalDisplayName(); |
|
68 |
|
69 virtual const TDesC& RemoteDisplayName(); |
|
70 |
|
71 TInt SetParameter( TInt aId, TInt aValue ); |
|
72 |
|
73 TInt ParameterValue( TInt aId ); |
|
74 |
|
75 void UpdateLcSessionL(); |
|
76 |
|
77 |
|
78 public: // from MLcWindow |
|
79 |
|
80 void EnableLcWindowL( TBool aEnable ); |
|
81 |
|
82 TBool IsLcWindowEnabled(); |
|
83 |
|
84 void SetLcWindowRectL( TRect aRect ); |
|
85 |
|
86 TRect LcWindowRect(); |
|
87 |
|
88 void SetLcWindowOrientationL( |
|
89 TLcWindowOrientation aOrientation ); |
|
90 |
|
91 TLcWindowOrientation LcWindowOrientationL(); |
|
92 |
|
93 public: // from MLcAudioControl |
|
94 |
|
95 TBool IsLcAudioMutedL(); |
|
96 |
|
97 void MuteLcAudioL( TBool aMute ); |
|
98 |
|
99 TBool IsLcMicMutedL(); |
|
100 |
|
101 void MuteLcMicL( TBool aMute ); |
|
102 |
|
103 TBool IsLcLoudspeakerEnabled(); |
|
104 |
|
105 void EnableLcLoudspeakerL( TBool aEnabled ); |
|
106 |
|
107 TBool IsEnablingLcLoudspeakerAllowed(); |
|
108 |
|
109 TInt LcVolumeL(); |
|
110 |
|
111 void SetLcVolumeL( TInt aValue ); |
|
112 |
|
113 void IncreaseLcVolumeL(); |
|
114 |
|
115 void DecreaseLcVolumeL(); |
|
116 |
|
117 protected: // CONSTRUCTORS |
|
118 |
|
119 /** |
|
120 * Constructor |
|
121 * |
|
122 */ |
|
123 CMusEngMceSession( const TRect& aRect ); |
|
124 |
|
125 /** |
|
126 * Second-phase constructor |
|
127 * |
|
128 */ |
|
129 void ConstructL(); |
|
130 |
|
131 |
|
132 private: |
|
133 |
|
134 MLcWindow::TLcWindowOrientation iOrientation; |
|
135 TBool iMuted; |
|
136 TBool iMicMuted; |
|
137 TBool iLoudspeakerEnabled; |
|
138 TBool iEnablingLoudspeakerAllowed; |
|
139 TInt iVolume; |
|
140 TRect iRect; |
|
141 TBool iWindowEnabled; |
|
142 |
|
143 }; |
|
144 |
|
145 #endif //MUSHENGMCESESSION_H |