|
1 /* |
|
2 * Copyright (c) 2009 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: Telephony Multimedia Service |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef TMSGLOBALEFFECTSSETTINGS_H |
|
19 #define TMSGLOBALEFFECTSSETTINGS_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32property.h> |
|
23 #include <sounddevice.h> |
|
24 #include <centralrepository.h> |
|
25 |
|
26 namespace TMS { |
|
27 |
|
28 // CLASS DECLARATION |
|
29 class TMSGlobalEffectsSettings |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * Two-phased constructor. |
|
34 */ |
|
35 static TMSGlobalEffectsSettings* NewL(); |
|
36 |
|
37 /** |
|
38 * Destructor. |
|
39 */ |
|
40 virtual ~TMSGlobalEffectsSettings(); |
|
41 |
|
42 public: |
|
43 /** |
|
44 * Store the current loud speaker volume. |
|
45 * @param aVolume Volume |
|
46 */ |
|
47 void SetLoudSpkrVolume(TInt aVolume); |
|
48 |
|
49 /** |
|
50 * Store the current earpiece volume. |
|
51 * @param aVolume Volume |
|
52 */ |
|
53 void SetEarPieceVolume(TInt aVolume); |
|
54 |
|
55 |
|
56 /** |
|
57 * Retrieve the current loud speaker volume. |
|
58 * @param aVolume Volume |
|
59 */ |
|
60 void GetLoudSpkrVolume(TInt& aVolume); |
|
61 |
|
62 /** |
|
63 * Retrieve the current earpiece volume. |
|
64 * @param aVolume Volume |
|
65 */ |
|
66 void GetEarPieceVolume(TInt& aVolume); |
|
67 |
|
68 /** |
|
69 * Returns the current volume. |
|
70 * @return Current volume |
|
71 */ |
|
72 TInt MaxVolume() const; |
|
73 |
|
74 /** |
|
75 * Store the current gain. |
|
76 * @param aVolume Volume |
|
77 * @param aPublish ETrue to publish the status to clients |
|
78 */ |
|
79 void SetGain(TInt aGain); |
|
80 |
|
81 /** |
|
82 * Returns the current gain. |
|
83 * @return Current volume |
|
84 */ |
|
85 TInt Gain() const; |
|
86 |
|
87 /** |
|
88 * Returns the max gain. |
|
89 * @return Current volume |
|
90 */ |
|
91 TInt MaxGain() const; |
|
92 |
|
93 private: |
|
94 |
|
95 /** |
|
96 * C++ default constructor. |
|
97 */ |
|
98 TMSGlobalEffectsSettings(); |
|
99 |
|
100 /** |
|
101 * By default Symbian 2nd phase constructor is private. |
|
102 */ |
|
103 void ConstructL(); |
|
104 |
|
105 private: |
|
106 TInt iGain; |
|
107 TInt iMaxVolume; |
|
108 TInt iMaxGain; |
|
109 TInt iEarVolume; |
|
110 TInt iLoudSpkrVolume; |
|
111 |
|
112 CRepository* iRepository; |
|
113 }; |
|
114 |
|
115 } //namespace TMS |
|
116 |
|
117 #endif // TMSGLOBALEFFECTSSETTINGS_H |
|
118 |
|
119 // End of File |