Chromium Code Reviews| Index: components/cryptauth/data_with_timestamp.h |
| diff --git a/components/cryptauth/data_with_timestamp.h b/components/cryptauth/data_with_timestamp.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..5ff6cafc9c07db7cbdf8bb3a0f14d61a8aa4274c |
| --- /dev/null |
| +++ b/components/cryptauth/data_with_timestamp.h |
| @@ -0,0 +1,32 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ |
| +#define COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ |
| + |
| +#include <string> |
| + |
| +namespace cryptauth { |
| + |
| +// Stores EID-related data and timestamps at which time this data becomes |
| +// active or inactive. |
| +struct DataWithTimestamp { |
| + DataWithTimestamp(const std::string& data, |
| + const int64_t start_timestamp_ms, |
| + const int64_t end_timestamp_ms); |
| + DataWithTimestamp(const DataWithTimestamp& other); |
| + |
| + bool ContainsTime(const int64_t timestamp_ms) const; |
| + std::string DataInHex() const; |
| + |
| + bool operator==(const DataWithTimestamp& other) const; |
| + |
| + const std::string data; |
| + const int64_t start_timestamp_ms; |
|
Kyle Horimoto
2017/04/30 03:17:44
nit: Can you add a comment saying that start is in
Tim Song
2017/05/01 22:23:38
Done.
|
| + const int64_t end_timestamp_ms; |
| +}; |
| + |
| +} // namespace |
| + |
| +#endif // COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ |