|
1 /* |
|
2 * Copyright (c) 2006 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: Audio volume and routing interface |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef MVTENGAUDIO_H |
|
21 #define MVTENGAUDIO_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <e32def.h> |
|
25 |
|
26 /** |
|
27 * Interface for audio related information. |
|
28 * |
|
29 * @lib videoteleng |
|
30 * @since 2.6 |
|
31 */ |
|
32 class MVtEngAudio |
|
33 { |
|
34 public: |
|
35 |
|
36 /** |
|
37 * Current routing state |
|
38 */ |
|
39 enum TAudioRoutingState |
|
40 { |
|
41 EAudioHandset, |
|
42 EAudioLoudspeaker, |
|
43 EAudioBT, |
|
44 EAudioWiredHeadset |
|
45 }; |
|
46 |
|
47 /** |
|
48 * Wired headset type |
|
49 */ |
|
50 enum TWiredHeadsetType |
|
51 { |
|
52 EWiredHeadset, |
|
53 EWiredLoopset, |
|
54 EWiredTty, |
|
55 EWiredNone |
|
56 }; |
|
57 |
|
58 /** |
|
59 * Audio routing setting to be used when changing |
|
60 * audio routing from client. |
|
61 */ |
|
62 enum TVtEngRoutingSetting |
|
63 { |
|
64 EActivateHandsfree, |
|
65 EDeactivateHansfree, |
|
66 EActivateBT, |
|
67 EDeactivateBT |
|
68 }; |
|
69 |
|
70 /** |
|
71 * Speaker volume levels for Handset and Handsfree. |
|
72 */ |
|
73 struct TVtEngOutputVolume |
|
74 { |
|
75 TInt iHandsetVolume; |
|
76 TInt iHandsfreeVolume; |
|
77 }; |
|
78 |
|
79 /** |
|
80 * Returns target where audio is currently routed to. |
|
81 * @param aAudioRoutingState routing target |
|
82 * @return Symbian OS error code |
|
83 */ |
|
84 virtual TInt GetRoutingState( |
|
85 TAudioRoutingState& aAudioRoutingState ) = 0; |
|
86 |
|
87 /** |
|
88 * Returns if routing to specified target can be |
|
89 * done. |
|
90 * @param aAudioRoutingState routing target |
|
91 * @param aAvailable ETrue if possible to do |
|
92 * @return Symbian OS error code |
|
93 */ |
|
94 virtual TInt GetRoutingAvailability( |
|
95 const TAudioRoutingState aAudioRoutingState, |
|
96 TBool& aAvailable ) = 0; |
|
97 |
|
98 /** |
|
99 * Returns type of wired headset |
|
100 * @return Symbian OS error code. |
|
101 */ |
|
102 virtual TInt GetHeadsetType( |
|
103 TWiredHeadsetType& aHeadsetType ) = 0; |
|
104 |
|
105 /** |
|
106 * Returns speaker volume |
|
107 * @param aHandsetVolume if ETrue returns handset volume, |
|
108 * otherwise loudspeaker volume. |
|
109 * @return output volume ranging from 1 to 10 or Symbian OS error code. |
|
110 */ |
|
111 virtual TInt OutputVolume( |
|
112 const TBool aHandsetVolume ) const = 0; |
|
113 |
|
114 |
|
115 }; |
|
116 |
|
117 #endif // MVTENGAUDIO_H |