#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. |
Each MibTable instance implements this interface in order to allow the user voting for row status changes directly by subclassing.
MibTableVoter::MibTableVoter | ( | ) | [inline] |
virtual MibTableVoter::~MibTableVoter | ( | ) | [inline, virtual] |
virtual int MibTableVoter::is_transition_ok | ( | MibTable * | , | |
MibTableRow * | , | |||
const Oidx & | , | |||
int | , | |||
int | ||||
) | [inline, virtual] |
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:
Requested transition | Posible return values ------------------------------------------------------- rowEmpty -> rowDestroy | SNMP_ERROR_INCONSIST_NAME ------------------------------------------------------- rowEmpty -> notReady | SNMP_ERROR_RESOURCE_UNAVAIL | SNMP_ERROR_INCONSIST_VAL | SNMP_ERROR_NO_CREATION | SNMP_ERROR_INCONSIST_NAME ------------------------------------------------------- rowNotInService/ | SNMP_ERROR_RESOURCE_UNAVAIL rowNotReady -> | SNMP_ERROR_INCONSIST_VAL rowActive | ------------------------------------------------------- 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.