#include "cast/streaming/public/receiver_message.h"
#include <utility>
#include "cast/streaming/message_fields.h"
#include "json/reader.h"
#include "json/writer.h"
#include "platform/base/error.h"
#include "util/base64.h"
#include "util/enum_name_table.h"
#include "util/json/json_helpers.h"
#include "util/json/json_serialization.h"
#include "util/osp_logging.h"
#include "util/string_util.h"
#include "util/stringprintf.h"
namespace openscreen::cast {
namespace {
EnumNameTable<ReceiverMessage::Type, 3> kMessageTypeNames{ … };
EnumNameTable<MediaCapability, 10> kMediaCapabilityNames{ … };
ReceiverMessage::Type GetMessageType(const Json::Value& root) { … }
bool TryParseCapability(const Json::Value& value, MediaCapability* out) { … }
}
ReceiverError::ReceiverError(int code, std::string_view description)
: … { … }
ReceiverError::ReceiverError(Error::Code code, std::string_view description)
: … { … }
ReceiverError::ReceiverError(const Error& error)
: … { … }
ReceiverError::ReceiverError(const ReceiverError&) = default;
ReceiverError::ReceiverError(ReceiverError&&) noexcept = default;
ReceiverError& ReceiverError::operator=(const ReceiverError&) = default;
ReceiverError& ReceiverError::operator=(ReceiverError&&) = default;
ReceiverError::~ReceiverError() = default;
ErrorOr<ReceiverError> ReceiverError::Parse(const Json::Value& value) { … }
Json::Value ReceiverError::ToJson() const { … }
Error ReceiverError::ToError() const { … }
ErrorOr<ReceiverCapability> ReceiverCapability::Parse(
const Json::Value& value) { … }
Json::Value ReceiverCapability::ToJson() const { … }
ErrorOr<ReceiverMessage> ReceiverMessage::Parse(const Json::Value& value) { … }
ErrorOr<Json::Value> ReceiverMessage::ToJson() const { … }
}