chromium/third_party/grpc/src/src/cpp/client/channel_cc.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 <atomic>
#include <cstring>
#include <memory>
#include <string>
#include <utility>
#include <vector>

#include <grpc/grpc.h>
#include <grpc/impl/connectivity_state.h>
#include <grpc/slice.h>
#include <grpc/support/alloc.h>
#include <grpc/support/log.h>
#include <grpc/support/time.h>
#include <grpcpp/channel.h>
#include <grpcpp/client_context.h>
#include <grpcpp/completion_queue.h>
#include <grpcpp/impl/call.h>
#include <grpcpp/impl/call_op_set_interface.h>
#include <grpcpp/impl/completion_queue_tag.h>
#include <grpcpp/impl/rpc_method.h>
#include <grpcpp/impl/sync.h>
#include <grpcpp/support/client_interceptor.h>
#include <grpcpp/support/slice.h>

#include "src/core/lib/iomgr/iomgr.h"

namespace grpc {

Channel::Channel(
    const std::string& host, grpc_channel* channel,
    std::vector<
        std::unique_ptr<grpc::experimental::ClientInterceptorFactoryInterface>>
        interceptor_creators)
    :{}

Channel::~Channel() {}

namespace {

inline grpc_slice SliceFromArray(const char* arr, size_t len) {}

std::string GetChannelInfoField(grpc_channel* channel,
                                grpc_channel_info* channel_info,
                                char*** channel_info_field) {}

}  // namespace

std::string Channel::GetLoadBalancingPolicyName() const {}

std::string Channel::GetServiceConfigJSON() const {}

namespace experimental {

void ChannelResetConnectionBackoff(Channel* channel) {}

}  // namespace experimental

grpc::internal::Call Channel::CreateCallInternal(
    const grpc::internal::RpcMethod& method, grpc::ClientContext* context,
    grpc::CompletionQueue* cq, size_t interceptor_pos) {}

grpc::internal::Call Channel::CreateCall(
    const grpc::internal::RpcMethod& method, grpc::ClientContext* context,
    CompletionQueue* cq) {}

void Channel::PerformOpsOnCall(grpc::internal::CallOpSetInterface* ops,
                               grpc::internal::Call* call) {}

void* Channel::RegisterMethod(const char* method) {}

grpc_connectivity_state Channel::GetState(bool try_to_connect) {}

namespace {

class TagSaver final : public grpc::internal::CompletionQueueTag {};

}  // namespace

void Channel::NotifyOnStateChangeImpl(grpc_connectivity_state last_observed,
                                      gpr_timespec deadline,
                                      grpc::CompletionQueue* cq, void* tag) {}

bool Channel::WaitForStateChangeImpl(grpc_connectivity_state last_observed,
                                     gpr_timespec deadline) {}

namespace {
class ShutdownCallback : public grpc_completion_queue_functor {};
}  // namespace

::grpc::CompletionQueue* Channel::CallbackCQ() {}

}  // namespace grpc