| 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_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | |
| 6 #define COMPONENTS_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 | |
| 10 namespace cast_channel { | |
| 11 | |
| 12 class AuthContext; | |
| 13 class CastMessage; | |
| 14 class DeviceAuthMessage; | |
| 15 | |
| 16 // Checks if the contents of |message_proto| are valid. | |
| 17 bool IsCastMessageValid(const CastMessage& message_proto); | |
| 18 | |
| 19 // Returns a human readable string for |message_proto|. | |
| 20 std::string CastMessageToString(const CastMessage& message_proto); | |
| 21 | |
| 22 // Returns a human readable string for |message|. | |
| 23 std::string AuthMessageToString(const DeviceAuthMessage& message); | |
| 24 | |
| 25 // Fills |message_proto| appropriately for an auth challenge request message. | |
| 26 // Uses the nonce challenge in |auth_context|. | |
| 27 void CreateAuthChallengeMessage(CastMessage* message_proto, | |
| 28 const AuthContext& auth_context); | |
| 29 | |
| 30 // Returns whether the given message is an auth handshake message. | |
| 31 bool IsAuthMessage(const CastMessage& message); | |
| 32 | |
| 33 } // namespace cast_channel | |
| 34 | |
| 35 #endif // COMPONENTS_CAST_CHANNEL_CAST_MESSAGE_UTIL_H_ | |
| OLD | NEW |