equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
111 CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC(); |
111 CVoiceMailboxEntry* vmbxEntry = CVoiceMailboxEntry::NewLC(); |
112 // get als line info |
112 // get als line info |
113 vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() ); |
113 vmbxEntry->SetVmbxAlsLineType( VmbxUtilities::AlsLine() ); |
114 |
114 |
115 vmbxEntry->SetVoiceMailboxType( EVmbxVoice ); |
115 vmbxEntry->SetVoiceMailboxType( EVmbxVoice ); |
116 vmbxEntry->SetServiceId( KVmbxServiceVideo ); |
116 vmbxEntry->SetServiceId( KVmbxServiceVoice ); |
117 // get store type from CenRep |
117 // get store type from CenRep |
118 TVmbxMemoryLocation storeType = iProvider.VmbxCenRepHandler().StoreType(); |
118 TVmbxMemoryLocation storeType = iProvider.VmbxCenRepHandler().StoreType(); |
119 |
119 |
120 if ( EVmbxSimMemory == storeType && iSimHandler ) |
120 if ( EVmbxSimMemory == storeType && iSimHandler ) |
121 { |
121 { |
240 const TInt aFlags ) |
240 const TInt aFlags ) |
241 { |
241 { |
242 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration =>" ); |
242 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration =>" ); |
243 TBool configuration( EFalse ); |
243 TBool configuration( EFalse ); |
244 // check thr property whether allow user to edit number |
244 // check thr property whether allow user to edit number |
245 if ( EVmbxChangeNbrNotAllowedOnUi & aFlags ) |
245 if ( EVmbxChangeNbrAllowedOnUi & aFlags ) |
246 { |
246 { |
247 configuration = iProvider.VmbxCenRepHandler().IsAllowedUserEdit(); |
247 configuration = iProvider.VmbxCenRepHandler().IsAllowedUserEdit(); |
248 if ( configuration ) |
248 if ( configuration ) |
249 { |
249 { |
250 configuration = IsWritable( aParams ); |
250 configuration = IsWritable( aParams ); |
251 } |
251 } |
|
252 } |
|
253 else |
|
254 { |
|
255 configuration = CVmbxEngineBase::CheckConfiguration(aParams, aFlags); |
252 } |
256 } |
253 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration: conf%I <=", |
257 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::CheckConfiguration: conf%I <=", |
254 configuration ); |
258 configuration ); |
255 return configuration; |
259 return configuration; |
256 } |
260 } |
267 |
271 |
268 result = iProvider.VmbxCenRepHandler().Save( aEntry ); |
272 result = iProvider.VmbxCenRepHandler().Save( aEntry ); |
269 |
273 |
270 if ( KErrNone == result ) |
274 if ( KErrNone == result ) |
271 { |
275 { |
272 // observer to change vmbx number |
276 iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToPhoneMemory ); |
273 TPtrC vmbxNumber( KNullDesC ); |
|
274 aEntry.GetVmbxNumber( vmbxNumber ); |
|
275 if ( vmbxNumber.Length() ) |
|
276 { |
|
277 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\ |
|
278 SaveEntryToPhone Number Length" ) |
|
279 iProvider.VmbxUiUtilities().ShowSaveToPhoneNote(); |
|
280 } |
|
281 else |
|
282 { |
|
283 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\ |
|
284 SaveEntryToPhone Number Length zero" ) |
|
285 iProvider.VmbxUiUtilities().ShowSaveEmptyNoteL( |
|
286 aEntry.VoiceMailboxType() ); |
|
287 } |
|
288 } |
277 } |
289 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: result=%I <=", |
278 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::SaveEntryToPhoneL: result=%I <=", |
290 result ); |
279 result ); |
291 User::LeaveIfError( result ); |
280 User::LeaveIfError( result ); |
292 } |
281 } |
312 if ( iSimHandler ) |
301 if ( iSimHandler ) |
313 { |
302 { |
314 result = iSimHandler->Save( aEntry ); |
303 result = iSimHandler->Save( aEntry ); |
315 if ( KErrNone == result ) |
304 if ( KErrNone == result ) |
316 { |
305 { |
317 if ( ptrNumber.Length() ) |
306 iProvider.VmbxUiUtilities().ShowInformationdNoteL( ESavedToSimMemory ); |
318 { |
|
319 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\ |
|
320 SaveEntryToSim Number Length" ) |
|
321 iProvider.VmbxUiUtilities().ShowSaveToSimNote(); |
|
322 } |
|
323 else |
|
324 { |
|
325 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::\ |
|
326 SaveEntryToPhone Number Length zero" ) |
|
327 TRAP_IGNORE( iProvider.VmbxUiUtilities(). |
|
328 ShowSaveEmptyNoteL( aEntry.VoiceMailboxType() ) ); |
|
329 } |
|
330 } |
307 } |
331 } |
308 } |
332 |
309 |
333 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::\ |
310 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::\ |
334 SaveEntryToSimL: result=%I <=", result ); |
311 SaveEntryToSimL: result=%I <=", result ); |
342 // ---------------------------------------------------------------------------- |
319 // ---------------------------------------------------------------------------- |
343 TBool CVmbxCsVoiceEngine::IsSimWritable() |
320 TBool CVmbxCsVoiceEngine::IsSimWritable() |
344 { |
321 { |
345 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsSimWritable: =>" ); |
322 VMBLOGSTRING( "VMBX: CVmbxCsVoiceEngine::IsSimWritable: =>" ); |
346 TBool result( EFalse ); |
323 TBool result( EFalse ); |
347 if ( iSimHandler && iSimHandler->IsWritable() |
324 if ( !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) |
348 && !( iProvider.VmbxCenRepHandler().IsSimReadOnly() ) ) |
325 && iSimHandler && iSimHandler->IsWritable() ) |
349 { |
326 { |
350 result = ETrue; |
327 result = ETrue; |
351 } |
328 } |
352 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsSimWritable:\ |
329 VMBLOGSTRING2( "VMBX: CVmbxCsVoiceEngine::IsSimWritable:\ |
353 result=%I <=", result ); |
330 result=%I <=", result ); |