chromium/mojo/public/cpp/bindings/lib/buffer.cc

// 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.

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

#include "mojo/public/cpp/bindings/lib/buffer.h"

#include <cstring>
#include <tuple>

#include "base/check_op.h"
#include "base/notreached.h"
#include "base/numerics/safe_math.h"
#include "mojo/public/c/system/message_pipe.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"

namespace mojo {
namespace internal {

Buffer::Buffer() = default;

Buffer::Buffer(void* data, size_t size, size_t cursor)
    :{}

Buffer::Buffer(MessageHandle message,
               size_t message_payload_size,
               void* data,
               size_t size)
    :{}

Buffer::Buffer(Buffer&& other) {}

Buffer::~Buffer() = default;

Buffer& Buffer::operator=(Buffer&& other) {}

size_t Buffer::Allocate(size_t num_bytes) {}

bool Buffer::AttachHandles(std::vector<ScopedHandle>* handles) {}

void Buffer::Seal() {}

void Buffer::Reset() {}

}  // namespace internal
}  // namespace mojo