genericservices/taskscheduler/SCHSVR/SCHEDULE.INL
changeset 0 e4d67989cc36
equal deleted inserted replaced
-1:000000000000 0:e4d67989cc36
       
     1 // Copyright (c) 2001-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 // simple accessors/querying functions
       
    15 // 
       
    16 //
       
    17 
       
    18 
       
    19 inline TInt CSchedule::Id() const
       
    20 	{return iId;}
       
    21 
       
    22 inline const TTsTime& CSchedule::DueTime() const
       
    23 	{return iDueTime;}
       
    24 
       
    25 inline TBool CSchedule::Persists() const
       
    26 	{return iPersists;}
       
    27 
       
    28 inline TBool CSchedule::Enabled() const
       
    29 	{return iEnabled;}
       
    30 
       
    31 inline void CSchedule::SetEnabled(TBool aEnabled)
       
    32 	{iEnabled = aEnabled;}
       
    33 
       
    34 inline TSglQue<TScheduledTask>* CSchedule::Tasks()
       
    35 	{return &iTaskList;}
       
    36 
       
    37 inline TBool CSchedule::HasTasks() const
       
    38 	{return !(iTaskList.IsEmpty());}
       
    39 
       
    40 inline const TDesC& CSchedule::Name() const
       
    41 	{return *iName;}
       
    42 	
       
    43 inline TScheduleType CSchedule::Type() const
       
    44 	{
       
    45 	if(iConditions.Count()==0)
       
    46 		return ETimeSchedule;
       
    47 	else
       
    48 		return EConditionSchedule;	
       
    49 	}
       
    50 	
       
    51 inline void CSchedule::CheckAccessAllowedL(const RMessagePtr2& aMessage) const
       
    52 	{
       
    53 	if(!IsAccessAllowed(aMessage))
       
    54 		User::Leave(KErrPermissionDenied);
       
    55 	}