chromium/third_party/grpc/src/src/cpp/server/server_context.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 <assert.h>

#include <atomic>
#include <cstdlib>
#include <functional>
#include <initializer_list>
#include <map>
#include <new>
#include <string>
#include <utility>
#include <vector>

#include "absl/strings/str_format.h"
#include "absl/strings/string_view.h"

#include <grpc/compression.h>
#include <grpc/grpc.h>
#include <grpc/impl/compression_types.h>
#include <grpc/load_reporting.h>
#include <grpc/status.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/ext/call_metric_recorder.h>
#include <grpcpp/ext/server_metric_recorder.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/call_op_set.h>
#include <grpcpp/impl/call_op_set_interface.h>
#include <grpcpp/impl/completion_queue_tag.h>
#include <grpcpp/impl/interceptor_common.h>
#include <grpcpp/impl/metadata_map.h>
#include <grpcpp/server_context.h>
#include <grpcpp/support/callback_common.h>
#include <grpcpp/support/interceptor.h>
#include <grpcpp/support/server_callback.h>
#include <grpcpp/support/server_interceptor.h>
#include <grpcpp/support/string_ref.h>

#include "src/core/lib/channel/context.h"
#include "src/core/lib/gprpp/crash.h"
#include "src/core/lib/gprpp/ref_counted.h"
#include "src/core/lib/gprpp/sync.h"
#include "src/core/lib/resource_quota/arena.h"
#include "src/core/lib/surface/call.h"
#include "src/cpp/server/backend_metric_recorder.h"

namespace grpc {

// CompletionOp

class ServerContextBase::CompletionOp final
    : public internal::CallOpSetInterface {};

void ServerContextBase::CompletionOp::Unref() {}

void ServerContextBase::CompletionOp::FillOps(internal::Call* call) {}

bool ServerContextBase::CompletionOp::FinalizeResult(void** tag, bool* status) {}

// ServerContextBase body

ServerContextBase::ServerContextBase()
    :{}

ServerContextBase::ServerContextBase(gpr_timespec deadline,
                                     grpc_metadata_array* arr)
    :{}

void ServerContextBase::BindDeadlineAndMetadata(gpr_timespec deadline,
                                                grpc_metadata_array* arr) {}

ServerContextBase::~ServerContextBase() {}

ServerContextBase::CallWrapper::~CallWrapper() {}

void ServerContextBase::BeginCompletionOp(
    internal::Call* call, std::function<void(bool)> callback,
    grpc::internal::ServerCallbackCall* callback_controller) {}

internal::CompletionQueueTag* ServerContextBase::GetCompletionOpTag() {}

void ServerContextBase::AddInitialMetadata(const std::string& key,
                                           const std::string& value) {}

void ServerContextBase::AddTrailingMetadata(const std::string& key,
                                            const std::string& value) {}

void ServerContextBase::TryCancel() const {}

bool ServerContextBase::IsCancelled() const {}

void ServerContextBase::set_compression_algorithm(
    grpc_compression_algorithm algorithm) {}

std::string ServerContextBase::peer() const {}

const struct census_context* ServerContextBase::census_context() const {}

void ServerContextBase::SetLoadReportingCosts(
    const std::vector<std::string>& cost_data) {}

void ServerContextBase::CreateCallMetricRecorder(
    experimental::ServerMetricRecorder* server_metric_recorder) {}

grpc::string_ref ServerContextBase::ExperimentalGetAuthority() const {}

}  // namespace grpc