28 Pib::Pib(
const std::string scheme,
const std::string& location, shared_ptr<PibImpl> impl)
30 , m_location(location)
31 , m_hasDefaultIdentity(false)
32 , m_needRefreshIdentities(true)
50 m_impl->setTpmLocator(tpmLocator);
56 return m_impl->getTpmLocator();
60 Pib::addIdentity(
const Name& identity)
67 return Identity(identity,
m_impl,
true);
71 Pib::removeIdentity(
const Name& identity)
76 m_impl->removeIdentity(identity);
98 Pib::setDefaultIdentity(
const Name& identityName)
103 m_impl->setDefaultIdentity(identityName);
bool m_needRefreshIdentities
Copyright (c) 2013-2016 Regents of the University of California.
bool m_hasDefaultIdentity
Identity getIdentity(const Name &identityName) const
Get an identity with name identityName.
void setTpmLocator(const std::string &tpmLocator)
Set the corresponding TPM information to tpmLocator.
IdentityContainer m_identities
A handler to search or enumerate identities in PIB.
std::string getPibLocator() const
Get PIB Locator.
const Name & getName() const
Get the name of the identity.
Identity m_defaultIdentity
const IdentityContainer & getIdentities() const
Get all the identities.
Identity & getDefaultIdentity() const
Get the default identity.
const_iterator find(const Name &keyId) const
shared_ptr< PibImpl > m_impl
Name abstraction to represent an absolute name.
const_iterator end() const
std::string getTpmLocator() const
Get TPM Locator.