|
1 /* |
|
2 * Copyright (c) 2010 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 util class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef PHONEAUDIOUTIL_H |
|
20 #define PHONEAUDIOUTIL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <pevirtualengine.h> |
|
25 #include "mphoneviewcommandhandle.h" |
|
26 #include "mphonestatemachine.h" |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Note util class. |
|
32 * |
|
33 */ |
|
34 class PhoneAudioUtil |
|
35 { |
|
36 public: |
|
37 |
|
38 /** |
|
39 * Handles audio mute changes. |
|
40 */ |
|
41 static void HandleAudioMuteChangedL(); |
|
42 |
|
43 /** |
|
44 * Handles audio output changes. |
|
45 */ |
|
46 static void HandleAudioOutputChangedL(); |
|
47 |
|
48 /** |
|
49 * Decreases audio volume. |
|
50 */ |
|
51 static void DecreaseAudioVolumeL(); |
|
52 |
|
53 /** |
|
54 * Increases audio volume. |
|
55 */ |
|
56 static void IncreaseAudioVolumeL(); |
|
57 |
|
58 /** |
|
59 * Changes audio volume. |
|
60 */ |
|
61 static void ChangeAudioVolumeL( TInt aLevel, |
|
62 TBool aUpdateControl ); |
|
63 |
|
64 /** |
|
65 * Gets current volume level. |
|
66 */ |
|
67 static TInt GetVolumeLevel(); |
|
68 |
|
69 /** |
|
70 * Handles audio output changes. |
|
71 */ |
|
72 static void HandleAudioAvailableOutputChangedL(); |
|
73 |
|
74 /** |
|
75 * Toggles mute. |
|
76 */ |
|
77 static void ToggleMute(); |
|
78 |
|
79 /** |
|
80 * Sets handsfree mode. |
|
81 */ |
|
82 static void SetHandsfreeModeL( TBool aHandsfreeMode ); |
|
83 |
|
84 /** |
|
85 * Sets bt handsfree mode. |
|
86 */ |
|
87 static void SetBtHandsfreeModeL( TBool aHandsfreeMode ); |
|
88 |
|
89 private: |
|
90 |
|
91 /** |
|
92 * Returns view command handler. |
|
93 */ |
|
94 inline static MPhoneViewCommandHandle* ViewCommandHandle(); |
|
95 |
|
96 /** |
|
97 * Returns phone state handler. |
|
98 */ |
|
99 inline static MPhoneStateMachine* StateMachine(); |
|
100 }; |
|
101 |
|
102 #endif // PHONEAUDIOUTIL_H |
|
103 |
|
104 // End of File |