epoc32/include/msvsysagentaction.h
branchSymbian2
changeset 2 2fe1408b6811
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 // Copyright (c) 2000-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // MsvSysAgentCondAction.H
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __MSVSYSAGENTCONDACTION_H__
       
    19 #define	__MSVSYSAGENTCONDACTION_H__
       
    20 
       
    21  
       
    22 
       
    23 
       
    24 #include <msvsenderroraction.h>
       
    25 
       
    26 /////////////////////////////////////////////////////////////////////////////
       
    27 //
       
    28 //	System Agent-related Class Declarations
       
    29 //
       
    30 /////////////////////////////////////////////////////////////////////////////
       
    31 
       
    32 
       
    33 
       
    34 /** 
       
    35 Defines a condition which a Publish and Subscribe Uid must satisfy.
       
    36 
       
    37 @see RProperty
       
    38 
       
    39 @publishedAll
       
    40 @released
       
    41 */
       
    42 class TMsvCondition
       
    43 	{
       
    44 public:
       
    45 /** 
       
    46 An enumeration defining the type of test to be made against a Publish 
       
    47 and Subscribe property. 
       
    48 */
       
    49 	enum TMsvSchSendConditionType
       
    50 		{
       
    51 		/** Tests that a value is equal to a state variable value. */
       
    52 		EMsvSchSendEquals,		
       
    53 		/** Tests that a value is unequal to a state variable value. */
       
    54 		EMsvSchSendNotEquals,		
       
    55 		/** Tests that a value is greater than a state variable value. */
       
    56 		EMsvSchSendGreaterThan,	
       
    57 		/** Tests that a value is less than a state variable value. */
       
    58 		EMsvSchSendLessThan		
       
    59 		};
       
    60 		
       
    61 public:
       
    62 	/** second UID of the process which set the condition*/
       
    63 	TUid iVariable;
       
    64 	/** Integer state of corresponding P&S variable to be tested against*/
       
    65 	TInt iState;
       
    66 	/** type of test to be performed */
       
    67 	TMsvSchSendConditionType iType;
       
    68 	};
       
    69 	
       
    70 
       
    71 /**
       
    72 Schedule Send condition must be satisfied before a message sending attempt.
       
    73 
       
    74 @publishedAll
       
    75 @released
       
    76 */ 
       
    77 
       
    78 class TMsvSysAgentConditionAction
       
    79 	{
       
    80 public:
       
    81 	IMPORT_C TMsvSysAgentConditionAction();
       
    82 
       
    83 
       
    84 	/** Condition to meet. */
       
    85 	TMsvCondition iCondition;
       
    86 
       
    87 	/** Error action to use. */
       
    88 	TMsvSendErrorAction iErrorAction;
       
    89 
       
    90 	/** Default error action. */
       
    91 	TBool iUseDefaultSysAgentAction;
       
    92 
       
    93 private:
       
    94 	};
       
    95 
       
    96 
       
    97 
       
    98 /**
       
    99 Defines an array of  schedule send conditions that must be satisfied before a message sending attempt.
       
   100 
       
   101 @see TMsvSysAgentConditionAction
       
   102 
       
   103 @publishedAll
       
   104 @released
       
   105 */ 
       
   106 
       
   107 class CMsvSysAgentActions : public CArrayFixFlat<TMsvSysAgentConditionAction>
       
   108 	{
       
   109 public:
       
   110 	IMPORT_C CMsvSysAgentActions();
       
   111 	IMPORT_C ~CMsvSysAgentActions();
       
   112 
       
   113 
       
   114 	IMPORT_C TBool ConditionsMetL(TMsvSendErrorAction& aErrorAction);
       
   115 
       
   116 	/** Default send error action. */
       
   117 	TMsvSendErrorAction iDefault;
       
   118 
       
   119 private:
       
   120 
       
   121 
       
   122 	void GetConditionVariablesL(CArrayFix<TUid>& aUids) const;
       
   123 	TBool CheckStates(const CArrayFix<TInt>& aStates, TMsvSendErrorAction& aErrorAction) const;
       
   124 	TBool ConditionOK(const TMsvSysAgentConditionAction& aCondAction, const TInt aState) const;
       
   125 	
       
   126 	};
       
   127 
       
   128 #endif	// __MSVSYSAGENTCONDACTION_H__