|
1 /* |
|
2 * Copyright (c) 2004 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: Utility methods for Video Telephone application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef VTUIUTILITY_H |
|
21 #define VTUIUTILITY_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32base.h> |
|
25 #include <mvtengaudio.h> |
|
26 #include <mvtengmedia.h> |
|
27 #include <w32std.h> |
|
28 |
|
29 // FORWARD DECLARATIONS |
|
30 |
|
31 // CLASS DECLARATION |
|
32 |
|
33 /** |
|
34 * Utility methods for Video Telephone application. |
|
35 * |
|
36 * @since Series 60 2.6 |
|
37 */ |
|
38 class VtUiUtility |
|
39 { |
|
40 public: // New functions |
|
41 |
|
42 /** |
|
43 * Enumerates audio routing masks. |
|
44 */ |
|
45 enum TAudioRoutingMask |
|
46 { |
|
47 // Deactivate loudspeaker. |
|
48 EDeactivateLoudspeaker = (1<<0), |
|
49 // Activate loudspeaker. |
|
50 EActivateLoudspeaker = (1<<1), |
|
51 // Deactivate BT handsfree. |
|
52 EDeactivateBtHandsfree = (1<<2), |
|
53 // Activate BT handsfree. |
|
54 EActivateBtHandsfree = (1<<3) |
|
55 }; |
|
56 |
|
57 /** |
|
58 * Gets audio routing availabilities. |
|
59 * @param aAudio audio instance. |
|
60 * @param aAvailable availability bitmap. |
|
61 */ |
|
62 static void GetAudioRoutingAvailability( |
|
63 MVtEngAudio& aAudio, |
|
64 TInt& aAvailable ); |
|
65 |
|
66 /** |
|
67 * Gets outgoing media state. |
|
68 * @param aMedia media instance. |
|
69 * @param aAvailable availability bitmap. |
|
70 */ |
|
71 static void GetOutgoingMediaState( |
|
72 MVtEngMedia& aMedia, |
|
73 TInt& aAvailable ); |
|
74 |
|
75 /** |
|
76 * Gets incoming media state. |
|
77 * @param aMedia media instance. |
|
78 * @param aAvailable availability bitmap. |
|
79 */ |
|
80 static void GetIncomingMediaState( |
|
81 MVtEngMedia& aMedia, |
|
82 TInt& aAvailable ); |
|
83 |
|
84 /** |
|
85 * Checks if media has still image. |
|
86 * @param aMedia media instance. |
|
87 * @return ETrue if media has still image. |
|
88 */ |
|
89 static TBool HasStillImage( |
|
90 MVtEngMedia& aMedia ); |
|
91 |
|
92 /** |
|
93 * Gets freeze's current status. |
|
94 * @param aMedia media instance. |
|
95 * @return ETrue if active provider is frozen, EFalse otherwise. |
|
96 */ |
|
97 static TBool GetFreezeState( |
|
98 MVtEngMedia& aMedia ); |
|
99 |
|
100 /** |
|
101 * Checks if freeze is supported. |
|
102 * @param aMedia media instance. |
|
103 * @return ETrue if freeze is supported. |
|
104 */ |
|
105 static TBool IsFreezeSupported( |
|
106 MVtEngMedia& aMedia ); |
|
107 |
|
108 /** |
|
109 * Gets current local video quality setting. |
|
110 * @param aMedia media instance. |
|
111 * @param aVideoQuality Current local video quality settings. |
|
112 */ |
|
113 static void GetVideoQuality( |
|
114 MVtEngMedia& aMedia, |
|
115 MVtEngMedia::TVideoQuality& aVideoQuality ); |
|
116 /** |
|
117 * Gets current object sharing state. |
|
118 * @param aMedia media instance. |
|
119 * @param aShareObjectState contains current object sharing state on |
|
120 * return. |
|
121 */ |
|
122 static void GetObjectSharingState( MVtEngMedia& aMedia, |
|
123 MVtEngMedia::TShareObjectState& aShareObjectState ); |
|
124 |
|
125 /** |
|
126 * Checks if zooming is allowed. |
|
127 * @param aMedia media instance. |
|
128 * @return ETrue if allowed, EFalse otherwise. |
|
129 */ |
|
130 static TBool IsZoomAllowed( |
|
131 MVtEngMedia& aMedia ); |
|
132 |
|
133 /** |
|
134 * Checks if the device has cameras currently attached. |
|
135 * @param aMedia media instance. |
|
136 * @return ETrue if there are cameras available. |
|
137 */ |
|
138 static TBool HasCameras( MVtEngMedia& aMedia ); |
|
139 |
|
140 /** |
|
141 * Checks if the key event is DTMF enabled. |
|
142 * @param aKeyEvent The key event. |
|
143 * @param aDtmfTone DTMF tone character. |
|
144 * @return ETrue if this event is DTMF event. |
|
145 */ |
|
146 static TBool IsDTMFEvent( const TKeyEvent& aKeyEvent, |
|
147 TChar& aDtmfTone ); |
|
148 |
|
149 /** |
|
150 * Checks if the character is DTMF enabled. |
|
151 * @param aChar The character. |
|
152 * @return ETrue if this character is DTMF character. |
|
153 */ |
|
154 static TBool IsDTMFCharacter( const TChar aChar ); |
|
155 |
|
156 private: |
|
157 |
|
158 /** |
|
159 * Checks if audio routing is available. |
|
160 * @param aAudio audio instance. |
|
161 * @param aCurrent current speaker. |
|
162 * @param aSource source speaker. |
|
163 * @param aTarget target speaker. |
|
164 */ |
|
165 static TBool IsAudioRoutingAvailable( |
|
166 MVtEngAudio& aAudio, |
|
167 const MVtEngAudio::TAudioRoutingState aCurrent, |
|
168 const MVtEngAudio::TAudioRoutingState aSource, |
|
169 const MVtEngAudio::TAudioRoutingState aTarget ); |
|
170 |
|
171 }; |
|
172 |
|
173 #endif // VTUIUTILITY_H |
|
174 |
|
175 // End of File |