#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "remoting/base/compound_buffer.h"
#include <algorithm>
#include <functional>
#include "base/check_op.h"
#include "net/base/io_buffer.h"
namespace remoting {
CompoundBuffer::DataChunk::DataChunk(scoped_refptr<net::IOBuffer> buffer,
const char* start,
int size)
: … { … }
CompoundBuffer::DataChunk::DataChunk(const DataChunk& other) = default;
CompoundBuffer::DataChunk::~DataChunk() = default;
CompoundBuffer::CompoundBuffer() : … { … }
CompoundBuffer::~CompoundBuffer() = default;
void CompoundBuffer::Clear() { … }
void CompoundBuffer::Append(scoped_refptr<net::IOBuffer> buffer,
const char* start,
int size) { … }
void CompoundBuffer::Append(scoped_refptr<net::IOBuffer> buffer, int size) { … }
void CompoundBuffer::Append(const CompoundBuffer& buffer) { … }
void CompoundBuffer::Prepend(scoped_refptr<net::IOBuffer> buffer,
const char* start,
int size) { … }
void CompoundBuffer::Prepend(scoped_refptr<net::IOBuffer> buffer, int size) { … }
void CompoundBuffer::Prepend(const CompoundBuffer& buffer) { … }
void CompoundBuffer::AppendCopyOf(const char* data, int size) { … }
void CompoundBuffer::PrependCopyOf(const char* data, int size) { … }
void CompoundBuffer::CropFront(int bytes) { … }
void CompoundBuffer::CropBack(int bytes) { … }
void CompoundBuffer::Lock() { … }
scoped_refptr<net::IOBufferWithSize> CompoundBuffer::ToIOBufferWithSize()
const { … }
void CompoundBuffer::CopyTo(char* data, int size) const { … }
void CompoundBuffer::CopyFrom(const CompoundBuffer& source,
int start,
int end) { … }
CompoundBufferInputStream::CompoundBufferInputStream(
const CompoundBuffer* buffer)
: … { … }
CompoundBufferInputStream::~CompoundBufferInputStream() = default;
bool CompoundBufferInputStream::Next(const void** data, int* size) { … }
void CompoundBufferInputStream::BackUp(int count) { … }
bool CompoundBufferInputStream::Skip(int count) { … }
int64_t CompoundBufferInputStream::ByteCount() const { … }
}