MibTableVoter Class Reference

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>

Inheritance diagram for MibTableVoter:

MibTable MibTableSizePolicy SimMibTable StorageTable TimeStampTable VacmContextTable snmpNotifyEntry snmpNotifyFilterEntry snmpNotifyFilterProfileEntry snmpProxyEntry snmpTargetAddrEntry snmpTargetParamsEntry VacmAccessTable VacmSecurityToGroupTable VacmViewTreeFamilyTable sysOREntry

List of all members.

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.


Detailed Description

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.

Author:
Frank Fock
Version:
3.5

Constructor & Destructor Documentation

MibTableVoter::MibTableVoter (  )  [inline]

virtual MibTableVoter::~MibTableVoter (  )  [inline, virtual]


Member Function Documentation

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.

Parameters:
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.
Returns:
a SNMP error status or SNMP_ERROR_SUCCESS if the transition is acknowledged by the voter.

Reimplemented in MibTableSizePolicy.


The documentation for this class was generated from the following file:

Generated on Fri May 29 22:36:55 2009 for AGENT++ by  doxygen 1.5.6