Update style to (almost) conform to ndn-cxx style using clang-format
diff --git a/src/file-state.hpp b/src/file-state.hpp
index 1eff885..e074794 100644
--- a/src/file-state.hpp
+++ b/src/file-state.hpp
@@ -27,35 +27,35 @@
#include "file-item.pb.hpp"
#include "hash-helper.hpp"
-#include <boost/tuple/tuple.hpp>
#include <boost/exception/all.hpp>
+#include <boost/tuple/tuple.hpp>
#include <list>
typedef std::list<FileItem> FileItems;
-typedef boost::shared_ptr<FileItem> FileItemPtr;
+typedef boost::shared_ptr<FileItem> FileItemPtr;
typedef boost::shared_ptr<FileItems> FileItemsPtr;
class FileState : public DbHelper
{
public:
- FileState (const boost::filesystem::path &path, bool cow = false);
- ~FileState ();
+ FileState(const boost::filesystem::path& path);
+ ~FileState();
/**
* @brief Update or add a file
*/
void
- UpdateFile (const std::string &filename, sqlite3_int64 version,
- const Hash &hash, const Ndnx::NdnxCharbuf &device_name, sqlite3_int64 seqno,
- time_t atime, time_t mtime, time_t ctime, int mode, int seg_num);
+ UpdateFile(const std::string& filename, sqlite3_int64 version, const Hash& hash,
+ const Ccnx::CcnxCharbuf& device_name, sqlite3_int64 seqno, time_t atime, time_t mtime,
+ time_t ctime, int mode, int seg_num);
/**
* @brief Delete file
*/
void
- DeleteFile (const std::string &filename);
+ DeleteFile(const std::string& filename);
/**
* @brief Set "complete" flag
@@ -63,49 +63,53 @@
* The call will do nothing if FileState does not have a record for the file (e.g., file got subsequently deleted)
*/
void
- SetFileComplete (const std::string &filename);
+ SetFileComplete(const std::string& filename);
/**
* @brief Lookup file state using file name
*/
FileItemPtr
- LookupFile (const std::string &filename) ;
+ LookupFile(const std::string& filename);
/**
* @brief Lookup file state using content hash (multiple items may be returned)
*/
FileItemsPtr
- LookupFilesForHash (const Hash &hash);
+ LookupFilesForHash(const Hash& hash);
/**
* @brief Lookup all files in the specified folder and call visitor(file) for each file
*/
void
- LookupFilesInFolder (const boost::function<void (const FileItem&)> &visitor, const std::string &folder, int offset=0, int limit=-1);
+ LookupFilesInFolder(const boost::function<void(const FileItem&)>& visitor,
+ const std::string& folder, int offset = 0, int limit = -1);
/**
* @brief Lookup all files in the specified folder (wrapper around the overloaded version)
*/
FileItemsPtr
- LookupFilesInFolder (const std::string &folder, int offset=0, int limit=-1);
+ LookupFilesInFolder(const std::string& folder, int offset = 0, int limit = -1);
/**
* @brief Recursively lookup all files in the specified folder and call visitor(file) for each file
*/
bool
- LookupFilesInFolderRecursively (const boost::function<void (const FileItem&)> &visitor, const std::string &folder, int offset=0, int limit=-1);
+ LookupFilesInFolderRecursively(const boost::function<void(const FileItem&)>& visitor,
+ const std::string& folder, int offset = 0, int limit = -1);
/**
* @brief Recursively lookup all files in the specified folder (wrapper around the overloaded version)
*/
FileItemsPtr
- LookupFilesInFolderRecursively (const std::string &folder, int offset=0, int limit=-1);
+ LookupFilesInFolderRecursively(const std::string& folder, int offset = 0, int limit = -1);
};
typedef boost::shared_ptr<FileState> FileStatePtr;
namespace Error {
-struct FileState : virtual boost::exception, virtual std::exception { };
+struct FileState : virtual boost::exception, virtual std::exception
+{
+};
}