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