nfd::fw::AdmitAllUnsolicitedDataPolicy Class Referencefinal

Admits all unsolicited Data. More...

#include <daemon/fw/unsolicited-data-policy.hpp>

+ Inheritance diagram for nfd::fw::AdmitAllUnsolicitedDataPolicy:
+ Collaboration diagram for nfd::fw::AdmitAllUnsolicitedDataPolicy:

Public Member Functions

UnsolicitedDataDecision decide (const Face &inFace, const Data &data) const final
 

Static Public Member Functions

static unique_ptr< UnsolicitedDataPolicycreate (const std::string &policyName)
 
static std::set< std::string > getPolicyNames ()
 
template<typename P >
static void registerPolicy (std::string_view policyName=P::POLICY_NAME)
 

Static Public Attributes

static constexpr std::string_view POLICY_NAME {"admit-all"}
 

Detailed Description

Admits all unsolicited Data.

Definition at line 135 of file unsolicited-data-policy.hpp.

Member Function Documentation

◆ create()

unique_ptr< UnsolicitedDataPolicy > nfd::fw::UnsolicitedDataPolicy::create ( const std::string &  policyName)
staticinherited
Returns
an UnsolicitedDataPolicy identified by policyName, or nullptr if policyName is unknown

Definition at line 53 of file unsolicited-data-policy.cpp.

◆ decide()

UnsolicitedDataDecision nfd::fw::AdmitAllUnsolicitedDataPolicy::decide ( const Face inFace,
const Data &  data 
) const
finalvirtual

Implements nfd::fw::UnsolicitedDataPolicy.

Definition at line 102 of file unsolicited-data-policy.cpp.

◆ getPolicyNames()

std::set< std::string > nfd::fw::UnsolicitedDataPolicy::getPolicyNames ( )
staticinherited
Returns
a list of available policy names

Definition at line 61 of file unsolicited-data-policy.cpp.

◆ registerPolicy()

template<typename P >
static void nfd::fw::UnsolicitedDataPolicy::registerPolicy ( std::string_view  policyName = P::POLICY_NAME)
inlinestaticinherited

Definition at line 67 of file unsolicited-data-policy.hpp.

Member Data Documentation

◆ POLICY_NAME

constexpr std::string_view nfd::fw::AdmitAllUnsolicitedDataPolicy::POLICY_NAME {"admit-all"}
staticconstexpr

Definition at line 142 of file unsolicited-data-policy.hpp.