|
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: Implementation of the Phone Profile Settings API |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 |
|
21 // INCLUDE FILES |
|
22 #include <e32std.h> |
|
23 #include <GlobalAudioSettings.h> |
|
24 #include "GlobalAudioSettingsImpl.h" |
|
25 #include <MGlobalAudioSettingsObserver.h> |
|
26 |
|
27 // ============================ MEMBER FUNCTIONS =============================== |
|
28 |
|
29 // ----------------------------------------------------------------------------- |
|
30 // CGlobalAudioSettings::CGlobalAudioSettings(); |
|
31 // |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 CGlobalAudioSettings::CGlobalAudioSettings() |
|
35 { |
|
36 } |
|
37 |
|
38 // ----------------------------------------------------------------------------- |
|
39 // CGlobalAudioSettings::NewL(); |
|
40 // |
|
41 // ----------------------------------------------------------------------------- |
|
42 // |
|
43 EXPORT_C CGlobalAudioSettings* CGlobalAudioSettings::NewL( |
|
44 MAudioSettingsObserver& aAudioSettingsObserver) |
|
45 { |
|
46 CGlobalAudioSettings* self = new (ELeave) CGlobalAudioSettings(); |
|
47 CleanupStack::PushL( self ); |
|
48 self->ConstructL( aAudioSettingsObserver ); |
|
49 CleanupStack::Pop( self ); |
|
50 return self; |
|
51 } |
|
52 |
|
53 // ----------------------------------------------------------------------------- |
|
54 // CGlobalAudioSettings::ConstructL(); |
|
55 // |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 void CGlobalAudioSettings::ConstructL( MAudioSettingsObserver& aAudioSettingsObserver ) |
|
59 { |
|
60 iBody = CGlobalAudioSettingsImpl::NewL(*this, aAudioSettingsObserver ); |
|
61 } |
|
62 |
|
63 // Destructor |
|
64 EXPORT_C CGlobalAudioSettings::~CGlobalAudioSettings() |
|
65 { |
|
66 delete iBody; |
|
67 } |
|
68 |
|
69 // ----------------------------------------------------------------------------- |
|
70 // CGlobalAudioSettings::NewL |
|
71 // Static function for creating an instance of the EnvironmentalReverb object. |
|
72 // ----------------------------------------------------------------------------- |
|
73 // |
|
74 EXPORT_C TBool CGlobalAudioSettings::IsWarningTonesEnabled() |
|
75 { |
|
76 return (iBody->IsWarningTonesEnabled()); |
|
77 } |
|
78 |
|
79 // ----------------------------------------------------------------------------- |
|
80 // CGlobalAudioSettings::IsMessageTonesEnabled |
|
81 // |
|
82 // ----------------------------------------------------------------------------- |
|
83 // |
|
84 EXPORT_C TBool CGlobalAudioSettings::IsMessageTonesEnabled() |
|
85 { |
|
86 return (iBody->IsMessageTonesEnabled()); |
|
87 } |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CGlobalAudioSettings::IsSilentProfileEnabled |
|
91 // |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 EXPORT_C TBool CGlobalAudioSettings::IsSilentProfileEnabled() |
|
95 { |
|
96 return (iBody->IsSilentProfileEnabled()); |
|
97 } |
|
98 |
|
99 // ----------------------------------------------------------------------------- |
|
100 // CGlobalAudioSettings::IsVibraEnabled |
|
101 // |
|
102 // ----------------------------------------------------------------------------- |
|
103 // |
|
104 EXPORT_C TBool CGlobalAudioSettings::IsVibraEnabled() |
|
105 { |
|
106 return (iBody->IsVibraEnabled()); |
|
107 } |
|
108 |
|
109 // ----------------------------------------------------------------------------- |
|
110 // CGlobalAudioSettings::IsPublicSilenceEnabled |
|
111 // |
|
112 // ----------------------------------------------------------------------------- |
|
113 // |
|
114 EXPORT_C TBool CGlobalAudioSettings::IsPublicSilenceEnabled() |
|
115 { |
|
116 return (iBody->IsPublicSilenceEnabled()); |
|
117 } |
|
118 |
|
119 EXPORT_C TDesC& CGlobalAudioSettings::MessageAlertTone() |
|
120 { |
|
121 return (iBody->MessageAlertTone()); |
|
122 } |
|
123 |
|
124 EXPORT_C TBool CGlobalAudioSettings::IsMessageAlertToneEnabled() |
|
125 { |
|
126 return (iBody->IsMessageAlertToneEnabled()); |
|
127 } |
|
128 EXPORT_C TDesC& CGlobalAudioSettings::EmailAlertTone() |
|
129 { |
|
130 return (iBody->EmailAlertTone()); |
|
131 } |
|
132 EXPORT_C TBool CGlobalAudioSettings::IsEmailAlertToneEnabled() |
|
133 { |
|
134 return (iBody->IsEmailAlertToneEnabled()); |
|
135 } |
|
136 EXPORT_C CGlobalAudioSettings::TGASRingingType CGlobalAudioSettings::RingingType() |
|
137 { |
|
138 return (iBody->RingingType()); |
|
139 } |
|
140 EXPORT_C TDesC& CGlobalAudioSettings::VideoCallAlertTone() |
|
141 { |
|
142 return (iBody->VideoCallAlertTone()); |
|
143 } |
|
144 EXPORT_C TBool CGlobalAudioSettings::IsVideoCallAlertToneEnabled() |
|
145 { |
|
146 return (iBody->IsVideoCallAlertToneEnabled()); |
|
147 } |
|
148 EXPORT_C TDesC& CGlobalAudioSettings::RingingAlertTone1() |
|
149 { |
|
150 return (iBody->RingingAlertTone1()); |
|
151 } |
|
152 EXPORT_C TBool CGlobalAudioSettings::IsRingingAlertTone1Enabled() |
|
153 { |
|
154 return (iBody->IsRingingAlertTone1Enabled()); |
|
155 } |
|
156 EXPORT_C TDesC& CGlobalAudioSettings::RingingAlertTone2() |
|
157 { |
|
158 return (iBody->RingingAlertTone2()); |
|
159 } |
|
160 EXPORT_C TBool CGlobalAudioSettings::IsRingingAlertTone2Enabled() |
|
161 { |
|
162 return (iBody->IsRingingAlertTone2Enabled()); |
|
163 } |
|
164 EXPORT_C CGlobalAudioSettings::TGASKeypadVolume CGlobalAudioSettings::KeyPadToneVolume() |
|
165 { |
|
166 return (iBody->KeyPadToneVolume()); |
|
167 } |
|
168 |
|
169 EXPORT_C TBool CGlobalAudioSettings::IsSilenceModeEnabled() |
|
170 { |
|
171 return (iBody->IsSilenceModeEnabled()); |
|
172 } |
|
173 // ----------------------------------------------------------------------------- |
|
174 // CGlobalAudioSettings::RegisterAudioClientsListObserver |
|
175 // |
|
176 // ----------------------------------------------------------------------------- |
|
177 // |
|
178 EXPORT_C TInt CGlobalAudioSettings::RegisterAudioClientsListObserver( |
|
179 MAudioClientsListObserver& aObserver ) |
|
180 { |
|
181 return (iBody->RegisterAudioClientsListObserver(aObserver)); |
|
182 } |
|
183 |
|
184 // ----------------------------------------------------------------------------- |
|
185 // CGlobalAudioSettings::UnregisterAudioClientsListObserver |
|
186 // |
|
187 // ----------------------------------------------------------------------------- |
|
188 // |
|
189 EXPORT_C TInt CGlobalAudioSettings::UnregisterAudioClientsListObserver( |
|
190 MAudioClientsListObserver& aObserver) |
|
191 { |
|
192 return (iBody->UnregisterAudioClientsListObserver(aObserver)); |
|
193 } |
|
194 |
|
195 // ----------------------------------------------------------------------------- |
|
196 // CGlobalAudioSettings::GetAudioClientsList |
|
197 // |
|
198 // ----------------------------------------------------------------------------- |
|
199 // |
|
200 EXPORT_C TInt CGlobalAudioSettings::GetAudioClientsList( |
|
201 TAudioClientListType aType, |
|
202 RArray<TProcessId>& aList ) |
|
203 { |
|
204 return (iBody->GetAudioClientsList(aType, aList)); |
|
205 } |
|
206 |
|
207 //End of file |