#ifndef CAST_COMMON_CHANNEL_MESSAGE_UTIL_H_
#define CAST_COMMON_CHANNEL_MESSAGE_UTIL_H_
#include <string>
#include <string_view>
#include "cast/common/channel/proto/cast_channel.pb.h"
namespace Json {
class Value;
}
namespace openscreen::cast {
static constexpr char kCastInternalNamespacePrefix[] = …;
static constexpr char kTransportNamespacePrefix[] = …;
static constexpr char kAuthNamespace[] = …;
static constexpr char kHeartbeatNamespace[] = …;
static constexpr char kConnectionNamespace[] = …;
static constexpr char kReceiverNamespace[] = …;
static constexpr char kBroadcastNamespace[] = …;
static constexpr char kMediaNamespace[] = …;
static constexpr char kPlatformSenderId[] = …;
static constexpr char kPlatformReceiverId[] = …;
static constexpr char kBroadcastId[] = …;
static constexpr proto::CastMessage_ProtocolVersion
kDefaultOutgoingMessageVersion = …;
static constexpr char kMessageKeyType[] = …;
static constexpr char kMessageKeyProtocolVersion[] = …;
static constexpr char kMessageKeyProtocolVersionList[] = …;
static constexpr char kMessageKeyReasonCode[] = …;
static constexpr char kMessageKeyAppId[] = …;
static constexpr char kMessageKeyRequestId[] = …;
static constexpr char kMessageKeyResponseType[] = …;
static constexpr char kMessageKeyTransportId[] = …;
static constexpr char kMessageKeySessionId[] = …;
static constexpr char kMessageTypeConnect[] = …;
static constexpr char kMessageTypeClose[] = …;
static constexpr char kMessageTypeConnected[] = …;
static constexpr char kMessageValueAppAvailable[] = …;
static constexpr char kMessageValueAppUnavailable[] = …;
static constexpr char kMessageKeyBrowserVersion[] = …;
static constexpr char kMessageKeyConnType[] = …;
static constexpr char kMessageKeyConnectionType[] = …;
static constexpr char kMessageKeyUserAgent[] = …;
static constexpr char kMessageKeyOrigin[] = …;
static constexpr char kMessageKeyPlatform[] = …;
static constexpr char kMessageKeySdkType[] = …;
static constexpr char kMessageKeySenderInfo[] = …;
static constexpr char kMessageKeyVersion[] = …;
static constexpr char kMessageKeyAvailability[] = …;
static constexpr char kMessageKeyAppParams[] = …;
static constexpr char kMessageKeyApplications[] = …;
static constexpr char kMessageKeyControlType[] = …;
static constexpr char kMessageKeyDisplayName[] = …;
static constexpr char kMessageKeyIsIdleScreen[] = …;
static constexpr char kMessageKeyLaunchedFromCloud[] = …;
static constexpr char kMessageKeyLevel[] = …;
static constexpr char kMessageKeyMuted[] = …;
static constexpr char kMessageKeyName[] = …;
static constexpr char kMessageKeyNamespaces[] = …;
static constexpr char kMessageKeyReason[] = …;
static constexpr char kMessageKeyStatus[] = …;
static constexpr char kMessageKeyStepInterval[] = …;
static constexpr char kMessageKeyUniversalAppId[] = …;
static constexpr char kMessageKeyUserEq[] = …;
static constexpr char kMessageKeyVolume[] = …;
static constexpr char kMessageValueAttenuation[] = …;
static constexpr char kMessageValueBadParameter[] = …;
static constexpr char kMessageValueInvalidSessionId[] = …;
static constexpr char kMessageValueInvalidCommand[] = …;
static constexpr char kMessageValueNotFound[] = …;
static constexpr char kMessageValueSystemError[] = …;
enum class CastMessageType { … };
enum class AppAvailabilityResult { … };
std::string ToString(AppAvailabilityResult availability);
const char* CastMessageTypeToString(CastMessageType type);
inline bool IsAuthMessage(const proto::CastMessage& message) { … }
inline bool IsTransportNamespace(std::string_view namespace_) { … }
proto::CastMessage MakeSimpleUTF8Message(const std::string& namespace_,
std::string payload);
proto::CastMessage MakeConnectMessage(const std::string& source_id,
const std::string& destination_id);
proto::CastMessage MakeCloseMessage(const std::string& source_id,
const std::string& destination_id);
std::string MakeUniqueSessionId(const char* prefix);
bool HasType(const Json::Value& object, CastMessageType type);
std::string ToString(const proto::CastMessage& message);
const std::string& GetPayload(const proto::CastMessage& message);
}
#endif