chromium/mojo/core/ipcz_driver/ring_buffer.cc

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

#include "mojo/core/ipcz_driver/ring_buffer.h"

#include <cstddef>
#include <cstdint>
#include <cstring>

#include "base/check_op.h"
#include "base/containers/span.h"
#include "base/numerics/safe_math.h"
#include "base/ranges/algorithm.h"
#include "mojo/core/ipcz_driver/shared_buffer_mapping.h"

namespace mojo::core::ipcz_driver {

RingBuffer::RingBuffer(scoped_refptr<SharedBufferMapping> mapping)
    :{}

RingBuffer::~RingBuffer() = default;

size_t RingBuffer::Write(base::span<const uint8_t> source) {}

bool RingBuffer::WriteAll(base::span<const uint8_t> source) {}

size_t RingBuffer::Read(base::span<uint8_t> target) {}

bool RingBuffer::ReadAll(base::span<uint8_t> target) {}

size_t RingBuffer::Peek(base::span<uint8_t> target) {}

bool RingBuffer::PeekAll(base::span<uint8_t> target) {}

size_t RingBuffer::Discard(size_t n) {}

bool RingBuffer::DiscardAll(size_t n) {}

bool RingBuffer::ExtendDataRange(size_t n) {}

void RingBuffer::Serialize(SerializedState& state) {}

bool RingBuffer::Deserialize(const SerializedState& state) {}

RingBuffer::SplitBytes RingBuffer::MapRange(
    const RingBuffer::Range& range) const {}

RingBuffer::Range RingBuffer::ComplementRange(const Range& range) const {}

base::span<uint8_t> RingBuffer::GetAvailableCapacityView() const {}

base::span<const uint8_t> RingBuffer::GetReadableDataView() const {}

}  // namespace mojo::core::ipcz_driver