// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef QUICHE_COMMON_QUICHE_BUFFER_ALLOCATOR_H_ #define QUICHE_COMMON_QUICHE_BUFFER_ALLOCATOR_H_ #include <stddef.h> #include <memory> #include "absl/strings/string_view.h" #include "quiche/common/platform/api/quiche_export.h" #include "quiche/common/platform/api/quiche_iovec.h" namespace quiche { // Abstract base class for classes which allocate and delete buffers. class QUICHE_EXPORT QuicheBufferAllocator { … }; // A deleter that can be used to manage ownership of buffers allocated via // QuicheBufferAllocator through std::unique_ptr. class QUICHE_EXPORT QuicheBufferDeleter { … }; QuicheUniqueBufferPtr; inline QuicheUniqueBufferPtr MakeUniqueBuffer(QuicheBufferAllocator* allocator, size_t size) { … } // QuicheUniqueBufferPtr with a length attached to it. Similar to // QuicheMemSlice, except unlike QuicheMemSlice, QuicheBuffer is mutable and is // not platform-specific. Also unlike QuicheMemSlice, QuicheBuffer can be // empty. class QUICHE_EXPORT QuicheBuffer { … }; } // namespace quiche #endif // QUICHE_COMMON_QUICHE_BUFFER_ALLOCATOR_H_