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

A PibCertificateContainer is used to search/enumerate the certificates of a key. More...

#include <pib-certificate-container.hpp>

Public Member Functions

size_t size () const
 Get the number of certificates in the container. More...
 
void add (const CertificateV2 &certificate)
 Add certificate into the container. More...
 
void remove (const Name &certificateName)
 Remove the certificate with name certificateName from the container. More...
 
ptr_lib::shared_ptr
< CertificateV2
get (const Name &certificateName)
 Get the certificate with certificateName from the container. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 

Friends

class PibKeyImpl
 

Detailed Description

A PibCertificateContainer is used to search/enumerate the certificates of a key.

(A PibCertificateContainer object can only be created by PibKey.)

Member Function Documentation

void ndn::PibCertificateContainer::add ( const CertificateV2 certificate)

Add certificate into the container.

If the certificate already exists, this replaces it.

Parameters
certificateThe certificate to add. This copies the object.
Exceptions
std::invalid_argumentif the name of the certificate does not match the key name.
ptr_lib::shared_ptr< CertificateV2 > ndn::PibCertificateContainer::get ( const Name certificateName)

Get the certificate with certificateName from the container.

Parameters
certificateNameThe name of the certificate.
Returns
A copy of the certificate.
Exceptions
std::invalid_argumentif certificateName does not match the key name
Pib::Errorif the certificate does not exist.
bool ndn::PibCertificateContainer::isConsistent ( ) const

Check if the container is consistent with the backend storage.

Returns
True if the container is consistent, false otherwise.
Note
This method is heavy-weight and should be used in a debugging mode only.
void ndn::PibCertificateContainer::remove ( const Name certificateName)

Remove the certificate with name certificateName from the container.

If the certificate does not exist, do nothing.

Parameters
certificateNameThe name of the certificate.
Exceptions
std::invalid_argumentif certificateName does not match the key name.
size_t ndn::PibCertificateContainer::size ( ) const
inline

Get the number of certificates in the container.

Returns
The number of certificates.

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