os/ossrv/genericservices/taskscheduler/INC/SCHINFOINTERNAL.H
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// T-class for internalALL usage 	
sl@0
    15
// These classes comprise part of the interface (the rest is defined in RScheduler)
sl@0
    16
// 
sl@0
    17
//
sl@0
    18
sl@0
    19
#if !defined (__SCHINFOINTERNAL_H__)
sl@0
    20
#define __SCHINFOINTERNAL_H__
sl@0
    21
sl@0
    22
sl@0
    23
sl@0
    24
/** 
sl@0
    25
Defines a condition which a Publish and Subscribe Uid must satisfy.
sl@0
    26
sl@0
    27
A condition encapsulates three pieces of information:
sl@0
    28
sl@0
    29
the UID identifying the P&S variable against which a test is to be made.
sl@0
    30
sl@0
    31
the value against which that P&S variable is to be tested.
sl@0
    32
sl@0
    33
the type of test to be made.
sl@0
    34
sl@0
    35
@see RScheduler::CreatePersistentSchedule
sl@0
    36
@see RScheduler::EditSchedule
sl@0
    37
@see RScheduler::ScheduleTask
sl@0
    38
@see RScheduler::GetScheduleL
sl@0
    39
@see RProperty
sl@0
    40
sl@0
    41
@internalAll
sl@0
    42
*/
sl@0
    43
class TTaskSchedulerCondition
sl@0
    44
	{
sl@0
    45
public:
sl@0
    46
	/** 
sl@0
    47
	An enumeration defining the type of test to be made against 
sl@0
    48
	a Publish and Subscribe property. 
sl@0
    49
	*/
sl@0
    50
	enum TConditionType
sl@0
    51
		{
sl@0
    52
		/** Tests that a value is equal to a state variable value. */
sl@0
    53
		EEquals,		
sl@0
    54
		/** Tests that a value is unequal to a state variable value. */
sl@0
    55
		ENotEquals,		
sl@0
    56
		/** Tests that a value is greater than a state variable value. */
sl@0
    57
		EGreaterThan,	
sl@0
    58
		/** Tests that a value is less than a state variable value. */
sl@0
    59
		ELessThan		
sl@0
    60
		};
sl@0
    61
	inline TTaskSchedulerCondition();
sl@0
    62
	inline TTaskSchedulerCondition(TUid aCategory,
sl@0
    63
								TUint aKey, 
sl@0
    64
								TInt aState, 
sl@0
    65
								TConditionType aType);
sl@0
    66
public:
sl@0
    67
	/** P&S category.*/
sl@0
    68
	TUid iCategory;
sl@0
    69
	/** P&S key.*/
sl@0
    70
	TUint iKey;
sl@0
    71
	/** Integer state of corresponding P&S variable to be tested against*/
sl@0
    72
	TInt iState;
sl@0
    73
	/** type of test to be performed */
sl@0
    74
	TConditionType iType;
sl@0
    75
	};
sl@0
    76
sl@0
    77
sl@0
    78
/** 
sl@0
    79
Constructs the object with default values.
sl@0
    80
sl@0
    81
The UID identifying the P&S category against which a test is to be made 
sl@0
    82
is set to KNullUid.  The sub key is set to zero.
sl@0
    83
sl@0
    84
The value against which that P&S variable is to be tested is set to zero.
sl@0
    85
sl@0
    86
The type of test to be made is set to EEquals. 
sl@0
    87
*/
sl@0
    88
inline TTaskSchedulerCondition::TTaskSchedulerCondition()
sl@0
    89
:	iCategory(KNullUid), 
sl@0
    90
	iKey(0),
sl@0
    91
	iState(0), 
sl@0
    92
	iType(EEquals)
sl@0
    93
	{
sl@0
    94
	}
sl@0
    95
sl@0
    96
/** 
sl@0
    97
Constructs the object with the specified values.
sl@0
    98
sl@0
    99
Note that the RProperty variable identified by the aCategory/aKey pair 
sl@0
   100
must be of integer type for this to be a valid task scheduler condition.
sl@0
   101
sl@0
   102
@param aCategory The publish and subscribe category to be tested.
sl@0
   103
@param aKey The publish and suscribe sub-key to be tested.
sl@0
   104
@param aState The value against which the P&S variable identified by the 
sl@0
   105
specified UID is to be tested. 
sl@0
   106
@param aType The type of test to be made. 
sl@0
   107
sl@0
   108
@see RProperty
sl@0
   109
*/
sl@0
   110
inline TTaskSchedulerCondition::TTaskSchedulerCondition(TUid aCategory,
sl@0
   111
										TUint aKey, 
sl@0
   112
										TInt aState, 
sl@0
   113
										TConditionType aType)
sl@0
   114
:	iCategory(aCategory),
sl@0
   115
	iKey(aKey), 
sl@0
   116
	iState(aState), 
sl@0
   117
	iType(aType)
sl@0
   118
	{
sl@0
   119
	}
sl@0
   120
	
sl@0
   121
sl@0
   122
sl@0
   123
#endif