23 #include "detail/identity-impl.hpp" 39 return lock()->getName();
43 Identity::addKey(
const uint8_t* key,
size_t keyLen,
const Name& keyName)
const 45 return lock()->addKey(key, keyLen, keyName);
49 Identity::removeKey(
const Name& keyName)
const 51 return lock()->removeKey(keyName);
57 return lock()->getKey(keyName);
63 return lock()->getKeys();
67 Identity::setDefaultKey(
const Name& keyName)
const 69 return lock()->setDefaultKey(keyName);
73 Identity::setDefaultKey(
const uint8_t* key,
size_t keyLen,
const Name& keyName)
const 75 return lock()->setDefaultKey(key, keyLen, keyName);
81 return lock()->getDefaultKey();
84 Identity::operator bool()
const 86 return !m_impl.expired();
89 shared_ptr<detail::IdentityImpl>
90 Identity::lock()
const 92 auto impl = m_impl.lock();
95 BOOST_THROW_EXCEPTION(std::domain_error(
"Invalid Identity instance"));
103 return lhs.m_impl.owner_before(rhs.m_impl) || rhs.m_impl.owner_before(lhs.m_impl);
std::ostream & operator<<(std::ostream &os, const Identity &id)
Copyright (c) 2013-2017 Regents of the University of California.
const Key & getDefaultKey() const
Get the default key for this Identity.
Identity()
Default Constructor.
friend bool operator!=(const Identity &, const Identity &)
Container of keys of an identity.
const KeyContainer & getKeys() const
Get all keys for this identity.
A frontend handle of a key instance.
Represents an absolute name.
Key getKey(const Name &keyName) const
Get a key with id keyName.
const Name & getName() const
Get the name of the identity.
A frontend handle of an Identity.