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

The DataValidationState class extends ValidationState to hold the validation state for a Data packet. More...

#include <validation-state.hpp>

Inheritance diagram for ndn::DataValidationState:
ndn::ValidationState

Public Member Functions

 DataValidationState (const Data &data, const DataValidationSuccessCallback &successCallback, const DataValidationFailureCallback &failureCallback)
 Create a DataValidationState for the Data packet. More...
 
virtual void fail (const ValidationError &error)
 Call the failure callback.
 
const DatagetOriginalData () const
 Get the original Data packet being validated which was given to the constructor. More...
 
- 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 DataValidationState class extends ValidationState to hold the validation state for a Data packet.

Constructor & Destructor Documentation

ndn::DataValidationState::DataValidationState ( const Data data,
const DataValidationSuccessCallback successCallback,
const DataValidationFailureCallback failureCallback 
)

Create a DataValidationState 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
dataThe Data packet being validated, which is copied.

Member Function Documentation

const Data& ndn::DataValidationState::getOriginalData ( ) const
inline

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

Returns
The original Data packet.

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