identity-storage: copying ndn.cxx extensions to get information about the stored data
Change-Id: Id272a4985a6caa3ddfdc177ebf1b318b351279f8
diff --git a/include/ndn-cpp/security/identity/basic-identity-storage.hpp b/include/ndn-cpp/security/identity/basic-identity-storage.hpp
index 476df56..4954f01 100644
--- a/include/ndn-cpp/security/identity/basic-identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/basic-identity-storage.hpp
@@ -178,6 +178,22 @@
virtual void
setDefaultCertificateNameForKey(const Name& keyName, const Name& certificateName);
+
+ virtual std::vector<Name>
+ getAllIdentities(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllKeyNames(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllKeyNamesOfIdentity(const Name& identity, bool isDefault);
+
+ virtual std::vector<Name>
+ getAllCertificateNames(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllCertificateNamesOfKey(const Name& keyName, bool isDefault);
+
private:
virtual void
diff --git a/include/ndn-cpp/security/identity/identity-storage.hpp b/include/ndn-cpp/security/identity/identity-storage.hpp
index d54bc10..3c298c8 100644
--- a/include/ndn-cpp/security/identity/identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/identity-storage.hpp
@@ -184,6 +184,23 @@
*/
virtual void
setDefaultCertificateNameForKey(const Name& keyName, const Name& certificateName) = 0;
+
+
+ virtual std::vector<Name>
+ getAllIdentities(bool isDefault) = 0;
+
+ virtual std::vector<Name>
+ getAllKeyNames(bool isDefault) = 0;
+
+ virtual std::vector<Name>
+ getAllKeyNamesOfIdentity(const Name& identity, bool isDefault) = 0;
+
+ virtual std::vector<Name>
+ getAllCertificateNames(bool isDefault) = 0;
+
+ virtual std::vector<Name>
+ getAllCertificateNamesOfKey(const Name& keyName, bool isDefault) = 0;
+
};
}
diff --git a/include/ndn-cpp/security/identity/memory-identity-storage.hpp b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
index 60837ff..5027a73 100644
--- a/include/ndn-cpp/security/identity/memory-identity-storage.hpp
+++ b/include/ndn-cpp/security/identity/memory-identity-storage.hpp
@@ -163,6 +163,21 @@
*/
virtual void
setDefaultCertificateNameForKey(const Name& keyName, const Name& certificateName);
+
+ virtual std::vector<Name>
+ getAllIdentities(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllKeyNames(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllKeyNamesOfIdentity(const Name& identity, bool isDefault);
+
+ virtual std::vector<Name>
+ getAllCertificateNames(bool isDefault);
+
+ virtual std::vector<Name>
+ getAllCertificateNamesOfKey(const Name& keyName, bool isDefault);
private:
class KeyRecord {