1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/ossrv/genericservices/taskscheduler/INC/SCHINFOINTERNAL.H Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,123 @@
1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
1.5 +// All rights reserved.
1.6 +// This component and the accompanying materials are made available
1.7 +// under the terms of "Eclipse Public License v1.0"
1.8 +// which accompanies this distribution, and is available
1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.10 +//
1.11 +// Initial Contributors:
1.12 +// Nokia Corporation - initial contribution.
1.13 +//
1.14 +// Contributors:
1.15 +//
1.16 +// Description:
1.17 +// T-class for internalALL usage
1.18 +// These classes comprise part of the interface (the rest is defined in RScheduler)
1.19 +//
1.20 +//
1.21 +
1.22 +#if !defined (__SCHINFOINTERNAL_H__)
1.23 +#define __SCHINFOINTERNAL_H__
1.24 +
1.25 +
1.26 +
1.27 +/**
1.28 +Defines a condition which a Publish and Subscribe Uid must satisfy.
1.29 +
1.30 +A condition encapsulates three pieces of information:
1.31 +
1.32 +the UID identifying the P&S variable against which a test is to be made.
1.33 +
1.34 +the value against which that P&S variable is to be tested.
1.35 +
1.36 +the type of test to be made.
1.37 +
1.38 +@see RScheduler::CreatePersistentSchedule
1.39 +@see RScheduler::EditSchedule
1.40 +@see RScheduler::ScheduleTask
1.41 +@see RScheduler::GetScheduleL
1.42 +@see RProperty
1.43 +
1.44 +@internalAll
1.45 +*/
1.46 +class TTaskSchedulerCondition
1.47 + {
1.48 +public:
1.49 + /**
1.50 + An enumeration defining the type of test to be made against
1.51 + a Publish and Subscribe property.
1.52 + */
1.53 + enum TConditionType
1.54 + {
1.55 + /** Tests that a value is equal to a state variable value. */
1.56 + EEquals,
1.57 + /** Tests that a value is unequal to a state variable value. */
1.58 + ENotEquals,
1.59 + /** Tests that a value is greater than a state variable value. */
1.60 + EGreaterThan,
1.61 + /** Tests that a value is less than a state variable value. */
1.62 + ELessThan
1.63 + };
1.64 + inline TTaskSchedulerCondition();
1.65 + inline TTaskSchedulerCondition(TUid aCategory,
1.66 + TUint aKey,
1.67 + TInt aState,
1.68 + TConditionType aType);
1.69 +public:
1.70 + /** P&S category.*/
1.71 + TUid iCategory;
1.72 + /** P&S key.*/
1.73 + TUint iKey;
1.74 + /** Integer state of corresponding P&S variable to be tested against*/
1.75 + TInt iState;
1.76 + /** type of test to be performed */
1.77 + TConditionType iType;
1.78 + };
1.79 +
1.80 +
1.81 +/**
1.82 +Constructs the object with default values.
1.83 +
1.84 +The UID identifying the P&S category against which a test is to be made
1.85 +is set to KNullUid. The sub key is set to zero.
1.86 +
1.87 +The value against which that P&S variable is to be tested is set to zero.
1.88 +
1.89 +The type of test to be made is set to EEquals.
1.90 +*/
1.91 +inline TTaskSchedulerCondition::TTaskSchedulerCondition()
1.92 +: iCategory(KNullUid),
1.93 + iKey(0),
1.94 + iState(0),
1.95 + iType(EEquals)
1.96 + {
1.97 + }
1.98 +
1.99 +/**
1.100 +Constructs the object with the specified values.
1.101 +
1.102 +Note that the RProperty variable identified by the aCategory/aKey pair
1.103 +must be of integer type for this to be a valid task scheduler condition.
1.104 +
1.105 +@param aCategory The publish and subscribe category to be tested.
1.106 +@param aKey The publish and suscribe sub-key to be tested.
1.107 +@param aState The value against which the P&S variable identified by the
1.108 +specified UID is to be tested.
1.109 +@param aType The type of test to be made.
1.110 +
1.111 +@see RProperty
1.112 +*/
1.113 +inline TTaskSchedulerCondition::TTaskSchedulerCondition(TUid aCategory,
1.114 + TUint aKey,
1.115 + TInt aState,
1.116 + TConditionType aType)
1.117 +: iCategory(aCategory),
1.118 + iKey(aKey),
1.119 + iState(aState),
1.120 + iType(aType)
1.121 + {
1.122 + }
1.123 +
1.124 +
1.125 +
1.126 +#endif