genericservices/taskscheduler/SCHSVR/SCHENTRY.H
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 2004-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 // Defines TScheduleEntry hierachy: 
       
    15 // - const classes which tell you the next time they're due
       
    16 // - CSchedule is an aggregate of TScheduleEntry objects
       
    17 // 
       
    18 //
       
    19 
       
    20 #if !defined(__SCHENTRY_H__)
       
    21 #define __SCHENTRY_H__
       
    22 
       
    23 //System Includes
       
    24 #include <e32base.h>
       
    25 
       
    26 //User Includes
       
    27 #include "SCHINFO.H"
       
    28 
       
    29 /**
       
    30 TScheduleEntry
       
    31 @internalComponent
       
    32 */
       
    33 class TScheduleEntry
       
    34 	{
       
    35 	friend class ScheduleEntryFactory;
       
    36 	
       
    37 public:
       
    38 	//returns the next due time for this schedule entry.
       
    39 	const TTsTime& NextScheduledTime(const TTsTime& aTime);
       
    40 	const TTsTime& DueTime() const;
       
    41 	const TScheduleEntryInfo2& Info() const;
       
    42 
       
    43 	static TInt Offset();
       
    44 
       
    45 protected:
       
    46 	TScheduleEntry(TScheduleEntryInfo2& aInfo);	
       
    47 private:	
       
    48 	virtual void CalculateNextPossibleRunDate(TTime& aTime) const = 0 ;
       
    49 
       
    50 private:	
       
    51 	TSglQueLink iLink; // queue management
       
    52 	TScheduleEntryInfo2 iEntryInfo; 
       
    53 	TTsTime iDueTime;
       
    54 	};
       
    55 
       
    56 /**
       
    57 @internalComponent
       
    58 */
       
    59 class ScheduleEntryFactory
       
    60 	{
       
    61 public:
       
    62 	static TScheduleEntry* CreateL(TScheduleEntryInfo2& aInfo);
       
    63 	};
       
    64 
       
    65 
       
    66 #endif