| OLD | NEW |
| (Empty) |
| 1 // Copyright 2014 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_COPRESENCE_TOKENS_H_ | |
| 6 #define COMPONENTS_COPRESENCE_TOKENS_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 #include "base/time/time.h" | |
| 11 #include "components/copresence/proto/enums.pb.h" | |
| 12 | |
| 13 namespace copresence { | |
| 14 | |
| 15 struct AudioToken final { | |
| 16 AudioToken(const std::string& token, bool audible) | |
| 17 : token(token), | |
| 18 audible(audible) {} | |
| 19 | |
| 20 std::string token; | |
| 21 bool audible; | |
| 22 }; | |
| 23 | |
| 24 // It's an error to define these constructors inline, | |
| 25 // so they're defined in tokens.cc. | |
| 26 | |
| 27 struct TransmittedToken final { | |
| 28 TransmittedToken(); | |
| 29 | |
| 30 std::string id; | |
| 31 TokenMedium medium; | |
| 32 base::Time start_time; | |
| 33 base::Time stop_time; | |
| 34 bool broadcast_confirmed; | |
| 35 }; | |
| 36 | |
| 37 struct ReceivedToken final { | |
| 38 enum Validity { | |
| 39 UNKNOWN = 0, | |
| 40 VALID = 1, | |
| 41 INVALID = 2 | |
| 42 }; | |
| 43 | |
| 44 ReceivedToken(); | |
| 45 ReceivedToken(const std::string& id, | |
| 46 TokenMedium medium, | |
| 47 base::Time last_time); | |
| 48 | |
| 49 std::string id; | |
| 50 TokenMedium medium; | |
| 51 base::Time start_time; | |
| 52 base::Time last_time; | |
| 53 Validity valid; | |
| 54 }; | |
| 55 | |
| 56 } // namespace copresence | |
| 57 | |
| 58 #endif // COMPONENTS_COPRESENCE_TOKENS_H_ | |
| OLD | NEW |