chromium/components/media_router/common/providers/cast/channel/cast_channel_enum.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef COMPONENTS_MEDIA_ROUTER_COMMON_PROVIDERS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_
#define COMPONENTS_MEDIA_ROUTER_COMMON_PROVIDERS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_

#include <cstdint>
#include <string>

#include "base/types/cxx23_to_underlying.h"

namespace cast_channel {

// Helper function to convert scoped enums to their underlying type, for use
// with ostreams.
template <typename Enumeration>
auto AsInteger(Enumeration const value) {}

enum class ReadyState {};

enum class ChannelError {};

enum class ChannelEvent {};

enum class ChallengeReplyError {};

// Used by CastSocket/CastTransport to track connection state.
enum class ConnectionState {};

// Used by CastSocket/CastTransport to track read state.
enum class ReadState {};

// Used by CastSocket/CastTransport to track write state.
enum class WriteState {};

std::string ReadyStateToString(ReadyState ready_state);
std::string ChannelErrorToString(ChannelError channel_error);

constexpr int kNumCastChannelFlags =;

// These values are persisted to logs. Entries should not be renumbered and
// numeric values should never be reused.
// Keep in sync with CastChannelFlag enum in tools/metrics/histograms/enums.xml.
enum class CastChannelFlag : uint16_t {};

CastChannelFlags;

constexpr CastChannelFlags kCastChannelFlagsNone =;

}  // namespace cast_channel

#endif  // COMPONENTS_MEDIA_ROUTER_COMMON_PROVIDERS_CAST_CHANNEL_CAST_CHANNEL_ENUM_H_