chromium/third_party/grpc/src/src/core/lib/slice/slice_buffer.cc

//
//
// Copyright 2015 gRPC authors.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//

#include <grpc/support/port_platform.h>

#include "src/core/lib/slice/slice_buffer.h"

#include <string.h>

#include <utility>

#include <grpc/slice.h>
#include <grpc/slice_buffer.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>

#include "src/core/lib/slice/slice_internal.h"

namespace grpc_core {

void SliceBuffer::Append(Slice slice) {}

void SliceBuffer::Append(const SliceBuffer& other) {}

size_t SliceBuffer::AppendIndexed(Slice slice) {}

Slice SliceBuffer::TakeFirst() {}

void SliceBuffer::Prepend(Slice slice) {}

Slice SliceBuffer::RefSlice(size_t index) const {}

std::string SliceBuffer::JoinIntoString() const {}

}  // namespace grpc_core

// grow a buffer; requires GRPC_SLICE_BUFFER_INLINE_ELEMENTS > 1
#define GROW(x)

// Typically, we do not actually need to embiggen (by calling
// memmove/malloc/realloc) - only if we were up against the full capacity of the
// slice buffer. If do_embiggen is inlined, the compiler clobbers multiple
// registers pointlessly in the common case.
static void GPR_ATTRIBUTE_NOINLINE do_embiggen(grpc_slice_buffer* sb,
                                               const size_t slice_count,
                                               const size_t slice_offset) {}

static void maybe_embiggen(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_init(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_destroy(grpc_slice_buffer* sb) {}

uint8_t* grpc_slice_buffer_tiny_add(grpc_slice_buffer* sb, size_t n) {}

size_t grpc_slice_buffer_add_indexed(grpc_slice_buffer* sb, grpc_slice s) {}

void grpc_slice_buffer_add(grpc_slice_buffer* sb, grpc_slice s) {}

void grpc_slice_buffer_addn(grpc_slice_buffer* sb, grpc_slice* s, size_t n) {}

void grpc_slice_buffer_pop(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_reset_and_unref(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_swap(grpc_slice_buffer* a, grpc_slice_buffer* b) {}

void grpc_slice_buffer_move_into(grpc_slice_buffer* src,
                                 grpc_slice_buffer* dst) {}

template <bool incref>
static void slice_buffer_move_first_maybe_ref(grpc_slice_buffer* src, size_t n,
                                              grpc_slice_buffer* dst) {}

void grpc_slice_buffer_move_first(grpc_slice_buffer* src, size_t n,
                                  grpc_slice_buffer* dst) {}

void grpc_slice_buffer_move_first_no_ref(grpc_slice_buffer* src, size_t n,
                                         grpc_slice_buffer* dst) {}

void grpc_slice_buffer_move_first_into_buffer(grpc_slice_buffer* src, size_t n,
                                              void* dst) {}

void grpc_slice_buffer_copy_first_into_buffer(grpc_slice_buffer* src, size_t n,
                                              void* dst) {}

void grpc_slice_buffer_trim_end(grpc_slice_buffer* sb, size_t n,
                                grpc_slice_buffer* garbage) {}

grpc_slice grpc_slice_buffer_take_first(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_remove_first(grpc_slice_buffer* sb) {}

void grpc_slice_buffer_sub_first(grpc_slice_buffer* sb, size_t begin,
                                 size_t end) {}

void grpc_slice_buffer_undo_take_first(grpc_slice_buffer* sb,
                                       grpc_slice slice) {}