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 "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // MsvSysAgentCondAction.H
18 #ifndef __MSVSYSAGENTCONDACTION_H__
19 #define __MSVSYSAGENTCONDACTION_H__
24 #include <msvsenderroraction.h>
28 // System Agent-related Class Declarations
35 Defines a condition which a Publish and Subscribe Uid must satisfy.
46 An enumeration defining the type of test to be made against a Publish
47 and Subscribe property.
49 enum TMsvSchSendConditionType
51 /** Tests that a value is equal to a state variable value. */
53 /** Tests that a value is unequal to a state variable value. */
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. */
62 /** second UID of the process which set the condition*/
64 /** Integer state of corresponding P&S variable to be tested against*/
66 /** type of test to be performed */
67 TMsvSchSendConditionType iType;
72 Schedule Send condition must be satisfied before a message sending attempt.
78 class TMsvSysAgentConditionAction
81 IMPORT_C TMsvSysAgentConditionAction();
84 /** Condition to meet. */
85 TMsvCondition iCondition;
87 /** Error action to use. */
88 TMsvSendErrorAction iErrorAction;
90 /** Default error action. */
91 TBool iUseDefaultSysAgentAction;
99 Defines an array of schedule send conditions that must be satisfied before a message sending attempt.
101 @see TMsvSysAgentConditionAction
107 class CMsvSysAgentActions : public CArrayFixFlat<TMsvSysAgentConditionAction>
110 IMPORT_C CMsvSysAgentActions();
111 IMPORT_C ~CMsvSysAgentActions();
114 IMPORT_C TBool ConditionsMetL(TMsvSendErrorAction& aErrorAction);
116 /** Default send error action. */
117 TMsvSendErrorAction iDefault;
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;
128 #endif // __MSVSYSAGENTCONDACTION_H__