--- a/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Tue May 11 16:12:24 2010 +0300
+++ b/calendarui/multicaluidialog/src/multicaluidialogmodel.cpp Tue May 25 12:41:10 2010 +0300
@@ -22,11 +22,15 @@
#include <CalenInterimUtils2.h>
#include <calcalendarinfo.h>
#include <calcalendariterator.h>
+#include <calenmulticaluids.hrh>
+
// user include.
#include "multicaluidialogmodel.h"
#include "calendarui_debug.h"
#include "cleanupresetanddestroy.h"
+const TInt KBuffLength = 24;
+
// ----------------------------------------------------------------------------
// CMultiCalUiDialogModel::CMultiCalUiDialogModel
// Constructor
@@ -304,11 +308,29 @@
CCalCalendarIterator* calIter = CCalCalendarIterator::NewL(
*iCalendarsSession);
CleanupStack::PushL(calIter);
- CCalCalendarInfo* calendarInfo = calIter->FirstL();
- while (calendarInfo)
+
+ for( CCalCalendarInfo* calendarInfo = calIter->FirstL();
+ calendarInfo!=NULL;calendarInfo = calIter->NextL())
{
- aCalendarInfoList.AppendL(calendarInfo);
- calendarInfo = calIter->NextL();
+ TBuf8<KBuffLength> keyBuff;
+ // Mark the meta property as SoftDeleted
+ keyBuff.Zero();
+ keyBuff.AppendNum(EMarkAsDelete);
+ TBool softDelete = EFalse;
+ TPckgC<TBool> pkgSoftDelete( softDelete );
+ TRAPD(err,pkgSoftDelete.Set(calendarInfo->PropertyValueL(keyBuff)));
+ if( KErrNone == err )
+ {
+ softDelete = pkgSoftDelete();
+ }
+ if(!softDelete)
+ {
+ aCalendarInfoList.Append(calendarInfo);
+ }
+ else
+ {
+ delete calendarInfo;
+ }
}
CleanupStack::PopAndDestroy(calIter);