equal
deleted
inserted
replaced
49 const TInt KBufferSizeIncrement( 64 ); |
49 const TInt KBufferSizeIncrement( 64 ); |
50 const TInt KBuffLength = 128; |
50 const TInt KBuffLength = 128; |
51 |
51 |
52 |
52 |
53 const TInt KComma( ',' ); |
53 const TInt KComma( ',' ); |
|
54 _LIT(KPhoneCalendarName,"PhoneCalendar"); |
54 |
55 |
55 // ================= MEMBER FUNCTIONS ======================= |
56 // ================= MEMBER FUNCTIONS ======================= |
56 // |
57 // |
57 // Construction and destruction |
58 // Construction and destruction |
58 // |
59 // |
335 |
336 |
336 if(!index) |
337 if(!index) |
337 { |
338 { |
338 TBuf<KMaxFileName> calendarFileName; |
339 TBuf<KMaxFileName> calendarFileName; |
339 calendarFileName.Append(KCalendarDatabaseFilePath); |
340 calendarFileName.Append(KCalendarDatabaseFilePath); |
|
341 calendarInfo->SetEnabled(EFalse); |
340 TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo)); |
342 TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo)); |
341 User::LeaveIfError(error); |
343 User::LeaveIfError(error); |
342 } |
344 } |
343 else |
345 else |
344 { |
346 { |
375 User::LeaveIfError( fsSession.Connect() ); |
377 User::LeaveIfError( fsSession.Connect() ); |
376 TFileName resourceFileName( KMissedAlarmResourceFile ); |
378 TFileName resourceFileName( KMissedAlarmResourceFile ); |
377 |
379 |
378 BaflUtils::NearestLanguageFile( fsSession, resourceFileName ); |
380 BaflUtils::NearestLanguageFile( fsSession, resourceFileName ); |
379 |
381 |
380 // __PRINT(" resourcefileName : %s" , resourceFileName ); |
|
381 |
|
382 resourceFile.OpenL(fsSession, resourceFileName ); |
382 resourceFile.OpenL(fsSession, resourceFileName ); |
383 resourceFile.ConfirmSignatureL( 0 ); |
383 resourceFile.ConfirmSignatureL( 0 ); |
|
384 |
|
385 //Phone calendar |
|
386 HBufC* phoneCalendarBuffer = KPhoneCalendarName().AllocLC(); |
|
387 aCalendarNames.AppendL(phoneCalendarBuffer->Des()); |
|
388 CleanupStack::PopAndDestroy( phoneCalendarBuffer ); |
|
389 |
384 // personal |
390 // personal |
385 HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL ); |
391 HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL ); |
386 const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(), |
392 const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(), |
387 ( personalBuffer->Length()+1 )>>1 ); |
393 ( personalBuffer->Length()+1 )>>1 ); |
388 HBufC *personalCalendar = ptrPBuffer.AllocL(); |
394 HBufC *personalCalendar = ptrPBuffer.AllocL(); |
463 { |
469 { |
464 TRACE_ENTRY_POINT; |
470 TRACE_ENTRY_POINT; |
465 |
471 |
466 TPtrC marker = aRepositoryBuffer; |
472 TPtrC marker = aRepositoryBuffer; |
467 TInt calendarColorOffset; |
473 TInt calendarColorOffset; |
|
474 |
|
475 //For phone calendar |
|
476 aCalendarColors.Append(KRgbRed.Value()); |
|
477 |
468 while ((calendarColorOffset = marker.Locate(TChar(KComma))) |
478 while ((calendarColorOffset = marker.Locate(TChar(KComma))) |
469 != KErrNotFound) |
479 != KErrNotFound) |
470 { |
480 { |
471 TLex lex(marker.Left(calendarColorOffset)); |
481 TLex lex(marker.Left(calendarColorOffset)); |
472 TInt colorValue; |
482 TInt colorValue; |