chromium/components/media_router/common/providers/cast/channel/cast_framer.cc

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

#ifdef UNSAFE_BUFFERS_BUILD
// TODO(crbug.com/40285824): Remove this and convert code to safer constructs.
#pragma allow_unsafe_buffers
#endif

#include "components/media_router/common/providers/cast/channel/cast_framer.h"

#include <stdlib.h>

#include <limits>

#include "base/containers/span.h"
#include "base/logging.h"
#include "base/memory/free_deleter.h"
#include "base/notreached.h"
#include "base/numerics/byte_conversions.h"
#include "base/numerics/safe_conversions.h"
#include "base/strings/string_number_conversions.h"
#include "third_party/openscreen/src/cast/common/channel/proto/cast_channel.pb.h"

namespace cast_channel {
MessageFramer::MessageFramer(scoped_refptr<net::GrowableIOBuffer> input_buffer)
    :{}

MessageFramer::~MessageFramer() = default;

MessageFramer::MessageHeader::MessageHeader() = default;

void MessageFramer::MessageHeader::SetMessageSize(size_t size) {}

// TODO(mfoltz): Investigate replacing header serialization with base::Pickle,
// if bit-for-bit compatible.
void MessageFramer::MessageHeader::PrependToString(std::string* str) {}

void MessageFramer::MessageHeader::Deserialize(base::span<const uint8_t> data,
                                               MessageHeader* header) {}

// static
size_t MessageFramer::MessageHeader::max_body_size() {}

// static
size_t MessageFramer::MessageHeader::max_message_size() {}

std::string MessageFramer::MessageHeader::ToString() {}

// static
bool MessageFramer::Serialize(const CastMessage& message_proto,
                              std::string* message_data) {}

size_t MessageFramer::BytesRequested() {}

std::unique_ptr<CastMessage> MessageFramer::Ingest(size_t num_bytes,
                                                   size_t* message_length,
                                                   ChannelError* error) {}

void MessageFramer::Reset() {}

}  // namespace cast_channel