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.
     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 // T-class for internalALL usage 	
    15 // These classes comprise part of the interface (the rest is defined in RScheduler)
    16 // 
    17 //
    18 
    19 #if !defined (__SCHINFOINTERNAL_H__)
    20 #define __SCHINFOINTERNAL_H__
    21 
    22 
    23 
    24 /** 
    25 Defines a condition which a Publish and Subscribe Uid must satisfy.
    26 
    27 A condition encapsulates three pieces of information:
    28 
    29 the UID identifying the P&S variable against which a test is to be made.
    30 
    31 the value against which that P&S variable is to be tested.
    32 
    33 the type of test to be made.
    34 
    35 @see RScheduler::CreatePersistentSchedule
    36 @see RScheduler::EditSchedule
    37 @see RScheduler::ScheduleTask
    38 @see RScheduler::GetScheduleL
    39 @see RProperty
    40 
    41 @internalAll
    42 */
    43 class TTaskSchedulerCondition
    44 	{
    45 public:
    46 	/** 
    47 	An enumeration defining the type of test to be made against 
    48 	a Publish and Subscribe property. 
    49 	*/
    50 	enum TConditionType
    51 		{
    52 		/** Tests that a value is equal to a state variable value. */
    53 		EEquals,		
    54 		/** Tests that a value is unequal to a state variable value. */
    55 		ENotEquals,		
    56 		/** Tests that a value is greater than a state variable value. */
    57 		EGreaterThan,	
    58 		/** Tests that a value is less than a state variable value. */
    59 		ELessThan		
    60 		};
    61 	inline TTaskSchedulerCondition();
    62 	inline TTaskSchedulerCondition(TUid aCategory,
    63 								TUint aKey, 
    64 								TInt aState, 
    65 								TConditionType aType);
    66 public:
    67 	/** P&S category.*/
    68 	TUid iCategory;
    69 	/** P&S key.*/
    70 	TUint iKey;
    71 	/** Integer state of corresponding P&S variable to be tested against*/
    72 	TInt iState;
    73 	/** type of test to be performed */
    74 	TConditionType iType;
    75 	};
    76 
    77 
    78 /** 
    79 Constructs the object with default values.
    80 
    81 The UID identifying the P&S category against which a test is to be made 
    82 is set to KNullUid.  The sub key is set to zero.
    83 
    84 The value against which that P&S variable is to be tested is set to zero.
    85 
    86 The type of test to be made is set to EEquals. 
    87 */
    88 inline TTaskSchedulerCondition::TTaskSchedulerCondition()
    89 :	iCategory(KNullUid), 
    90 	iKey(0),
    91 	iState(0), 
    92 	iType(EEquals)
    93 	{
    94 	}
    95 
    96 /** 
    97 Constructs the object with the specified values.
    98 
    99 Note that the RProperty variable identified by the aCategory/aKey pair 
   100 must be of integer type for this to be a valid task scheduler condition.
   101 
   102 @param aCategory The publish and subscribe category to be tested.
   103 @param aKey The publish and suscribe sub-key to be tested.
   104 @param aState The value against which the P&S variable identified by the 
   105 specified UID is to be tested. 
   106 @param aType The type of test to be made. 
   107 
   108 @see RProperty
   109 */
   110 inline TTaskSchedulerCondition::TTaskSchedulerCondition(TUid aCategory,
   111 										TUint aKey, 
   112 										TInt aState, 
   113 										TConditionType aType)
   114 :	iCategory(aCategory),
   115 	iKey(aKey), 
   116 	iState(aState), 
   117 	iType(aType)
   118 	{
   119 	}
   120 	
   121 
   122 
   123 #endif