diff -r 000000000000 -r f979ecb2b13e pimappservices/calendar/client/src/calchangecallback.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/pimappservices/calendar/client/src/calchangecallback.cpp Tue Feb 02 10:12:19 2010 +0200 @@ -0,0 +1,66 @@ +// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +// All rights reserved. +// This component and the accompanying materials are made available +// under the terms of "Eclipse Public License v1.0" +// which accompanies this distribution, and is available +// at the URL "http://www.eclipse.org/legal/epl-v10.html". +// +// Initial Contributors: +// Nokia Corporation - initial contribution. +// +// Contributors: +// +// Description: +// + +#include + +/** Construction function for the filter. + +@param aChangeEntryType Filters notifications to only notify about entries of this type (event/todo/all). +@param aIncludeUndatedTodos Filters notifications to notify about undated todos. +@param aTimeRange Filters notifications to only notify about entries within this time range. +This will not include entries starting on the end time of this range, or ending on the start time of this range. +@return Pointer to the newly created filter class. +@publishedAll +@released +@capability None +*/ +EXPORT_C CCalChangeNotificationFilter* CCalChangeNotificationFilter::NewL(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange) + { + return new (ELeave) CCalChangeNotificationFilter(aChangeEntryType, aIncludeUndatedTodos, aTimeRange); + } + +CCalChangeNotificationFilter::CCalChangeNotificationFilter(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange) +: iChangeEntryType(aChangeEntryType), iTimeRange(aTimeRange), iIncludeUndatedTodos(aIncludeUndatedTodos) + { + } + +/** Destructor for the filter. Clear away any resources. +@publishedAll +@released +@capability None +*/ +EXPORT_C CCalChangeNotificationFilter::~CCalChangeNotificationFilter() + { + } + +MCalChangeCallBack2::TChangeEntryType CCalChangeNotificationFilter::ChangeEntryType() const + { + return iChangeEntryType; + } + +TCalTime CCalChangeNotificationFilter::StartTime() const + { + return iTimeRange.StartTime(); + } + +TCalTime CCalChangeNotificationFilter::EndTime() const + { + return iTimeRange.EndTime(); + } + +TBool CCalChangeNotificationFilter::IncludeUndatedTodos() const + { + return iIncludeUndatedTodos; + }