meetingrequest/mrdb/src/cesmrcaldbmgr.cpp
branchRCL_3
changeset 14 b13141f05c3d
parent 12 4ce476e64c59
child 16 b5fbb9b25d57
--- a/meetingrequest/mrdb/src/cesmrcaldbmgr.cpp	Wed Apr 14 15:42:15 2010 +0300
+++ b/meetingrequest/mrdb/src/cesmrcaldbmgr.cpp	Tue Apr 27 16:20:14 2010 +0300
@@ -778,7 +778,7 @@
 // CESMRCalDbMgr::GetCalendarColorByNameL
 // ----------------------------------------------------------------------------
 //
-TRgb CESMRCalDbMgr::GetCalendarColorByNameL(TDesC& aCalendarName)
+TRgb CESMRCalDbMgr::GetCalendarColorByNameL( const TDesC& aCalendarName )
     {
     FUNC_LOG;
     TInt count = iCalendarInfoArray.Count();
@@ -799,7 +799,7 @@
 // CESMRCalDbMgr::SetCurCalendarByNameL
 // ----------------------------------------------------------------------------
 //
-void CESMRCalDbMgr::SetCurCalendarByNameL( TDesC& aCalendarName )
+void CESMRCalDbMgr::SetCurCalendarByNameL(  const TDesC& aCalendarName )
     {
     FUNC_LOG;
     TInt count = iCalendarInfoArray.Count();
@@ -854,6 +854,27 @@
     }
 
 // ----------------------------------------------------------------------------
+// CESMRCalDbMgr::SetCurCalendarByDbIdL
+// ----------------------------------------------------------------------------
+//
+void CESMRCalDbMgr::SetCurCalendarByDbIdL( TCalFileId aDbId )
+    {
+    FUNC_LOG;
+
+    for ( TInt i = 0; i < iCalSessionArray.Count(); ++i )
+        {
+        TCalFileId fileId( KNullFileId );
+        iCalSessionArray[ i ]->FileIdL( fileId );
+
+        if ( fileId == aDbId )
+            {
+            iCurCalenIndex = i;
+            break;
+            }
+        }
+    }
+
+// ----------------------------------------------------------------------------
 // CESMRCalDbMgr::GetCurCalendarColor
 // ----------------------------------------------------------------------------
 //