calendarui/server/CalenSvr/src/CalenServer.cpp
branchRCL_3
changeset 13 0f07cd1b5772
parent 5 42814f902fe6
child 19 1984aceb8774
--- a/calendarui/server/CalenSvr/src/CalenServer.cpp	Fri Mar 12 15:42:35 2010 +0200
+++ b/calendarui/server/CalenSvr/src/CalenServer.cpp	Mon Mar 15 12:40:18 2010 +0200
@@ -51,6 +51,7 @@
 
 
 const TInt KComma( ',' );
+_LIT(KPhoneCalendarName,"PhoneCalendar");
 
 // ================= MEMBER FUNCTIONS =======================
 //
@@ -337,6 +338,7 @@
             {
             TBuf<KMaxFileName> calendarFileName;
             calendarFileName.Append(KCalendarDatabaseFilePath);
+            calendarInfo->SetEnabled(EFalse);
             TRAPD(error,session->CreateCalFileL(calendarFileName,*calendarInfo));
 			User::LeaveIfError(error);
             }
@@ -377,10 +379,14 @@
     
     BaflUtils::NearestLanguageFile( fsSession, resourceFileName );
     
-   // __PRINT(" resourcefileName : %s" , resourceFileName );
-
     resourceFile.OpenL(fsSession, resourceFileName );
     resourceFile.ConfirmSignatureL( 0 );
+    
+    //Phone calendar 
+       HBufC* phoneCalendarBuffer = KPhoneCalendarName().AllocLC();
+       aCalendarNames.AppendL(phoneCalendarBuffer->Des());
+       CleanupStack::PopAndDestroy( phoneCalendarBuffer );
+        
     // personal
         HBufC8* personalBuffer = resourceFile.AllocReadLC( R_CALE_DB_PERSONAL );    
        const TPtrC16 ptrPBuffer(( TText16*) personalBuffer->Ptr(),
@@ -465,6 +471,10 @@
     
     TPtrC marker = aRepositoryBuffer;
     TInt calendarColorOffset;
+    
+    //For phone calendar 
+    aCalendarColors.Append(KRgbRed.Value());
+    
     while ((calendarColorOffset = marker.Locate(TChar(KComma)))
             != KErrNotFound)
         {