author | hgs |
Tue, 24 Aug 2010 03:16:41 -0500 | |
changeset 43 | 9894ed580e4a |
parent 38 | 9e9fc5ab059f |
permissions | -rw-r--r-- |
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
1 |
/* |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
2 |
* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
3 |
* All rights reserved. |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
4 |
* This component and the accompanying materials are made available |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
5 |
* under the terms of "Eclipse Public License v1.0" |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
6 |
* which accompanies this distribution, and is available |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
8 |
* |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
9 |
* Initial Contributors: |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
10 |
* Nokia Corporation - initial contribution. |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
11 |
* |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
12 |
* Contributors: |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
13 |
* |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
14 |
* Description: This file contains implementation of |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
15 |
ProfileSettingsMonitorServerImpl. |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
16 |
* |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
17 |
*/ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
18 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
19 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
20 |
#include "ProfileSettingsMonitorServerImpl.h" |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
21 |
#include <AudioClientsListPSKeys.h> |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
22 |
#include <AudioClientsListPSData.h> |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
23 |
#include <MediaStreamPropertiesPSKeys.h> |
43 | 24 |
#include <MProfileExtended.h> |
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
25 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
26 |
#ifdef _DEBUG |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
27 |
#define DEB_TRACE0(str) RDebug::Print(str) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
28 |
#define DEB_TRACE1(str, val1) RDebug::Print(str, val1) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
29 |
#else |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
30 |
#define DEB_TRACE0(str) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
31 |
#define DEB_TRACE1(str, val1) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
32 |
#endif // _DEBUG |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
33 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
34 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
35 |
static _LIT_SECURITY_POLICY_PASS(KClientStateReadPolicy); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
36 |
static _LIT_SECURITY_POLICY_S0(KMMFAudioServerSIDPolicy, KUidMmfAudioServerDllUnicodeDefine); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
37 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
38 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
39 |
CProfileSettingsMonitorServerImpl::CProfileSettingsMonitorServerImpl() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
40 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
41 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
42 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
43 |
CProfileSettingsMonitorServerImpl::~CProfileSettingsMonitorServerImpl() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
44 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
45 |
iWarningTonesProperty.Close(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
46 |
RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASWarningTones); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
47 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
48 |
iMessagingTonesProperty.Close(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
49 |
RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASMessageTones); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
50 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
51 |
iSilentProfileProperty.Close(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
52 |
RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASSilentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
53 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
54 |
iVibraProperty.Close(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
55 |
RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASVibra); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
56 |
|
38 | 57 |
iRingingTypeProperty.Close(); |
58 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingType); |
|
59 |
||
60 |
iMessageToneNameProperty.Close(); |
|
61 |
RProperty::Delete(KGASPSUidGlobalAudioSettings, KGASMessageToneName); |
|
62 |
||
63 |
iEmailToneNameProperty.Close(); |
|
64 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASEmailToneName); |
|
65 |
||
66 |
iVideoCallToneNameProperty.Close(); |
|
67 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASVideoCallToneName); |
|
68 |
||
69 |
iRingingTone1NameProperty.Close(); |
|
70 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingTone1Name); |
|
71 |
||
72 |
iRingingTone2NameProperty.Close(); |
|
73 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASRingingTone2Name); |
|
74 |
||
75 |
iKeypadVolumeProperty.Close(); |
|
76 |
RProperty::Delete(KGASPSUidGlobalAudioSettings,KGASKeypadToneVolume); |
|
77 |
||
78 |
if(iMessageToneName) |
|
79 |
{ |
|
80 |
delete iMessageToneName; |
|
81 |
iMessageToneName=NULL; |
|
82 |
} |
|
83 |
if(iEmailToneName) |
|
84 |
{ |
|
85 |
delete iEmailToneName; |
|
86 |
iEmailToneName=NULL; |
|
87 |
} |
|
88 |
if(iVideoCallToneName) |
|
89 |
{ |
|
90 |
delete iVideoCallToneName; |
|
91 |
iVideoCallToneName=NULL; |
|
92 |
} |
|
93 |
if(iRingingTone1Name) |
|
94 |
{ |
|
95 |
delete iRingingTone1Name; |
|
96 |
iRingingTone1Name=NULL; |
|
97 |
} |
|
98 |
if(iRingingTone2Name) |
|
99 |
{ |
|
100 |
delete iRingingTone2Name; |
|
101 |
iRingingTone2Name=NULL; |
|
102 |
} |
|
43 | 103 |
if(iProfileEngineExtended) |
104 |
{ |
|
105 |
iProfileEngineExtended->Release(); |
|
106 |
} |
|
107 |
//delete iProfileEngineExtended; |
|
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
108 |
// Release profile engine resources |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
109 |
if ( iEngine ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
110 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
111 |
iEngine->Release(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
112 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
113 |
delete iEngine; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
114 |
delete iNotifyHandler; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
115 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
116 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
117 |
CProfileSettingsMonitorServerImpl* CProfileSettingsMonitorServerImpl::NewL() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
118 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
119 |
CProfileSettingsMonitorServerImpl* s = new(ELeave) CProfileSettingsMonitorServerImpl(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
120 |
CleanupStack::PushL(s); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
121 |
s->ConstructL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
122 |
CleanupStack::Pop(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
123 |
return s; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
124 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
125 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
126 |
void CProfileSettingsMonitorServerImpl::ConstructL() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
127 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
128 |
iEngine = ProEngFactory::NewEngineL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
129 |
iNotifyHandler = ProEngFactory::NewNotifyHandlerL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
130 |
User::LeaveIfError( iNotifyHandler->RequestProfileActivationNotificationsL( *this )); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
131 |
User::LeaveIfError( iNotifyHandler->RequestActiveProfileNotificationsL( *this )); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
132 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
133 |
// Initialize iSilentProfile |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
134 |
iActiveProfileId = iEngine->ActiveProfileId(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
135 |
if(iActiveProfileId == 1) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
136 |
iSilentProfile = ETrue; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
137 |
else |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
138 |
iSilentProfile = EFalse; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
139 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
140 |
// Initialize iWarningTones, iMessagingTones and iVibra |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
141 |
MProEngProfile* currentProfile = iEngine->ActiveProfileL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
142 |
//CleanupStack::PushL(currentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
143 |
MProEngToneSettings& settings = currentProfile->ToneSettings(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
144 |
iWarningTones = settings.WarningAndGameTones(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
145 |
iMessagingTones = !( currentProfile->IsSilent() ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
146 |
iVibra = settings.VibratingAlert(); |
38 | 147 |
|
148 |
CMapGASRingingType( settings.RingingType()); |
|
149 |
||
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
150 |
//CleanupStack::PopAndDestroy(currentProfile); |
38 | 151 |
|
152 |
MProEngTones& profileTones=currentProfile->ProfileTones(); |
|
153 |
||
154 |
iMessageToneName=profileTones.MessageAlertTone().AllocL(); |
|
155 |
||
156 |
iEmailToneName=profileTones.EmailAlertTone().AllocL(); |
|
157 |
||
158 |
iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL(); |
|
159 |
||
160 |
iRingingTone1Name=profileTones.RingingTone1().AllocL(); |
|
161 |
||
162 |
iRingingTone2Name=profileTones.RingingTone2().AllocL(); |
|
163 |
||
164 |
||
165 |
CMapGASKeypadVolume(settings.KeypadVolume()); |
|
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
166 |
|
43 | 167 |
iProfileEngineExtended =::CreateProfileEngineExtended2L(); |
168 |
||
169 |
iSilenceMode = iProfileEngineExtended->SilenceModeL(); |
|
170 |
RDebug::Printf("value of silence mode %d",iSilenceMode); |
|
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
171 |
// Get PublicSilence from CenRep |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
172 |
TInt featureBitmask( 0 ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
173 |
CRepository* profileCenRep = CRepository::NewL( KCRUidProfilesLV ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
174 |
CleanupStack::PushL(profileCenRep); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
175 |
User::LeaveIfError( profileCenRep->Get( KProfilesLVFlags, featureBitmask ) ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
176 |
if ( featureBitmask & KProEngFeatureIdForceSilentMode ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
177 |
iPublicSilence = ETrue; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
178 |
else |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
179 |
iPublicSilence = EFalse; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
180 |
CleanupStack::PopAndDestroy(profileCenRep); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
181 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
182 |
TSecurityPolicy read = TSecurityPolicy(ECapabilityWriteDeviceData); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
183 |
TSecurityPolicy write = TSecurityPolicy(ECapabilityMultimediaDD); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
184 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
185 |
// Define and Initialize Warning Tones PnS key |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
186 |
User::LeaveIfError(RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
187 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
188 |
KGASWarningTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
189 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
190 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
191 |
write)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
192 |
User::LeaveIfError(iWarningTonesProperty.Attach( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
193 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
194 |
KGASWarningTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
195 |
User::LeaveIfError(iWarningTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
196 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
197 |
KGASWarningTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
198 |
iWarningTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
199 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
200 |
// Define and Initialize Messaging Tones PnS key |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
201 |
User::LeaveIfError(RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
202 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
203 |
KGASMessageTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
204 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
205 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
206 |
write)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
207 |
User::LeaveIfError(iMessagingTonesProperty.Attach( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
208 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
209 |
KGASMessageTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
210 |
User::LeaveIfError(iMessagingTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
211 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
212 |
KGASMessageTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
213 |
iMessagingTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
214 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
215 |
// Define and Initialize Silent Profile PnS key |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
216 |
User::LeaveIfError(RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
217 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
218 |
KGASSilentProfile, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
219 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
220 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
221 |
write)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
222 |
User::LeaveIfError(iSilentProfileProperty.Attach( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
223 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
224 |
KGASSilentProfile)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
225 |
User::LeaveIfError(iSilentProfileProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
226 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
227 |
KGASSilentProfile, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
228 |
iSilentProfile)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
229 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
230 |
// Define and Initialize Vibra PnS key |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
231 |
User::LeaveIfError(RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
232 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
233 |
KGASVibra, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
234 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
235 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
236 |
write)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
237 |
User::LeaveIfError(iVibraProperty.Attach( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
238 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
239 |
KGASVibra)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
240 |
User::LeaveIfError(iVibraProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
241 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
242 |
KGASVibra, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
243 |
iVibra)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
244 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
245 |
// Define and Initialize Public Silence PnS key |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
246 |
User::LeaveIfError(RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
247 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
248 |
KGASPublicSilence, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
249 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
250 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
251 |
write)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
252 |
User::LeaveIfError(iPublicSilenceProperty.Attach( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
253 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
254 |
KGASPublicSilence)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
255 |
User::LeaveIfError(iPublicSilenceProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
256 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
257 |
KGASPublicSilence, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
258 |
iPublicSilence)); |
38 | 259 |
|
260 |
||
261 |
||
262 |
User::LeaveIfError(RProperty::Define( |
|
263 |
KGASPSUidGlobalAudioSettings, |
|
264 |
KGASRingingType, |
|
265 |
RProperty::EInt, |
|
266 |
read, |
|
267 |
write)); |
|
268 |
User::LeaveIfError(iRingingTypeProperty.Attach( |
|
269 |
KGASPSUidGlobalAudioSettings, |
|
270 |
KGASRingingType)); |
|
271 |
User::LeaveIfError(iRingingTypeProperty.Set( |
|
272 |
KGASPSUidGlobalAudioSettings, |
|
273 |
KGASRingingType, |
|
274 |
iGASRingingType)); |
|
275 |
User::LeaveIfError(RProperty::Define( |
|
276 |
KGASPSUidGlobalAudioSettings, |
|
277 |
KGASMessageToneName, |
|
278 |
RProperty::EText, |
|
279 |
read, |
|
280 |
write)); |
|
281 |
User::LeaveIfError(iMessageToneNameProperty.Attach( |
|
282 |
KGASPSUidGlobalAudioSettings, |
|
283 |
KGASMessageToneName)); |
|
284 |
User::LeaveIfError(iMessageToneNameProperty.Set( |
|
285 |
KGASPSUidGlobalAudioSettings, |
|
286 |
KGASMessageToneName, |
|
287 |
*iMessageToneName)); |
|
288 |
||
289 |
User::LeaveIfError(RProperty::Define( |
|
290 |
KGASPSUidGlobalAudioSettings, |
|
291 |
KGASEmailToneName, |
|
292 |
RProperty::EText, |
|
293 |
read, |
|
294 |
write)); |
|
295 |
User::LeaveIfError(iEmailToneNameProperty.Attach( |
|
296 |
KGASPSUidGlobalAudioSettings, |
|
297 |
KGASEmailToneName)); |
|
298 |
User::LeaveIfError(iEmailToneNameProperty.Set( |
|
299 |
KGASPSUidGlobalAudioSettings, |
|
300 |
KGASEmailToneName, |
|
301 |
*iEmailToneName)); |
|
302 |
User::LeaveIfError(RProperty::Define( |
|
303 |
KGASPSUidGlobalAudioSettings, |
|
304 |
KGASVideoCallToneName, |
|
305 |
RProperty::EText, |
|
306 |
read, |
|
307 |
write)); |
|
308 |
User::LeaveIfError(iVideoCallToneNameProperty.Attach( |
|
309 |
KGASPSUidGlobalAudioSettings, |
|
310 |
KGASVideoCallToneName)); |
|
311 |
User::LeaveIfError(iVideoCallToneNameProperty.Set( |
|
312 |
KGASPSUidGlobalAudioSettings, |
|
313 |
KGASVideoCallToneName, |
|
314 |
*iVideoCallToneName)); |
|
315 |
||
316 |
User::LeaveIfError(RProperty::Define( |
|
317 |
KGASPSUidGlobalAudioSettings, |
|
318 |
KGASRingingTone1Name, |
|
319 |
RProperty::EText, |
|
320 |
read, |
|
321 |
write)); |
|
322 |
User::LeaveIfError(iRingingTone1NameProperty.Attach( |
|
323 |
KGASPSUidGlobalAudioSettings, |
|
324 |
KGASRingingTone1Name)); |
|
325 |
User::LeaveIfError(iRingingTone1NameProperty.Set( |
|
326 |
KGASPSUidGlobalAudioSettings, |
|
327 |
KGASRingingTone1Name, |
|
328 |
*iRingingTone1Name)); |
|
329 |
User::LeaveIfError(RProperty::Define( |
|
330 |
KGASPSUidGlobalAudioSettings, |
|
331 |
KGASRingingTone2Name, |
|
332 |
RProperty::EText, |
|
333 |
read, |
|
334 |
write)); |
|
335 |
User::LeaveIfError(iRingingTone2NameProperty.Attach( |
|
336 |
KGASPSUidGlobalAudioSettings, |
|
337 |
KGASRingingTone2Name)); |
|
338 |
User::LeaveIfError(iRingingTone2NameProperty.Set( |
|
339 |
KGASPSUidGlobalAudioSettings, |
|
340 |
KGASRingingTone2Name, |
|
341 |
*iRingingTone2Name)); |
|
342 |
||
343 |
User::LeaveIfError(RProperty::Define( |
|
344 |
KGASPSUidGlobalAudioSettings, |
|
345 |
KGASKeypadToneVolume, |
|
346 |
RProperty::EInt, |
|
347 |
read, |
|
348 |
write)); |
|
349 |
User::LeaveIfError(iKeypadVolumeProperty.Attach( |
|
350 |
KGASPSUidGlobalAudioSettings, |
|
351 |
KGASKeypadToneVolume)); |
|
352 |
User::LeaveIfError(iKeypadVolumeProperty.Set( |
|
353 |
KGASPSUidGlobalAudioSettings, |
|
354 |
KGASKeypadToneVolume, |
|
355 |
iGASKeypadVolume)); |
|
43 | 356 |
|
357 |
User::LeaveIfError(RProperty::Define( |
|
358 |
KGASPSUidGlobalAudioSettings, |
|
359 |
KGASSilenceMode, |
|
360 |
RProperty::EInt, |
|
361 |
read, |
|
362 |
write)); |
|
363 |
User::LeaveIfError(iSilenceModeProperty.Attach( |
|
364 |
KGASPSUidGlobalAudioSettings, |
|
365 |
KGASSilenceMode)); |
|
366 |
User::LeaveIfError(iSilenceModeProperty.Set( |
|
367 |
KGASPSUidGlobalAudioSettings, |
|
368 |
KGASSilenceMode, |
|
369 |
iSilenceMode)); |
|
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
370 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
371 |
//Stream Gain Control |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
372 |
TInt status = RProperty::Define( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
373 |
KPSUidMediaStreamProperties, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
374 |
KMediaStreamCurrentGain, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
375 |
RProperty::EInt, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
376 |
read, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
377 |
write); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
378 |
if ( status != KErrAlreadyExists ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
379 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
380 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
381 |
// Audio Clients List |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
382 |
InitializeAudioClientsListPSKeysL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
383 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
384 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
385 |
void CProfileSettingsMonitorServerImpl::InitializeAudioClientsListPSKeysL() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
386 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
387 |
DEB_TRACE0(_L("CProfileSettingsMonitorServerImpl::InitializeAudioClientsListPSKeysL:Enter")); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
388 |
// define KAudioPolicyApplicationAudioStatePlaying property to be a byte array |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
389 |
TInt status = RProperty::Define(KPSUidMMFAudioServer, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
390 |
KAudioPolicyApplicationAudioStatePlaying, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
391 |
RProperty::EByteArray, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
392 |
KClientStateReadPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
393 |
KMMFAudioServerSIDPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
394 |
sizeof(struct TAudioPolicyProcessIdListStruct)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
395 |
DEB_TRACE1(_L("Define KAudioPolicyApplicationAudioStatePlaying returns %d"), status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
396 |
if (status != KErrAlreadyExists) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
397 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
398 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
399 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
400 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
401 |
// define KAudioPolicyApplicationAudioStateRecording property to be a byte array |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
402 |
status = RProperty::Define(KPSUidMMFAudioServer, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
403 |
KAudioPolicyApplicationAudioStateRecording, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
404 |
RProperty::EByteArray, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
405 |
KClientStateReadPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
406 |
KMMFAudioServerSIDPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
407 |
sizeof(struct TAudioPolicyProcessIdListStruct)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
408 |
DEB_TRACE1(_L("Define KAudioPolicyApplicationAudioStateRecording returns %d"), status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
409 |
if (status != KErrAlreadyExists) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
410 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
411 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
412 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
413 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
414 |
// define KAudioPolicyApplicationAudioStatePaused property to be a byte array |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
415 |
status = RProperty::Define(KPSUidMMFAudioServer, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
416 |
KAudioPolicyApplicationAudioStatePaused, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
417 |
RProperty::EByteArray, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
418 |
KClientStateReadPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
419 |
KMMFAudioServerSIDPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
420 |
sizeof(struct TAudioPolicyProcessIdListStruct)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
421 |
DEB_TRACE1(_L("Define KAudioPolicyApplicationAudioStatePaused returns %d"), status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
422 |
if (status != KErrAlreadyExists) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
423 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
424 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
425 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
426 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
427 |
// define KAudioPolicyForceMutedClients property to be a byte array |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
428 |
status = RProperty::Define(KPSUidMMFAudioServer, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
429 |
KAudioPolicyForceMutedClients, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
430 |
RProperty::EByteArray, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
431 |
KClientStateReadPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
432 |
KMMFAudioServerSIDPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
433 |
sizeof(struct TAudioPolicyProcessIdListStruct)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
434 |
DEB_TRACE1(_L("Define KAudioPolicyForceMutedClients returns %d"), status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
435 |
if (status != KErrAlreadyExists) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
436 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
437 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
438 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
439 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
440 |
// define KAudioPolicyAudioClients property to be a byte array |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
441 |
status = RProperty::Define(KPSUidMMFAudioServer, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
442 |
KAudioPolicyAudioClients, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
443 |
RProperty::EByteArray, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
444 |
KClientStateReadPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
445 |
KMMFAudioServerSIDPolicy, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
446 |
sizeof(struct TAudioClientListStruct)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
447 |
DEB_TRACE1(_L("Define KAudioPolicyAudioClients returns %d"), status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
448 |
if (status != KErrAlreadyExists) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
449 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
450 |
User::LeaveIfError(status); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
451 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
452 |
DEB_TRACE0(_L("CProfileSettingsMonitorServerImpl::InitializeAudioClientsListPSKeysL:Exit")); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
453 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
454 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
455 |
void CProfileSettingsMonitorServerImpl::HandleProfileActivatedL( TInt aProfileId ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
456 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
457 |
DEB_TRACE1(_L("CProfileSettingsMonitorServerImpl::HandleProfileActivatedL[%d]"), aProfileId); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
458 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
459 |
if ( iActiveProfileId != aProfileId ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
460 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
461 |
MProEngProfile* currentProfile = iEngine->ActiveProfileL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
462 |
CleanupReleasePushL(*currentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
463 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
464 |
TBool silentProfile; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
465 |
iActiveProfileId = aProfileId; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
466 |
//iActiveProfileId = iEngine->ActiveProfileId(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
467 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
468 |
if(iActiveProfileId == 1) // Silent profile is always '1' |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
469 |
silentProfile = ETrue; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
470 |
else |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
471 |
silentProfile = EFalse; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
472 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
473 |
if(silentProfile != iSilentProfile) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
474 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
475 |
iSilentProfile = silentProfile; |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
476 |
User::LeaveIfError(iSilentProfileProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
477 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
478 |
KGASSilentProfile, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
479 |
iSilentProfile)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
480 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
481 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
482 |
MProEngToneSettings& settings = currentProfile->ToneSettings(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
483 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
484 |
if(iWarningTones != settings.WarningAndGameTones()) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
485 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
486 |
iWarningTones = settings.WarningAndGameTones(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
487 |
User::LeaveIfError(iWarningTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
488 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
489 |
KGASWarningTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
490 |
iWarningTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
491 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
492 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
493 |
if(iMessagingTones != (!( currentProfile->IsSilent() ))) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
494 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
495 |
iMessagingTones = !( currentProfile->IsSilent() ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
496 |
User::LeaveIfError(iMessagingTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
497 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
498 |
KGASMessageTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
499 |
iMessagingTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
500 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
501 |
if(iVibra != settings.VibratingAlert()) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
502 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
503 |
iVibra = settings.VibratingAlert(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
504 |
User::LeaveIfError(iVibraProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
505 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
506 |
KGASVibra, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
507 |
iVibra)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
508 |
} |
38 | 509 |
if(iGASRingingType != settings.RingingType()) |
510 |
{ |
|
511 |
||
512 |
CMapGASRingingType(settings.RingingType()); |
|
513 |
||
514 |
User::LeaveIfError(iRingingTypeProperty.Set( |
|
515 |
KGASPSUidGlobalAudioSettings, |
|
516 |
KGASRingingType, |
|
517 |
iGASRingingType)); |
|
518 |
||
519 |
} |
|
520 |
MProEngTones &profileTones=currentProfile->ProfileTones(); |
|
521 |
if(iMessageToneName->Compare(profileTones.MessageAlertTone())!= 0) |
|
522 |
{ |
|
523 |
delete iMessageToneName; |
|
524 |
iMessageToneName=NULL; |
|
525 |
iMessageToneName=profileTones.MessageAlertTone().AllocL(); |
|
526 |
User::LeaveIfError(iMessageToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
527 |
KGASMessageToneName, |
|
528 |
*iMessageToneName)); |
|
529 |
} |
|
530 |
if(iEmailToneName->Compare(profileTones.EmailAlertTone())!= 0) |
|
531 |
{ |
|
532 |
delete iEmailToneName; |
|
533 |
iEmailToneName=NULL; |
|
534 |
iEmailToneName=profileTones.EmailAlertTone().AllocL(); |
|
535 |
User::LeaveIfError(iEmailToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
536 |
KGASEmailToneName, |
|
537 |
*iEmailToneName)); |
|
538 |
} |
|
539 |
if(iVideoCallToneName->Compare(profileTones.VideoCallRingingTone())!=0) |
|
540 |
{ |
|
541 |
delete iVideoCallToneName; |
|
542 |
iVideoCallToneName=NULL; |
|
543 |
iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL(); |
|
544 |
User::LeaveIfError(iVideoCallToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
545 |
KGASVideoCallToneName, |
|
546 |
*iVideoCallToneName)); |
|
547 |
||
548 |
} |
|
549 |
if(iRingingTone1Name->Compare(profileTones.RingingTone1())!=0) |
|
550 |
{ |
|
551 |
delete iRingingTone1Name; |
|
552 |
iRingingTone1Name=NULL; |
|
553 |
iRingingTone1Name=profileTones.RingingTone1().AllocL(); |
|
554 |
User::LeaveIfError(iRingingTone1NameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
555 |
KGASRingingTone1Name, |
|
556 |
*iRingingTone1Name)); |
|
557 |
} |
|
558 |
if(iRingingTone2Name->Compare(profileTones.RingingTone2())!=0) |
|
559 |
{ |
|
560 |
delete iRingingTone2Name; |
|
561 |
iRingingTone2Name=NULL; |
|
562 |
iRingingTone2Name=profileTones.RingingTone2().AllocL(); |
|
563 |
User::LeaveIfError(iRingingTone2NameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
564 |
KGASRingingTone2Name, |
|
565 |
*iRingingTone2Name)); |
|
566 |
} |
|
567 |
if(iGASKeypadVolume!=settings.KeypadVolume()) |
|
568 |
{ |
|
569 |
||
570 |
CMapGASKeypadVolume(settings.KeypadVolume()); |
|
571 |
User::LeaveIfError(iKeypadVolumeProperty.Set(KGASPSUidGlobalAudioSettings, |
|
572 |
KGASKeypadToneVolume, |
|
573 |
iGASKeypadVolume)); |
|
574 |
||
575 |
||
576 |
} |
|
43 | 577 |
if(iSilenceMode != iProfileEngineExtended->SilenceModeL()) |
578 |
{ |
|
579 |
RDebug::Printf("silence mode changed"); |
|
580 |
iSilenceMode = iProfileEngineExtended->SilenceModeL(); |
|
581 |
User::LeaveIfError(iSilenceModeProperty.Set( |
|
582 |
KGASPSUidGlobalAudioSettings, |
|
583 |
KGASSilenceMode, |
|
584 |
iSilenceMode)); |
|
585 |
} |
|
586 |
||
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
587 |
CleanupStack::PopAndDestroy(currentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
588 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
589 |
#ifdef _DEBUG |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
590 |
else |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
591 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
592 |
RDebug::Print(_L("CProfileSettingsMonitorServerImpl::HandleProfileActivatedL[%d]- \ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
593 |
Activated is same as current profile"), aProfileId); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
594 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
595 |
#endif // _DEBUG |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
596 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
597 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
598 |
void CProfileSettingsMonitorServerImpl::HandleProfileActivationNotificationError( TInt /*aError*/ ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
599 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
600 |
DEB_TRACE0(_L("CMyProfileNameArrayObserver::HandleProfileActivationNotificationError")); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
601 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
602 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
603 |
void CProfileSettingsMonitorServerImpl::HandleActiveProfileModifiedL() |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
604 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
605 |
DEB_TRACE0(_L("CProfileSettingsMonitorServerImpl::HandleActiveProfileModifiedL")); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
606 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
607 |
iActiveProfileId = iEngine->ActiveProfileId(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
608 |
MProEngProfile* currentProfile = iEngine->ActiveProfileL(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
609 |
CleanupReleasePushL(*currentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
610 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
611 |
MProEngToneSettings& settings = currentProfile->ToneSettings(); |
38 | 612 |
MProEngTones& profileTones=currentProfile->ProfileTones(); |
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
613 |
if(iWarningTones != settings.WarningAndGameTones()) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
614 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
615 |
iWarningTones = settings.WarningAndGameTones(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
616 |
User::LeaveIfError(iWarningTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
617 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
618 |
KGASWarningTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
619 |
iWarningTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
620 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
621 |
if(iMessagingTones != (!( currentProfile->IsSilent() ))) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
622 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
623 |
iMessagingTones = !( currentProfile->IsSilent() ); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
624 |
User::LeaveIfError(iMessagingTonesProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
625 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
626 |
KGASMessageTones, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
627 |
iMessagingTones)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
628 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
629 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
630 |
if(iVibra != settings.VibratingAlert()) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
631 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
632 |
iVibra = settings.VibratingAlert(); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
633 |
User::LeaveIfError(iVibraProperty.Set( |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
634 |
KGASPSUidGlobalAudioSettings, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
635 |
KGASVibra, |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
636 |
iVibra)); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
637 |
} |
38 | 638 |
if(iGASRingingType != settings.RingingType()) |
639 |
{ |
|
640 |
||
641 |
CMapGASRingingType(settings.RingingType()); |
|
642 |
||
643 |
User::LeaveIfError(iRingingTypeProperty.Set( |
|
644 |
KGASPSUidGlobalAudioSettings, |
|
645 |
KGASRingingType, |
|
646 |
iGASRingingType)); |
|
647 |
} |
|
648 |
if(iMessageToneName->Compare(profileTones.MessageAlertTone())!= 0) |
|
649 |
{ |
|
650 |
delete iMessageToneName; |
|
651 |
iMessageToneName=NULL; |
|
652 |
iMessageToneName=profileTones.MessageAlertTone().AllocL(); |
|
653 |
||
654 |
User::LeaveIfError(iMessageToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
655 |
KGASMessageToneName, |
|
656 |
*iMessageToneName)); |
|
657 |
} |
|
658 |
||
659 |
if(iEmailToneName->Compare(profileTones.EmailAlertTone())!= 0) |
|
660 |
{ |
|
661 |
delete iEmailToneName; |
|
662 |
iEmailToneName=NULL; |
|
663 |
iEmailToneName=profileTones.EmailAlertTone().AllocL(); |
|
664 |
User::LeaveIfError(iEmailToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
665 |
KGASEmailToneName, |
|
666 |
*iEmailToneName)); |
|
667 |
} |
|
668 |
if(iVideoCallToneName->Compare(profileTones.VideoCallRingingTone())!=0) |
|
669 |
{ |
|
670 |
delete iVideoCallToneName; |
|
671 |
iVideoCallToneName=NULL; |
|
672 |
iVideoCallToneName=profileTones.VideoCallRingingTone().AllocL(); |
|
673 |
User::LeaveIfError(iVideoCallToneNameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
674 |
KGASVideoCallToneName, |
|
675 |
*iVideoCallToneName)); |
|
676 |
||
677 |
} |
|
678 |
if(iRingingTone1Name->Compare(profileTones.RingingTone1())!=0) |
|
679 |
{ |
|
680 |
delete iRingingTone1Name; |
|
681 |
iRingingTone1Name=NULL; |
|
682 |
iRingingTone1Name=profileTones.RingingTone1().AllocL(); |
|
683 |
User::LeaveIfError(iRingingTone1NameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
684 |
KGASRingingTone1Name, |
|
685 |
*iRingingTone1Name)); |
|
686 |
||
687 |
} |
|
688 |
if(iRingingTone2Name->Compare(profileTones.RingingTone2())!=0) |
|
689 |
{ |
|
690 |
delete iRingingTone2Name; |
|
691 |
iRingingTone2Name=NULL; |
|
692 |
iRingingTone2Name=profileTones.RingingTone2().AllocL(); |
|
693 |
User::LeaveIfError(iRingingTone2NameProperty.Set(KGASPSUidGlobalAudioSettings, |
|
694 |
KGASRingingTone2Name, |
|
695 |
*iRingingTone2Name)); |
|
696 |
||
697 |
} |
|
698 |
if(iGASKeypadVolume!=settings.KeypadVolume()) |
|
699 |
{ |
|
700 |
||
701 |
CMapGASKeypadVolume( settings.KeypadVolume()); |
|
702 |
User::LeaveIfError(iKeypadVolumeProperty.Set(KGASPSUidGlobalAudioSettings, |
|
703 |
KGASKeypadToneVolume, |
|
704 |
iGASKeypadVolume)); |
|
705 |
||
706 |
||
707 |
} |
|
43 | 708 |
if(iSilenceMode != iProfileEngineExtended ->SilenceModeL()) |
709 |
{ |
|
710 |
RDebug::Printf("silence mode changed"); |
|
711 |
iSilenceMode = iProfileEngineExtended ->SilenceModeL(); |
|
712 |
User::LeaveIfError(iSilenceModeProperty.Set(KGASPSUidGlobalAudioSettings, |
|
713 |
KGASSilenceMode, |
|
714 |
iSilenceMode)); |
|
715 |
} |
|
716 |
||
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
717 |
CleanupStack::PopAndDestroy(currentProfile); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
718 |
} |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
719 |
|
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
720 |
void CProfileSettingsMonitorServerImpl::HandleActiveProfileNotificationError( TInt /*aError*/ ) |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
721 |
{ |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
722 |
DEB_TRACE0(_L("CMyProfileNameArrayObserver::HandleProfileActivationNotificationError")); |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
723 |
} |
38 | 724 |
void CProfileSettingsMonitorServerImpl::CMapGASRingingType(TProfileRingingType aRingingType) |
725 |
{ |
|
726 |
switch(aRingingType) |
|
727 |
{ |
|
728 |
case EProfileRingingTypeRinging : iGASRingingType=CGlobalAudioSettings::EGASRingingTypeRinging; |
|
729 |
break; |
|
730 |
||
731 |
case EProfileRingingTypeAscending:iGASRingingType=CGlobalAudioSettings::EGASRingingTypeAscending; |
|
732 |
break; |
|
733 |
||
734 |
case EProfileRingingTypeRingingOnce :iGASRingingType=CGlobalAudioSettings::EGASRingingTypeRingingOnce; |
|
735 |
break; |
|
736 |
||
737 |
case EProfileRingingTypeBeepOnce :iGASRingingType=CGlobalAudioSettings::EGASRingingTypeBeepOnce; |
|
738 |
break; |
|
739 |
||
740 |
case EProfileRingingTypeSilent:iGASRingingType=CGlobalAudioSettings::EGASRingingTypeSilent; |
|
741 |
break; |
|
742 |
} |
|
743 |
} |
|
744 |
void CProfileSettingsMonitorServerImpl::CMapGASKeypadVolume(TProfileKeypadVolume aKeypadVolume) |
|
745 |
{ |
|
746 |
switch(aKeypadVolume) |
|
747 |
{ |
|
748 |
case EProfileKeypadVolumeOff : iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeOff; |
|
749 |
break; |
|
750 |
case EProfileKeypadVolumeLevel1 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel1; |
|
751 |
break; |
|
752 |
case EProfileKeypadVolumeLevel2 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel2; |
|
753 |
break; |
|
754 |
case EProfileKeypadVolumeLevel3 :iGASKeypadVolume=CGlobalAudioSettings::EGASKeypadVolumeLevel3; |
|
755 |
break; |
|
756 |
} |
|
757 |
} |
|
0
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
758 |
// End of file |
71ca22bcf22a
Revision: 201003
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
diff
changeset
|
759 |