replace boost filesystem with std filesystem; upgrade gtest and find it using cmake.

This commit is contained in:
Chunting Gu
2020-02-15 12:04:51 +08:00
parent 7e3da65e73
commit 7e7ab1c1e8
72 changed files with 233 additions and 31551 deletions
+4 -5
View File
@@ -1,6 +1,7 @@
#ifndef BOOK_CLIENT_H_
#define BOOK_CLIENT_H_
#include <filesystem>
#include <list>
#include <string>
@@ -11,8 +12,6 @@
#include "book.h"
namespace bfs = boost::filesystem;
class BookClient {
public:
explicit BookClient(const std::string& url, int timeout = 0);
@@ -30,13 +29,13 @@ public:
bool Delete(const std::string& id);
// Get photo, save to the given path.
bool GetPhoto(const std::string& id, const bfs::path& path);
bool GetPhoto(const std::string& id, const std::filesystem::path& path);
// Set photo using the file of the given path.
bool SetPhoto(const std::string& id, const bfs::path& path);
bool SetPhoto(const std::string& id, const std::filesystem::path& path);
private:
bool CheckPhoto(const bfs::path& photo);
bool CheckPhoto(const std::filesystem::path& photo);
// Check HTTP response status.
bool CheckStatus(webcc::ResponsePtr response, int expected_status);