All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Public Member Functions | List of all members
ndn::InterestValidationState Class Reference

The InterestValidationState class extends ValidationState to hold the validation state for an Interest packet. More...

#include <validation-state.hpp>

Inheritance diagram for ndn::InterestValidationState:
ndn::ValidationState

Public Member Functions

 InterestValidationState (const Interest &interest, const InterestValidationSuccessCallback &successCallback, const InterestValidationFailureCallback &failureCallback)
 Create an InterestValidationState for the Data packet. More...
 
virtual void fail (const ValidationError &error)
 Call the failure callback.
 
const InterestgetOriginalInterest () const
 Get the original Interest packet being validated which was given to the constructor. More...
 
void addSuccessCallback (const InterestValidationSuccessCallback &successCallback)
 
- Public Member Functions inherited from ndn::ValidationState
bool hasOutcome ()
 Check if validation failed or success has been called. More...
 
bool isOutcomeFailed ()
 Check if validation failed has been called. More...
 
bool isOutcomeSuccess ()
 Check if validation success has been called. More...
 
size_t getDepth () const
 Get the depth of the certificate chain. More...
 
bool hasSeenCertificateName (const Name &certificateName)
 Check if certificateName has been previously seen, and record the supplied name. More...
 
void addCertificate (const CertificateV2 &certificate)
 Add the certificate to the top of the certificate chain. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ndn::ValidationState
void setOutcome (bool outcome)
 Set the outcome to the given value, and set hasOutcome_ true. More...
 

Detailed Description

The InterestValidationState class extends ValidationState to hold the validation state for an Interest packet.

Constructor & Destructor Documentation

ndn::InterestValidationState::InterestValidationState ( const Interest interest,
const InterestValidationSuccessCallback successCallback,
const InterestValidationFailureCallback failureCallback 
)

Create an InterestValidationState for the Data packet.

The caller must ensure that the state instance is valid until the validation finishes (i.e., until validateCertificateChain() and validateOriginalPacket() have been called).

Parameters
interestThe Interest packet being validated, which is copied.
successCallbackThis calls successCallback(interest) to report a successful Interest validation.
failureCallbackThis calls failureCallback(interest, error) to report a failed Interest validation, where error is a ValidationError.

Member Function Documentation

const Interest& ndn::InterestValidationState::getOriginalInterest ( ) const
inline

Get the original Interest packet being validated which was given to the constructor.

Returns
The original Interest packet.

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