[core] Use better types for modified / expires / etag

This commit is contained in:
John Firebaugh
2016-01-19 15:57:17 -08:00
parent c33ed50c98
commit 1c21d0fd4c
33 changed files with 231 additions and 169 deletions

View File

@@ -2,6 +2,7 @@
#define MBGL_STORAGE_RESPONSE
#include <mbgl/util/chrono.hpp>
#include <mbgl/util/optional.hpp>
#include <string>
#include <memory>
@@ -25,9 +26,9 @@ public:
// The actual data of the response. This is guaranteed to never be empty.
std::shared_ptr<const std::string> data;
Seconds modified = Seconds::zero();
Seconds expires = Seconds::zero();
std::string etag;
optional<SystemTimePoint> modified;
optional<SystemTimePoint> expires;
optional<std::string> etag;
};
class Response::Error {