src: Improving consistency and correcting code style

As of this commit, all data structures can be directly constructed from
wire format.

This commit excludes full correction of code style in security/ and
tools/ndnsec*, which will be part of a different commit.

Change-Id: I121ac1f81948bc7468990df52cdefeb2988d91a1
Refs: #1403
diff --git a/src/security/sec-public-info-sqlite3.hpp b/src/security/sec-public-info-sqlite3.hpp
index feb07a5..b89859a 100644
--- a/src/security/sec-public-info-sqlite3.hpp
+++ b/src/security/sec-public-info-sqlite3.hpp
@@ -15,32 +15,40 @@
 struct sqlite3;
 
 namespace ndn {
-  
+
 class SecPublicInfoSqlite3 : public SecPublicInfo {
 public:
-  struct Error : public SecPublicInfo::Error { Error(const std::string &what) : SecPublicInfo::Error(what) {} };
+  class Error : public SecPublicInfo::Error
+  {
+  public:
+    explicit
+    Error(const std::string& what)
+      : SecPublicInfo::Error(what)
+    {
+    }
+  };
 
   SecPublicInfoSqlite3();
-  
-  virtual 
+
+  virtual
   ~SecPublicInfoSqlite3();
 
   /**********************
    * from SecPublicInfo *
    **********************/
-  virtual bool 
+  virtual bool
   doesIdentityExist(const Name& identityName);
 
   virtual void
   addIdentity(const Name& identityName);
 
-  virtual bool 
+  virtual bool
   revokeIdentity();
 
-  virtual bool 
+  virtual bool
   doesPublicKeyExist(const Name& keyName);
 
-  virtual void 
+  virtual void
   addPublicKey(const Name& keyName, KeyType keyType, const PublicKey& publicKeyDer);
 
   virtual ptr_lib::shared_ptr<PublicKey>
@@ -49,57 +57,57 @@
   virtual bool
   doesCertificateExist(const Name& certificateName);
 
-  virtual void 
+  virtual void
   addCertificate(const IdentityCertificate& certificate);
 
-  virtual ptr_lib::shared_ptr<IdentityCertificate> 
-  getCertificate(const Name &certificateName);
+  virtual ptr_lib::shared_ptr<IdentityCertificate>
+  getCertificate(const Name& certificateName);
 
 
 
-  virtual Name 
+  virtual Name
   getDefaultIdentity();
 
-  virtual Name 
+  virtual Name
   getDefaultKeyNameForIdentity(const Name& identityName);
 
-  virtual Name 
+  virtual Name
   getDefaultCertificateNameForKey(const Name& keyName);
 
   virtual void
-  getAllIdentities(std::vector<Name> &nameList, bool isDefault);
+  getAllIdentities(std::vector<Name>& nameList, bool isDefault);
 
   virtual void
-  getAllKeyNames(std::vector<Name> &nameList, bool isDefault);
+  getAllKeyNames(std::vector<Name>& nameList, bool isDefault);
 
   virtual void
-  getAllKeyNamesOfIdentity(const Name& identity, std::vector<Name> &nameList, bool isDefault);
-    
-  virtual void
-  getAllCertificateNames(std::vector<Name> &nameList, bool isDefault);
+  getAllKeyNamesOfIdentity(const Name& identity, std::vector<Name>& nameList, bool isDefault);
 
   virtual void
-  getAllCertificateNamesOfKey(const Name& keyName, std::vector<Name> &nameList, bool isDefault);
-  
+  getAllCertificateNames(std::vector<Name>& nameList, bool isDefault);
+
+  virtual void
+  getAllCertificateNamesOfKey(const Name& keyName, std::vector<Name>& nameList, bool isDefault);
+
 protected:
-  virtual void 
+  virtual void
   setDefaultIdentityInternal(const Name& identityName);
 
   virtual void
   setDefaultKeyNameForIdentityInternal(const Name& keyName);
 
-  virtual void 
-  setDefaultCertificateNameForKeyInternal(const Name& certificateName);  
+  virtual void
+  setDefaultCertificateNameForKeyInternal(const Name& certificateName);
 
   virtual void
-  deleteCertificateInfo(const Name &certificateName);
+  deleteCertificateInfo(const Name& certificateName);
 
   virtual void
-  deletePublicKeyInfo(const Name &keyName);
+  deletePublicKeyInfo(const Name& keyName);
 
   virtual void
-  deleteIdentityInfo(const Name &identity);
-  
+  deleteIdentityInfo(const Name& identity);
+
 private:
   sqlite3 * m_database;
 };