sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // T-class for internalALL usage sl@0: // These classes comprise part of the interface (the rest is defined in RScheduler) sl@0: // sl@0: // sl@0: sl@0: #if !defined (__SCHINFOINTERNAL_H__) sl@0: #define __SCHINFOINTERNAL_H__ sl@0: sl@0: sl@0: sl@0: /** sl@0: Defines a condition which a Publish and Subscribe Uid must satisfy. sl@0: sl@0: A condition encapsulates three pieces of information: sl@0: sl@0: the UID identifying the P&S variable against which a test is to be made. sl@0: sl@0: the value against which that P&S variable is to be tested. sl@0: sl@0: the type of test to be made. sl@0: sl@0: @see RScheduler::CreatePersistentSchedule sl@0: @see RScheduler::EditSchedule sl@0: @see RScheduler::ScheduleTask sl@0: @see RScheduler::GetScheduleL sl@0: @see RProperty sl@0: sl@0: @internalAll sl@0: */ sl@0: class TTaskSchedulerCondition sl@0: { sl@0: public: sl@0: /** sl@0: An enumeration defining the type of test to be made against sl@0: a Publish and Subscribe property. sl@0: */ sl@0: enum TConditionType sl@0: { sl@0: /** Tests that a value is equal to a state variable value. */ sl@0: EEquals, sl@0: /** Tests that a value is unequal to a state variable value. */ sl@0: ENotEquals, sl@0: /** Tests that a value is greater than a state variable value. */ sl@0: EGreaterThan, sl@0: /** Tests that a value is less than a state variable value. */ sl@0: ELessThan sl@0: }; sl@0: inline TTaskSchedulerCondition(); sl@0: inline TTaskSchedulerCondition(TUid aCategory, sl@0: TUint aKey, sl@0: TInt aState, sl@0: TConditionType aType); sl@0: public: sl@0: /** P&S category.*/ sl@0: TUid iCategory; sl@0: /** P&S key.*/ sl@0: TUint iKey; sl@0: /** Integer state of corresponding P&S variable to be tested against*/ sl@0: TInt iState; sl@0: /** type of test to be performed */ sl@0: TConditionType iType; sl@0: }; sl@0: sl@0: sl@0: /** sl@0: Constructs the object with default values. sl@0: sl@0: The UID identifying the P&S category against which a test is to be made sl@0: is set to KNullUid. The sub key is set to zero. sl@0: sl@0: The value against which that P&S variable is to be tested is set to zero. sl@0: sl@0: The type of test to be made is set to EEquals. sl@0: */ sl@0: inline TTaskSchedulerCondition::TTaskSchedulerCondition() sl@0: : iCategory(KNullUid), sl@0: iKey(0), sl@0: iState(0), sl@0: iType(EEquals) sl@0: { sl@0: } sl@0: sl@0: /** sl@0: Constructs the object with the specified values. sl@0: sl@0: Note that the RProperty variable identified by the aCategory/aKey pair sl@0: must be of integer type for this to be a valid task scheduler condition. sl@0: sl@0: @param aCategory The publish and subscribe category to be tested. sl@0: @param aKey The publish and suscribe sub-key to be tested. sl@0: @param aState The value against which the P&S variable identified by the sl@0: specified UID is to be tested. sl@0: @param aType The type of test to be made. sl@0: sl@0: @see RProperty sl@0: */ sl@0: inline TTaskSchedulerCondition::TTaskSchedulerCondition(TUid aCategory, sl@0: TUint aKey, sl@0: TInt aState, sl@0: TConditionType aType) sl@0: : iCategory(aCategory), sl@0: iKey(aKey), sl@0: iState(aState), sl@0: iType(aType) sl@0: { sl@0: } sl@0: sl@0: sl@0: sl@0: #endif