AGENT++
4.0.3
|
The MibTableVoter class defines an interface for objects that want to be ask before a status transition of a MibTableRow is performed by a MibTable instance. More...
#include <mib.h>
Public Member Functions | |
MibTableVoter () | |
virtual | ~MibTableVoter () |
virtual int | is_transition_ok (MibTable *, MibTableRow *, const Oidx &, int, int) |
Check whether a transition from an old to a new RowStatus value is allowed. | |
The MibTableVoter class defines an interface for objects that want to be ask before a status transition of a MibTableRow is performed by a MibTable instance.
Each MibTable instance implements this interface in order to allow the user voting for row status changes directly by subclassing.
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Check whether a transition from an old to a new RowStatus value is allowed.
Possible return values that will abort a transition are shown by the following table:
rowEmpty -> notReady | SNMP_ERROR_RESOURCE_UNAVAIL | SNMP_ERROR_INCONSIST_VAL | SNMP_ERROR_NO_CREATION
rowNotInService/ | SNMP_ERROR_RESOURCE_UNAVAIL rowNotReady -> | SNMP_ERROR_INCONSIST_VAL
rowActive -> notInService | SNMP_ERROR_INCONSIST_VAL rowDestroy |
By returning SNMP_ERROR_SUCCESS the MibTableVoter instance votes for the transition to be performed.
table | a pointer to a MibTable instance firing the event. The parameter 'table' can be 0 if the local table is source and target of the event. |
row | a pointer to the MibTableRow instance whose status is to be changed. |
index | the index of the row that is changed. |
currentStatus | the current status of the row. |
requestedStatus | the requested new status of the row. |
Reimplemented in MibTableSizePolicy.