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

A PibIdentityContainer is used to search/enumerate the identities in a PIB. More...

#include <pib-identity-container.hpp>

Public Member Functions

size_t size () const
 Get the number of identities in the container. More...
 
ptr_lib::shared_ptr< PibIdentityadd (const Name &identityName)
 Add an identity with name identityName into the container. More...
 
void remove (const Name &identityName)
 Remove the identity with name identityName from the container, and its related keys and certificates. More...
 
ptr_lib::shared_ptr< PibIdentityget (const Name &identityName)
 Get the identity with name identityName from the container. More...
 
void reset ()
 Reset the state of the container. More...
 
bool isConsistent () const
 Check if the container is consistent with the backend storage. More...
 

Friends

class Pib
 

Detailed Description

A PibIdentityContainer is used to search/enumerate the identities in a PIB.

(A PibIdentityContainer object can only be created by the Pib class.)

Member Function Documentation

ptr_lib::shared_ptr< PibIdentity > ndn::PibIdentityContainer::add ( const Name identityName)

Add an identity with name identityName into the container.

Create the identity if it does not exist.

Parameters
identityNameThe name of the identity, which is copied.
Returns
The PibIdentity object.
ptr_lib::shared_ptr< PibIdentity > ndn::PibIdentityContainer::get ( const Name identityName)

Get the identity with name identityName from the container.

Parameters
identityNameThe name of the identity.
Returns
The PibIdentity object.
Exceptions
Pib::Errorif the identity does not exist.
bool ndn::PibIdentityContainer::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::PibIdentityContainer::remove ( const Name identityName)

Remove the identity with name identityName from the container, and its related keys and certificates.

If the default identity is being removed, no default identity will be selected. If the identity does not exist, do nothing.

Parameters
identityNameThe name of the identity.
void ndn::PibIdentityContainer::reset ( )

Reset the state of the container.

This method removes all loaded identities and retrieves identity names from the PIB implementation.

size_t ndn::PibIdentityContainer::size ( ) const
inline

Get the number of identities in the container.

Returns
The number of identities.

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