Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ | |
| 6 #define COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace cryptauth { | |
| 11 | |
| 12 // Stores EID-related data and timestamps at which time this data becomes | |
| 13 // active or inactive. | |
| 14 struct DataWithTimestamp { | |
| 15 DataWithTimestamp(const std::string& data, | |
| 16 const int64_t start_timestamp_ms, | |
| 17 const int64_t end_timestamp_ms); | |
| 18 DataWithTimestamp(const DataWithTimestamp& other); | |
| 19 | |
| 20 bool ContainsTime(const int64_t timestamp_ms) const; | |
| 21 std::string DataInHex() const; | |
| 22 | |
| 23 bool operator==(const DataWithTimestamp& other) const; | |
| 24 | |
| 25 const std::string data; | |
| 26 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.
| |
| 27 const int64_t end_timestamp_ms; | |
| 28 }; | |
| 29 | |
| 30 } // namespace | |
| 31 | |
| 32 #endif // COMPONENTS_CRYPTAUTH_BLE_DATA_WITH_TIMESTAMP_H_ | |
| OLD | NEW |