docs: API documentation fixes
Change-Id: I1088a156c9ac055f974900454647dcb9a7b7ec54
Refs: #3210
diff --git a/src/security/identity.hpp b/src/security/identity.hpp
index d77428d..0ac8201 100644
--- a/src/security/identity.hpp
+++ b/src/security/identity.hpp
@@ -74,7 +74,7 @@
getName() const;
/**
- * @brief Get a key with id @keyId.
+ * @brief Get a key with id @p keyId.
*
* @param keyId The id of the key to get.
* @throw Pib::Error if the key does not exist.
diff --git a/src/security/pib-impl.hpp b/src/security/pib-impl.hpp
index 080dc48..90e7dfc 100644
--- a/src/security/pib-impl.hpp
+++ b/src/security/pib-impl.hpp
@@ -274,7 +274,7 @@
getCertificatesOfKey(const Name& identity, const name::Component& keyId) const = 0;
/**
- * @brief Set a cert with name @p certName as the default of a key with id @keyId of @identity.
+ * @brief Set a cert with name @p certName as the default of a key with id @p keyId of @p identity.
*
* @param identity The name of the belonging identity.
* @param keyId The key id.
@@ -286,7 +286,7 @@
const Name& certName) = 0;
/**
- * @brief Get the default certificate of a key with id @keyId of @identity.
+ * @brief Get the default certificate of a key with id @p keyId of @p identity.
*
* @param identity The name of the belonging identity.
* @param keyId The key id.
diff --git a/src/security/pib-sqlite3.hpp b/src/security/pib-sqlite3.hpp
index a9fabe9..c63fb37 100644
--- a/src/security/pib-sqlite3.hpp
+++ b/src/security/pib-sqlite3.hpp
@@ -60,239 +60,76 @@
public: // TpmLocator management
- /**
- * @brief Set the corresponding TPM information to @p tpmLocator.
- *
- * If the provided @p tpmLocator is different from the existing one, the
- * content in PIB will be cleaned up, otherwise nothing will be changed.
- *
- * @param tpmLocator The name for the new TPM locator
- */
virtual void
setTpmLocator(const std::string& tpmLocator) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get TPM Locator
- */
virtual std::string
getTpmLocator() const NDN_CXX_DECL_FINAL;
public: // Identity management
- /**
- * @brief Check the existence of an identity.
- *
- * @param identity The name of the identity.
- * @return true if the identity exists, otherwise false.
- */
virtual bool
hasIdentity(const Name& identity) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Add an identity.
- *
- * If the identity already exists, do nothing.
- * If no default identity has been set, set the added one as default identity.
- *
- * @param identity The name of the identity to add.
- */
virtual void
addIdentity(const Name& identity) NDN_CXX_DECL_FINAL;
- /**
- * @brief Remove an identity
- *
- * If the identity does not exist, do nothing.
- * Remove related keys and certificates as well.
- *
- * @param identity The name of the identity to remove.
- */
virtual void
removeIdentity(const Name& identity) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get the name of all the identities
- */
virtual std::set<Name>
getIdentities() const NDN_CXX_DECL_FINAL;
- /**
- * @brief Set an identity with name @p identityName as the default identity.
- *
- * Since adding an identity only requires the identity name, create the
- * identity if it does not exist.
- *
- * @param identityName The name for the default identity.
- */
virtual void
setDefaultIdentity(const Name& identityName) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get the default identity.
- *
- * @return The name for the default identity.
- * @throws Pib::Error if no default identity.
- */
virtual Name
getDefaultIdentity() const NDN_CXX_DECL_FINAL;
public: // Key management
- /**
- * @brief Check the existence of a key.
- *
- * @param identity The name of the belonged identity.
- * @param keyId The key id component.
- * @return true if the key exists, otherwise false. Return false if the identity does not exist
- */
virtual bool
hasKey(const Name& identity, const name::Component& keyId) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Add a key.
- *
- * If the key already exists, do nothing.
- * If the identity does not exist, add the identity as well.
- * If no default key of the identity has been set, set the added one as default
- * key of the identity.
- *
- * @param identity The name of the belonged identity.
- * @param keyId The key id component.
- * @param publicKey The public key bits.
- */
virtual void
addKey(const Name& identity, const name::Component& keyId, const PublicKey& publicKey) NDN_CXX_DECL_FINAL;
- /**
- * @brief Remove a key.
- *
- * If the key does not exist, do nothing.
- * Remove related certificates as well.
- *
- * @param identity The name of the belonged identity.
- * @param keyId The key id component.
- */
virtual void
removeKey(const Name& identity, const name::Component& keyId) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get the key bits of a key.
- *
- * @param identity The name of the belonged identity.
- * @param keyId The key id component.
- * @return key bits
- * @throws Pib::Error if the key does not exist.
- */
virtual PublicKey
getKeyBits(const Name& identity, const name::Component& keyId) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Get all the key ids of an identity with name @p identity
- *
- * The returned key ids can be used to create a KeyContainer.
- * With key id, identity name, backend implementation, one can create a Key frontend instance.
- *
- * @return the key id name component set. If the identity does not exist, return an empty set.
- */
virtual std::set<name::Component>
getKeysOfIdentity(const Name& identity) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Set an key with id @p keyId as the default key of an identity with name @p identity.
- *
- * @param identity The name of the belonged identity.
- * @param keyId The key id component.
- * @throws Pib::Error if the key does not exist.
- */
virtual void
setDefaultKeyOfIdentity(const Name& identity, const name::Component& keyId) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get the id of the default key of an identity with name @p identity.
- *
- * @param identity The name of the belonged identity.
- * @throws Pib::Error if no default key or the identity does not exist.
- */
virtual name::Component
getDefaultKeyOfIdentity(const Name& identity) const NDN_CXX_DECL_FINAL;
public: // Certificate Management
- /**
- * @brief Check the existence of a certificate with name @p certName.
- *
- * @param certName The name of the certificate.
- * @return true if the certificate exists, otherwise false.
- */
virtual bool
hasCertificate(const Name& certName) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Add a certificate.
- *
- * If the certificate already exists, do nothing.
- * If the key or identity do not exist, add them as well.
- * If no default certificate of the key has been set, set the added one as
- * default certificate of the key.
- *
- * @param certificate The certificate to add.
- */
virtual void
addCertificate(const IdentityCertificate& certificate) NDN_CXX_DECL_FINAL;
- /**
- * @brief Remove a certificate with name @p certName.
- *
- * If the certificate does not exist, do nothing.
- *
- * @param certName The name of the certificate.
- */
virtual void
removeCertificate(const Name& certName) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get a certificate with name @p certName.
- *
- * @param certName The name of the certificate.
- * @return the certificate.
- * @throws Pib::Error if the certificate does not exist.
- */
virtual IdentityCertificate
getCertificate(const Name& certName) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Get a list of certificate names of a key with id @p keyId of @p identity.
- *
- * The returned certificate names can be used to create a CertificateContainer.
- * With certificate name and backend implementation, one can obtain the certificate directly.
- *
- * @param identity The name of the belonging identity.
- * @param keyId The key id.
- * @return The certificate name set. If the key does not exist, return an empty set.
- */
virtual std::set<Name>
getCertificatesOfKey(const Name& identity, const name::Component& keyId) const NDN_CXX_DECL_FINAL;
- /**
- * @brief Set a cert with name @p certName as the default of a key with id @keyId of @identity.
- *
- * @param identity The name of the belonging identity.
- * @param keyId The key id.
- * @param certName The name of the certificate.
- * @throws Pib::Error if the certificate with name @p certName does not exist.
- */
virtual void
setDefaultCertificateOfKey(const Name& identity, const name::Component& keyId,
const Name& certName) NDN_CXX_DECL_FINAL;
- /**
- * @brief Get the default certificate of a key with id @keyId of @identity.
- *
- * @param identity The name of the belonging identity.
- * @param keyId The key id.
- * @return a pointer to the certificate, null if no default certificate for the key.
- * @throws Pib::Error if the default certificate does not exist.
- */
virtual IdentityCertificate
getDefaultCertificateOfKey(const Name& identity, const name::Component& keyId) const NDN_CXX_DECL_FINAL;