|
1 /* |
|
2 * Copyright (c) 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: ?Description |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 //#include <?include_file> |
|
20 #include <profile.hrh> |
|
21 #include <cprofilechangenotifyhandler.h> |
|
22 #include "profileengine.h" |
|
23 #include "stubdataholder.h" |
|
24 |
|
25 // ======== MEMBER FUNCTIONS ======== |
|
26 |
|
27 CProfileChangeNotifyHandler::CProfileChangeNotifyHandler(MProfileChangeObserver* /*aProfileChangeObserver*/) |
|
28 { |
|
29 } |
|
30 |
|
31 |
|
32 CProfileChangeNotifyHandler::~CProfileChangeNotifyHandler() |
|
33 { |
|
34 } |
|
35 |
|
36 |
|
37 CProfileChangeNotifyHandler* CProfileChangeNotifyHandler::NewL(MProfileChangeObserver* aProfileChangeObserver) |
|
38 { |
|
39 CProfileChangeNotifyHandler* _this = new( ELeave )CProfileChangeNotifyHandler( aProfileChangeObserver); |
|
40 CleanupStack::PushL( _this ); |
|
41 CStubDataHolder::Instance()->AddProfileChangeObserverL( *aProfileChangeObserver, _this ); |
|
42 CleanupStack::Pop(); |
|
43 return _this; |
|
44 } |
|
45 |
|
46 |
|
47 CProfile::~CProfile() |
|
48 { |
|
49 } |
|
50 |
|
51 |
|
52 void CProfile::Release() |
|
53 { |
|
54 delete this; |
|
55 } |
|
56 |
|
57 |
|
58 const TArray<TContactItemId> CProfile::AlertForL() |
|
59 { |
|
60 RArray<TContactItemId> array; |
|
61 return array.Array(); |
|
62 } |
|
63 |
|
64 |
|
65 TBool CProfile::IsSilent() const |
|
66 { |
|
67 return ( CStubDataHolder::Instance()->CurrentProfile()->Id() == EProfileSilentId ); |
|
68 } |
|
69 |
|
70 |
|
71 const MProfileName& CProfile::ProfileName() const |
|
72 { |
|
73 return *CStubDataHolder::Instance()->CurrentProfile(); |
|
74 } |
|
75 |
|
76 |
|
77 const MProfileTones& CProfile::ProfileTones() const |
|
78 { |
|
79 MProfileTones* ret = NULL; |
|
80 return *ret; |
|
81 } |
|
82 |
|
83 |
|
84 const MProfileExtraTones& CProfile::ProfileExtraTones() const |
|
85 { |
|
86 MProfileExtraTones* ret = NULL; |
|
87 return *ret; |
|
88 } |
|
89 |
|
90 |
|
91 const MProfileExtraSettings& CProfile::ProfileExtraSettings() const |
|
92 { |
|
93 MProfileExtraSettings* ret = NULL; |
|
94 return *ret; |
|
95 } |
|
96 |
|
97 |
|
98 // --------------------------------------------------------------------------- |
|
99 // ?description_if_needed |
|
100 // --------------------------------------------------------------------------- |
|
101 // |
|
102 CProfileEngine::CProfileEngine() |
|
103 { |
|
104 } |
|
105 |
|
106 |
|
107 // --------------------------------------------------------------------------- |
|
108 // ?description_if_needed |
|
109 // --------------------------------------------------------------------------- |
|
110 // |
|
111 void CProfileEngine::ConstructL() |
|
112 { |
|
113 } |
|
114 |
|
115 |
|
116 // --------------------------------------------------------------------------- |
|
117 // ?description_if_needed |
|
118 // --------------------------------------------------------------------------- |
|
119 // |
|
120 CProfileEngine* CProfileEngine::NewL() |
|
121 { |
|
122 CProfileEngine* self = CProfileEngine::NewLC(); |
|
123 CleanupStack::Pop( self ); |
|
124 return self; |
|
125 } |
|
126 |
|
127 |
|
128 // --------------------------------------------------------------------------- |
|
129 // ?description_if_needed |
|
130 // --------------------------------------------------------------------------- |
|
131 // |
|
132 CProfileEngine* CProfileEngine::NewLC() |
|
133 { |
|
134 CProfileEngine* self = new( ELeave ) CProfileEngine(); |
|
135 CleanupStack::PushL( self ); |
|
136 self->ConstructL(); |
|
137 return self; |
|
138 } |
|
139 |
|
140 |
|
141 // --------------------------------------------------------------------------- |
|
142 // ?description_if_needed |
|
143 // --------------------------------------------------------------------------- |
|
144 // |
|
145 CProfileEngine::~CProfileEngine() |
|
146 { |
|
147 } |
|
148 |
|
149 |
|
150 // --------------------------------------------------------------------------- |
|
151 // From class ?base_class. |
|
152 // ?implementation_description |
|
153 // --------------------------------------------------------------------------- |
|
154 // |
|
155 void CProfileEngine::Release() |
|
156 { |
|
157 delete this; |
|
158 } |
|
159 |
|
160 |
|
161 MProfile* CProfileEngine::ActiveProfileLC() |
|
162 { |
|
163 if( CStubDataHolder::Instance()->CurrentProfile()->Name().Length() == 0 ) |
|
164 { |
|
165 User::Leave( KErrNotReady ); |
|
166 } |
|
167 CProfile* profile = new( ELeave )CProfile; |
|
168 CleanupStack::PushL( profile ); |
|
169 return profile; |
|
170 } |
|
171 |
|
172 |
|
173 MProfile* CProfileEngine::ActiveProfileL() |
|
174 { |
|
175 CProfile* profile = new( ELeave )CProfile; |
|
176 return profile; |
|
177 } |
|
178 |
|
179 |
|
180 TInt CProfileEngine::ActiveProfileId() |
|
181 { |
|
182 return CStubDataHolder::Instance()->CurrentProfile()->Id(); |
|
183 } |
|
184 |
|
185 |
|
186 MProfilesNamesArray* CProfileEngine::ProfilesNamesArrayLC() |
|
187 { |
|
188 return NULL; |
|
189 } |
|
190 |
|
191 |
|
192 void CProfileEngine::SetActiveProfileL( TInt /*aId*/ ) |
|
193 { |
|
194 } |
|
195 |
|
196 |
|
197 void CProfileEngine::SetTempRingingVolumeL( TProfileRingingVolume /*aVolume*/ ) |
|
198 { |
|
199 } |
|
200 |
|
201 |
|
202 TProfileRingingVolume CProfileEngine::TempRingingVolumeL() const |
|
203 { |
|
204 } |
|
205 |
|
206 |
|
207 void CProfileEngine::SetTempMediaVolumeL( TProfileRingingVolume /*aVolume*/ ) |
|
208 { |
|
209 } |
|
210 |
|
211 |
|
212 TProfileRingingVolume CProfileEngine::TempMediaVolumeL() const |
|
213 { |
|
214 } |
|
215 |
|
216 |
|
217 TBool CProfileEngine::IsFeatureSupported( TProfileFeatureId /*aFeatureId*/ ) const |
|
218 { |
|
219 return EFalse; |
|
220 } |
|
221 |
|
222 TBool CProfileEngine::IsActiveProfileTimedL() |
|
223 { |
|
224 return EFalse; |
|
225 } |
|
226 |