pimappservices/calendar/client/src/calchangecallback.cpp
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #include <calchangecallback.h>
       
    17 
       
    18 /** Construction function for the filter. 
       
    19 
       
    20 @param aChangeEntryType Filters notifications to only notify about entries of this type (event/todo/all).
       
    21 @param aIncludeUndatedTodos Filters notifications to notify about undated todos.
       
    22 @param aTimeRange Filters notifications to only notify about entries within this time range. 
       
    23 This will not include entries starting on the end time of this range, or ending on the start time of this range.
       
    24 @return Pointer to the newly created filter class.
       
    25 @publishedAll
       
    26 @released
       
    27 @capability None
       
    28 */
       
    29 EXPORT_C CCalChangeNotificationFilter* CCalChangeNotificationFilter::NewL(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange)
       
    30 	{
       
    31 	return new (ELeave) CCalChangeNotificationFilter(aChangeEntryType, aIncludeUndatedTodos, aTimeRange);
       
    32 	}
       
    33 
       
    34 CCalChangeNotificationFilter::CCalChangeNotificationFilter(MCalChangeCallBack2::TChangeEntryType aChangeEntryType, TBool aIncludeUndatedTodos, const CalCommon::TCalTimeRange& aTimeRange)
       
    35 : iChangeEntryType(aChangeEntryType), iTimeRange(aTimeRange), iIncludeUndatedTodos(aIncludeUndatedTodos)
       
    36 	{
       
    37 	}
       
    38 
       
    39 /** Destructor for the filter. Clear away any resources.
       
    40 @publishedAll
       
    41 @released
       
    42 @capability None
       
    43 */
       
    44 EXPORT_C CCalChangeNotificationFilter::~CCalChangeNotificationFilter()
       
    45 	{
       
    46 	}
       
    47 
       
    48 MCalChangeCallBack2::TChangeEntryType CCalChangeNotificationFilter::ChangeEntryType() const
       
    49 	{
       
    50 	return iChangeEntryType;
       
    51 	}
       
    52 
       
    53 TCalTime CCalChangeNotificationFilter::StartTime() const
       
    54 	{
       
    55 	return iTimeRange.StartTime();
       
    56 	}
       
    57 
       
    58 TCalTime CCalChangeNotificationFilter::EndTime() const
       
    59 	{
       
    60 	return iTimeRange.EndTime();
       
    61 	}
       
    62 	
       
    63 TBool CCalChangeNotificationFilter::IncludeUndatedTodos() const
       
    64 	{
       
    65 	return iIncludeUndatedTodos;
       
    66 	}