mirror of https://github.com/grpc/grpc.git
commit
29346aa54f
94 changed files with 3244 additions and 1271 deletions
@ -0,0 +1,97 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015-2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H |
||||
#define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H |
||||
|
||||
#include <grpc++/impl/codegen/config_protobuf.h> |
||||
#include <grpc++/impl/codegen/status.h> |
||||
#include <grpc/impl/codegen/grpc_types.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
/// Interface between the codegen library and the minimal subset of core
|
||||
/// features required by the generated code.
|
||||
///
|
||||
/// All undocumented methods are simply forwarding the call to their namesakes.
|
||||
/// Please refer to their corresponding documentation for details.
|
||||
///
|
||||
/// \warning This interface should be considered internal and private.
|
||||
class CoreCodegenInterface { |
||||
public: |
||||
// Serialize the msg into a buffer created inside the function. The caller
|
||||
// should destroy the returned buffer when done with it. If serialization
|
||||
// fails,
|
||||
// false is returned and buffer is left unchanged.
|
||||
virtual Status SerializeProto(const grpc::protobuf::Message& msg, |
||||
grpc_byte_buffer** buffer) = 0; |
||||
|
||||
// The caller keeps ownership of buffer and msg.
|
||||
virtual Status DeserializeProto(grpc_byte_buffer* buffer, |
||||
grpc::protobuf::Message* msg, |
||||
int max_message_size) = 0; |
||||
|
||||
/// Upon a failed assertion, log the error.
|
||||
virtual void assert_fail(const char* failed_assertion) = 0; |
||||
|
||||
virtual grpc_completion_queue* grpc_completion_queue_create( |
||||
void* reserved) = 0; |
||||
virtual void grpc_completion_queue_destroy(grpc_completion_queue* cq) = 0; |
||||
virtual grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, |
||||
void* tag, |
||||
gpr_timespec deadline, |
||||
void* reserved) = 0; |
||||
|
||||
virtual void* gpr_malloc(size_t size) = 0; |
||||
virtual void gpr_free(void* p) = 0; |
||||
|
||||
virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; |
||||
virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; |
||||
virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; |
||||
|
||||
virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; |
||||
}; |
||||
|
||||
extern CoreCodegenInterface* g_core_codegen_interface; |
||||
|
||||
/// Codegen specific version of \a GPR_ASSERT.
|
||||
#define GPR_CODEGEN_ASSERT(x) \ |
||||
do { \
|
||||
if (!(x)) { \
|
||||
grpc::g_core_codegen_interface->assert_fail(#x); \
|
||||
} \
|
||||
} while (0) |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H
|
@ -0,0 +1,463 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015-2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H |
||||
#define GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H |
||||
|
||||
#include <grpc++/impl/codegen/call.h> |
||||
#include <grpc++/impl/codegen/channel_interface.h> |
||||
#include <grpc++/impl/codegen/core_codegen_interface.h> |
||||
#include <grpc++/impl/codegen/server_context.h> |
||||
#include <grpc++/impl/codegen/service_type.h> |
||||
#include <grpc++/impl/codegen/status.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
class CompletionQueue; |
||||
|
||||
/// Common interface for all client side asynchronous streaming.
|
||||
class ClientAsyncStreamingInterface { |
||||
public: |
||||
virtual ~ClientAsyncStreamingInterface() {} |
||||
|
||||
/// Request notification of the reading of the initial metadata. Completion
|
||||
/// will be notified by \a tag on the associated completion queue.
|
||||
///
|
||||
/// \param[in] tag Tag identifying this request.
|
||||
virtual void ReadInitialMetadata(void* tag) = 0; |
||||
|
||||
/// Request notification completion.
|
||||
///
|
||||
/// \param[out] status To be updated with the operation status.
|
||||
/// \param[in] tag Tag identifying this request.
|
||||
virtual void Finish(Status* status, void* tag) = 0; |
||||
}; |
||||
|
||||
/// An interface that yields a sequence of messages of type \a R.
|
||||
template <class R> |
||||
class AsyncReaderInterface { |
||||
public: |
||||
virtual ~AsyncReaderInterface() {} |
||||
|
||||
/// Read a message of type \a R into \a msg. Completion will be notified by \a
|
||||
/// tag on the associated completion queue.
|
||||
///
|
||||
/// \param[out] msg Where to eventually store the read message.
|
||||
/// \param[in] tag The tag identifying the operation.
|
||||
virtual void Read(R* msg, void* tag) = 0; |
||||
}; |
||||
|
||||
/// An interface that can be fed a sequence of messages of type \a W.
|
||||
template <class W> |
||||
class AsyncWriterInterface { |
||||
public: |
||||
virtual ~AsyncWriterInterface() {} |
||||
|
||||
/// Request the writing of \a msg with identifying tag \a tag.
|
||||
///
|
||||
/// Only one write may be outstanding at any given time. This means that
|
||||
/// after calling Write, one must wait to receive \a tag from the completion
|
||||
/// queue BEFORE calling Write again.
|
||||
///
|
||||
/// \param[in] msg The message to be written.
|
||||
/// \param[in] tag The tag identifying the operation.
|
||||
virtual void Write(const W& msg, void* tag) = 0; |
||||
}; |
||||
|
||||
template <class R> |
||||
class ClientAsyncReaderInterface : public ClientAsyncStreamingInterface, |
||||
public AsyncReaderInterface<R> {}; |
||||
|
||||
template <class R> |
||||
class ClientAsyncReader GRPC_FINAL : public ClientAsyncReaderInterface<R> { |
||||
public: |
||||
/// Create a stream and write the first request out.
|
||||
template <class W> |
||||
ClientAsyncReader(ChannelInterface* channel, CompletionQueue* cq, |
||||
const RpcMethod& method, ClientContext* context, |
||||
const W& request, void* tag) |
||||
: context_(context), call_(channel->CreateCall(method, context, cq)) { |
||||
init_ops_.set_output_tag(tag); |
||||
init_ops_.SendInitialMetadata(context->send_initial_metadata_); |
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(init_ops_.SendMessage(request).ok()); |
||||
init_ops_.ClientSendClose(); |
||||
call_.PerformOps(&init_ops_); |
||||
} |
||||
|
||||
void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.RecvInitialMetadata(context_); |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Read(R* msg, void* tag) GRPC_OVERRIDE { |
||||
read_ops_.set_output_tag(tag); |
||||
if (!context_->initial_metadata_received_) { |
||||
read_ops_.RecvInitialMetadata(context_); |
||||
} |
||||
read_ops_.RecvMessage(msg); |
||||
call_.PerformOps(&read_ops_); |
||||
} |
||||
|
||||
void Finish(Status* status, void* tag) GRPC_OVERRIDE { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!context_->initial_metadata_received_) { |
||||
finish_ops_.RecvInitialMetadata(context_); |
||||
} |
||||
finish_ops_.ClientRecvStatus(context_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
ClientContext* context_; |
||||
Call call_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, CallOpClientSendClose> |
||||
init_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> read_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata, CallOpClientRecvStatus> finish_ops_; |
||||
}; |
||||
|
||||
/// Common interface for client side asynchronous writing.
|
||||
template <class W> |
||||
class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface, |
||||
public AsyncWriterInterface<W> { |
||||
public: |
||||
/// Signal the client is done with the writes.
|
||||
///
|
||||
/// \param[in] tag The tag identifying the operation.
|
||||
virtual void WritesDone(void* tag) = 0; |
||||
}; |
||||
|
||||
template <class W> |
||||
class ClientAsyncWriter GRPC_FINAL : public ClientAsyncWriterInterface<W> { |
||||
public: |
||||
template <class R> |
||||
ClientAsyncWriter(ChannelInterface* channel, CompletionQueue* cq, |
||||
const RpcMethod& method, ClientContext* context, |
||||
R* response, void* tag) |
||||
: context_(context), call_(channel->CreateCall(method, context, cq)) { |
||||
finish_ops_.RecvMessage(response); |
||||
|
||||
init_ops_.set_output_tag(tag); |
||||
init_ops_.SendInitialMetadata(context->send_initial_metadata_); |
||||
call_.PerformOps(&init_ops_); |
||||
} |
||||
|
||||
void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.RecvInitialMetadata(context_); |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Write(const W& msg, void* tag) GRPC_OVERRIDE { |
||||
write_ops_.set_output_tag(tag); |
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); |
||||
call_.PerformOps(&write_ops_); |
||||
} |
||||
|
||||
void WritesDone(void* tag) GRPC_OVERRIDE { |
||||
writes_done_ops_.set_output_tag(tag); |
||||
writes_done_ops_.ClientSendClose(); |
||||
call_.PerformOps(&writes_done_ops_); |
||||
} |
||||
|
||||
void Finish(Status* status, void* tag) GRPC_OVERRIDE { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!context_->initial_metadata_received_) { |
||||
finish_ops_.RecvInitialMetadata(context_); |
||||
} |
||||
finish_ops_.ClientRecvStatus(context_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
ClientContext* context_; |
||||
Call call_; |
||||
CallOpSet<CallOpSendInitialMetadata> init_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpSendMessage> write_ops_; |
||||
CallOpSet<CallOpClientSendClose> writes_done_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata, CallOpGenericRecvMessage, |
||||
CallOpClientRecvStatus> finish_ops_; |
||||
}; |
||||
|
||||
/// Client-side interface for asynchronous bi-directional streaming.
|
||||
template <class W, class R> |
||||
class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface, |
||||
public AsyncWriterInterface<W>, |
||||
public AsyncReaderInterface<R> { |
||||
public: |
||||
/// Signal the client is done with the writes.
|
||||
///
|
||||
/// \param[in] tag The tag identifying the operation.
|
||||
virtual void WritesDone(void* tag) = 0; |
||||
}; |
||||
|
||||
template <class W, class R> |
||||
class ClientAsyncReaderWriter GRPC_FINAL |
||||
: public ClientAsyncReaderWriterInterface<W, R> { |
||||
public: |
||||
ClientAsyncReaderWriter(ChannelInterface* channel, CompletionQueue* cq, |
||||
const RpcMethod& method, ClientContext* context, |
||||
void* tag) |
||||
: context_(context), call_(channel->CreateCall(method, context, cq)) { |
||||
init_ops_.set_output_tag(tag); |
||||
init_ops_.SendInitialMetadata(context->send_initial_metadata_); |
||||
call_.PerformOps(&init_ops_); |
||||
} |
||||
|
||||
void ReadInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!context_->initial_metadata_received_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.RecvInitialMetadata(context_); |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Read(R* msg, void* tag) GRPC_OVERRIDE { |
||||
read_ops_.set_output_tag(tag); |
||||
if (!context_->initial_metadata_received_) { |
||||
read_ops_.RecvInitialMetadata(context_); |
||||
} |
||||
read_ops_.RecvMessage(msg); |
||||
call_.PerformOps(&read_ops_); |
||||
} |
||||
|
||||
void Write(const W& msg, void* tag) GRPC_OVERRIDE { |
||||
write_ops_.set_output_tag(tag); |
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); |
||||
call_.PerformOps(&write_ops_); |
||||
} |
||||
|
||||
void WritesDone(void* tag) GRPC_OVERRIDE { |
||||
writes_done_ops_.set_output_tag(tag); |
||||
writes_done_ops_.ClientSendClose(); |
||||
call_.PerformOps(&writes_done_ops_); |
||||
} |
||||
|
||||
void Finish(Status* status, void* tag) GRPC_OVERRIDE { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!context_->initial_metadata_received_) { |
||||
finish_ops_.RecvInitialMetadata(context_); |
||||
} |
||||
finish_ops_.ClientRecvStatus(context_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
ClientContext* context_; |
||||
Call call_; |
||||
CallOpSet<CallOpSendInitialMetadata> init_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata, CallOpRecvMessage<R>> read_ops_; |
||||
CallOpSet<CallOpSendMessage> write_ops_; |
||||
CallOpSet<CallOpClientSendClose> writes_done_ops_; |
||||
CallOpSet<CallOpRecvInitialMetadata, CallOpClientRecvStatus> finish_ops_; |
||||
}; |
||||
|
||||
template <class W, class R> |
||||
class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, |
||||
public AsyncReaderInterface<R> { |
||||
public: |
||||
explicit ServerAsyncReader(ServerContext* ctx) |
||||
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} |
||||
|
||||
void SendInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Read(R* msg, void* tag) GRPC_OVERRIDE { |
||||
read_ops_.set_output_tag(tag); |
||||
read_ops_.RecvMessage(msg); |
||||
call_.PerformOps(&read_ops_); |
||||
} |
||||
|
||||
void Finish(const W& msg, const Status& status, void* tag) { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
// The response is dropped if the status is not OK.
|
||||
if (status.ok()) { |
||||
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, |
||||
finish_ops_.SendMessage(msg)); |
||||
} else { |
||||
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); |
||||
} |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
void FinishWithError(const Status& status, void* tag) { |
||||
GPR_CODEGEN_ASSERT(!status.ok()); |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } |
||||
|
||||
Call call_; |
||||
ServerContext* ctx_; |
||||
CallOpSet<CallOpSendInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpRecvMessage<R>> read_ops_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage, |
||||
CallOpServerSendStatus> finish_ops_; |
||||
}; |
||||
|
||||
template <class W> |
||||
class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, |
||||
public AsyncWriterInterface<W> { |
||||
public: |
||||
explicit ServerAsyncWriter(ServerContext* ctx) |
||||
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} |
||||
|
||||
void SendInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Write(const W& msg, void* tag) GRPC_OVERRIDE { |
||||
write_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
write_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); |
||||
call_.PerformOps(&write_ops_); |
||||
} |
||||
|
||||
void Finish(const Status& status, void* tag) { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } |
||||
|
||||
Call call_; |
||||
ServerContext* ctx_; |
||||
CallOpSet<CallOpSendInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> write_ops_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> finish_ops_; |
||||
}; |
||||
|
||||
/// Server-side interface for asynchronous bi-directional streaming.
|
||||
template <class W, class R> |
||||
class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, |
||||
public AsyncWriterInterface<W>, |
||||
public AsyncReaderInterface<R> { |
||||
public: |
||||
explicit ServerAsyncReaderWriter(ServerContext* ctx) |
||||
: call_(nullptr, nullptr, nullptr), ctx_(ctx) {} |
||||
|
||||
void SendInitialMetadata(void* tag) GRPC_OVERRIDE { |
||||
GPR_CODEGEN_ASSERT(!ctx_->sent_initial_metadata_); |
||||
|
||||
meta_ops_.set_output_tag(tag); |
||||
meta_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
call_.PerformOps(&meta_ops_); |
||||
} |
||||
|
||||
void Read(R* msg, void* tag) GRPC_OVERRIDE { |
||||
read_ops_.set_output_tag(tag); |
||||
read_ops_.RecvMessage(msg); |
||||
call_.PerformOps(&read_ops_); |
||||
} |
||||
|
||||
void Write(const W& msg, void* tag) GRPC_OVERRIDE { |
||||
write_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
write_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
// TODO(ctiller): don't assert
|
||||
GPR_CODEGEN_ASSERT(write_ops_.SendMessage(msg).ok()); |
||||
call_.PerformOps(&write_ops_); |
||||
} |
||||
|
||||
void Finish(const Status& status, void* tag) { |
||||
finish_ops_.set_output_tag(tag); |
||||
if (!ctx_->sent_initial_metadata_) { |
||||
finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); |
||||
ctx_->sent_initial_metadata_ = true; |
||||
} |
||||
finish_ops_.ServerSendStatus(ctx_->trailing_metadata_, status); |
||||
call_.PerformOps(&finish_ops_); |
||||
} |
||||
|
||||
private: |
||||
friend class ::grpc::Server; |
||||
|
||||
void BindCall(Call* call) GRPC_OVERRIDE { call_ = *call; } |
||||
|
||||
Call call_; |
||||
ServerContext* ctx_; |
||||
CallOpSet<CallOpSendInitialMetadata> meta_ops_; |
||||
CallOpSet<CallOpRecvMessage<R>> read_ops_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpSendMessage> write_ops_; |
||||
CallOpSet<CallOpSendInitialMetadata, CallOpServerSendStatus> finish_ops_; |
||||
}; |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_IMPL_CODEGEN_ASYNC_STREAM_H
|
@ -0,0 +1,152 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H |
||||
#define GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H |
||||
|
||||
namespace grpc { |
||||
|
||||
enum StatusCode { |
||||
/// Not an error; returned on success.
|
||||
OK = 0, |
||||
|
||||
/// The operation was cancelled (typically by the caller).
|
||||
CANCELLED = 1, |
||||
|
||||
/// Unknown error. An example of where this error may be returned is if a
|
||||
/// Status value received from another address space belongs to an error-space
|
||||
/// that is not known in this address space. Also errors raised by APIs that
|
||||
/// do not return enough error information may be converted to this error.
|
||||
UNKNOWN = 2, |
||||
|
||||
/// Client specified an invalid argument. Note that this differs from
|
||||
/// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are
|
||||
/// problematic regardless of the state of the system (e.g., a malformed file
|
||||
/// name).
|
||||
INVALID_ARGUMENT = 3, |
||||
|
||||
/// Deadline expired before operation could complete. For operations that
|
||||
/// change the state of the system, this error may be returned even if the
|
||||
/// operation has completed successfully. For example, a successful response
|
||||
/// from a server could have been delayed long enough for the deadline to
|
||||
/// expire.
|
||||
DEADLINE_EXCEEDED = 4, |
||||
|
||||
/// Some requested entity (e.g., file or directory) was not found.
|
||||
NOT_FOUND = 5, |
||||
|
||||
/// Some entity that we attempted to create (e.g., file or directory) already
|
||||
/// exists.
|
||||
ALREADY_EXISTS = 6, |
||||
|
||||
/// The caller does not have permission to execute the specified operation.
|
||||
/// PERMISSION_DENIED must not be used for rejections caused by exhausting
|
||||
/// some resource (use RESOURCE_EXHAUSTED instead for those errors).
|
||||
/// PERMISSION_DENIED must not be used if the caller can not be identified
|
||||
/// (use UNAUTHENTICATED instead for those errors).
|
||||
PERMISSION_DENIED = 7, |
||||
|
||||
/// The request does not have valid authentication credentials for the
|
||||
/// operation.
|
||||
UNAUTHENTICATED = 16, |
||||
|
||||
/// Some resource has been exhausted, perhaps a per-user quota, or perhaps the
|
||||
/// entire file system is out of space.
|
||||
RESOURCE_EXHAUSTED = 8, |
||||
|
||||
/// Operation was rejected because the system is not in a state required for
|
||||
/// the operation's execution. For example, directory to be deleted may be
|
||||
/// non-empty, an rmdir operation is applied to a non-directory, etc.
|
||||
///
|
||||
/// A litmus test that may help a service implementor in deciding
|
||||
/// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE:
|
||||
/// (a) Use UNAVAILABLE if the client can retry just the failing call.
|
||||
/// (b) Use ABORTED if the client should retry at a higher-level
|
||||
/// (e.g., restarting a read-modify-write sequence).
|
||||
/// (c) Use FAILED_PRECONDITION if the client should not retry until
|
||||
/// the system state has been explicitly fixed. E.g., if an "rmdir"
|
||||
/// fails because the directory is non-empty, FAILED_PRECONDITION
|
||||
/// should be returned since the client should not retry unless
|
||||
/// they have first fixed up the directory by deleting files from it.
|
||||
/// (d) Use FAILED_PRECONDITION if the client performs conditional
|
||||
/// REST Get/Update/Delete on a resource and the resource on the
|
||||
/// server does not match the condition. E.g., conflicting
|
||||
/// read-modify-write on the same resource.
|
||||
FAILED_PRECONDITION = 9, |
||||
|
||||
/// The operation was aborted, typically due to a concurrency issue like
|
||||
/// sequencer check failures, transaction aborts, etc.
|
||||
///
|
||||
/// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
|
||||
/// and UNAVAILABLE.
|
||||
ABORTED = 10, |
||||
|
||||
/// Operation was attempted past the valid range. E.g., seeking or reading
|
||||
/// past end of file.
|
||||
///
|
||||
/// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed
|
||||
/// if the system state changes. For example, a 32-bit file system will
|
||||
/// generate INVALID_ARGUMENT if asked to read at an offset that is not in the
|
||||
/// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from
|
||||
/// an offset past the current file size.
|
||||
///
|
||||
/// There is a fair bit of overlap between FAILED_PRECONDITION and
|
||||
/// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error)
|
||||
/// when it applies so that callers who are iterating through a space can
|
||||
/// easily look for an OUT_OF_RANGE error to detect when they are done.
|
||||
OUT_OF_RANGE = 11, |
||||
|
||||
/// Operation is not implemented or not supported/enabled in this service.
|
||||
UNIMPLEMENTED = 12, |
||||
|
||||
/// Internal errors. Means some invariants expected by underlying System has
|
||||
/// been broken. If you see one of these errors, Something is very broken.
|
||||
INTERNAL = 13, |
||||
|
||||
/// The service is currently unavailable. This is a most likely a transient
|
||||
/// condition and may be corrected by retrying with a backoff.
|
||||
///
|
||||
/// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED,
|
||||
/// and UNAVAILABLE.
|
||||
UNAVAILABLE = 14, |
||||
|
||||
/// Unrecoverable data loss or corruption.
|
||||
DATA_LOSS = 15, |
||||
|
||||
/// Force users to include a default branch:
|
||||
DO_NOT_USE = -1 |
||||
}; |
||||
|
||||
} // namespace grpc
|
||||
|
||||
#endif // GRPCXX_IMPL_CODEGEN_STATUS_CODE_ENUM_H
|
@ -0,0 +1,45 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015-2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#ifndef GRPCXX_IMPL_CODEGEN_SYNC_H |
||||
#define GRPCXX_IMPL_CODEGEN_SYNC_H |
||||
|
||||
#include <grpc++/impl/codegen/config.h> |
||||
|
||||
#ifdef GRPC_CXX0X_NO_THREAD |
||||
#include <grpc++/impl/codegen/sync_no_cxx11.h> |
||||
#else |
||||
#include <grpc++/impl/codegen/sync_cxx11.h> |
||||
#endif |
||||
|
||||
#endif // GRPCXX_IMPL_CODEGEN_SYNC_H
|
@ -0,0 +1,45 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#include <grpc++/impl/codegen/core_codegen_interface.h> |
||||
#include <grpc++/impl/codegen/grpc_library.h> |
||||
|
||||
/// Initializes the global gRPC variables for the codegen library. These will
|
||||
/// stay null in the absence of of grpc++ library. In this case, no gRPC
|
||||
/// features such as the ability to perform calls will be available. Trying to
|
||||
/// perform them would result in a segmentation fault when trying to deference
|
||||
/// the following nulled globals. These should be associated with actual
|
||||
/// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable.
|
||||
|
||||
grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; |
||||
grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; |
@ -1,92 +0,0 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2015, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
#include <grpc++/impl/call.h> |
||||
|
||||
#include <grpc/support/alloc.h> |
||||
#include <grpc++/channel.h> |
||||
#include <grpc++/client_context.h> |
||||
#include <grpc++/support/byte_buffer.h> |
||||
#include "src/core/profiling/timers.h" |
||||
|
||||
namespace grpc { |
||||
|
||||
void FillMetadataMap( |
||||
grpc_metadata_array* arr, |
||||
std::multimap<grpc::string_ref, grpc::string_ref>* metadata) { |
||||
for (size_t i = 0; i < arr->count; i++) { |
||||
// TODO(yangg) handle duplicates?
|
||||
metadata->insert(std::pair<grpc::string_ref, grpc::string_ref>( |
||||
arr->metadata[i].key, grpc::string_ref(arr->metadata[i].value, |
||||
arr->metadata[i].value_length))); |
||||
} |
||||
grpc_metadata_array_destroy(arr); |
||||
grpc_metadata_array_init(arr); |
||||
} |
||||
|
||||
// TODO(yangg) if the map is changed before we send, the pointers will be a
|
||||
// mess. Make sure it does not happen.
|
||||
grpc_metadata* FillMetadataArray( |
||||
const std::multimap<grpc::string, grpc::string>& metadata) { |
||||
if (metadata.empty()) { |
||||
return nullptr; |
||||
} |
||||
grpc_metadata* metadata_array = |
||||
(grpc_metadata*)gpr_malloc(metadata.size() * sizeof(grpc_metadata)); |
||||
size_t i = 0; |
||||
for (auto iter = metadata.cbegin(); iter != metadata.cend(); ++iter, ++i) { |
||||
metadata_array[i].key = iter->first.c_str(); |
||||
metadata_array[i].value = iter->second.c_str(); |
||||
metadata_array[i].value_length = iter->second.size(); |
||||
} |
||||
return metadata_array; |
||||
} |
||||
|
||||
Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq) |
||||
: call_hook_(call_hook), cq_(cq), call_(call), max_message_size_(-1) {} |
||||
|
||||
Call::Call(grpc_call* call, CallHook* call_hook, CompletionQueue* cq, |
||||
int max_message_size) |
||||
: call_hook_(call_hook), |
||||
cq_(cq), |
||||
call_(call), |
||||
max_message_size_(max_message_size) {} |
||||
|
||||
void Call::PerformOps(CallOpSetInterface* ops) { |
||||
if (max_message_size_ > 0) { |
||||
ops->set_max_message_size(max_message_size_); |
||||
} |
||||
call_hook_->PerformOpsOnCall(ops, this); |
||||
} |
||||
|
||||
} // namespace grpc
|
@ -0,0 +1,71 @@ |
||||
/*
|
||||
* |
||||
* Copyright 2016, Google Inc. |
||||
* All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are |
||||
* met: |
||||
* |
||||
* * Redistributions of source code must retain the above copyright |
||||
* notice, this list of conditions and the following disclaimer. |
||||
* * Redistributions in binary form must reproduce the above |
||||
* copyright notice, this list of conditions and the following disclaimer |
||||
* in the documentation and/or other materials provided with the |
||||
* distribution. |
||||
* * Neither the name of Google Inc. nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* |
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
||||
* |
||||
*/ |
||||
|
||||
// This file should be compiled as part of grpc++.
|
||||
|
||||
#include <grpc++/impl/codegen/core_codegen_interface.h> |
||||
#include <grpc/impl/codegen/grpc_types.h> |
||||
#include <grpc/byte_buffer.h> |
||||
|
||||
namespace grpc { |
||||
|
||||
/// Implementation of the core codegen interface.
|
||||
class CoreCodegen : public CoreCodegenInterface { |
||||
private: |
||||
Status SerializeProto(const grpc::protobuf::Message& msg, |
||||
grpc_byte_buffer** bp) override; |
||||
|
||||
Status DeserializeProto(grpc_byte_buffer* buffer, |
||||
grpc::protobuf::Message* msg, |
||||
int max_message_size) override; |
||||
|
||||
grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; |
||||
void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; |
||||
grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, |
||||
gpr_timespec deadline, |
||||
void* reserved) override; |
||||
|
||||
void* gpr_malloc(size_t size) override; |
||||
void gpr_free(void* p) override; |
||||
|
||||
void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; |
||||
|
||||
void grpc_metadata_array_init(grpc_metadata_array* array) override; |
||||
void grpc_metadata_array_destroy(grpc_metadata_array* array) override; |
||||
|
||||
gpr_timespec gpr_inf_future(gpr_clock_type type) override; |
||||
|
||||
void assert_fail(const char* failed_assertion) override; |
||||
}; |
||||
|
||||
} // namespace grpc
|
@ -1,13 +1,16 @@ |
||||
buildgen: template renderer for our build system. |
||||
buildgen: Template renderer for our build system. |
||||
|
||||
distrib: scripts to distribute language-specific packages. |
||||
distrib: Scripts to distribute language-specific packages. |
||||
|
||||
dockerfile: Docker files to test gRPC. |
||||
|
||||
doxygen: gRPC C/C++ documentation generation via Doxygen. |
||||
|
||||
gce: scripts to help setup testing infrastructure on GCE. |
||||
gce: Scripts to help setup testing infrastructure on GCE. |
||||
|
||||
jenkins: support for running tests on Jenkins. |
||||
gcp: Helper scripts for interacting with various services on GCP (like Google |
||||
container engine, BigQuery etc) |
||||
|
||||
run_tests: scripts to run gRPC tests in parallel. |
||||
jenkins: Support for running tests on Jenkins. |
||||
|
||||
run_tests: Scripts to run gRPC tests in parallel. |
||||
|
@ -0,0 +1,215 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}</ProjectGuid> |
||||
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||
<PlatformToolset>v100</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||
<PlatformToolset>v110</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||
<PlatformToolset>v120</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||
<PlatformToolset>v140</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>StaticLibrary</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>StaticLibrary</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>grpc++_codegen_lib</TargetName> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>grpc++_codegen_lib</TargetName> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Windows</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Windows</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Windows</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Windows</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemGroup> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_win32.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_win32.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h" /> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h" /> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
</ImportGroup> |
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||
<PropertyGroup> |
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||
</PropertyGroup> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,200 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\src\cpp\codegen\codegen_init.cc"> |
||||
<Filter>src\cpp\codegen</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_win32.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_win32.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_stream.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\async_unary_call.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\call_hook.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\channel_interface.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_context.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\client_unary_call.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\completion_queue_tag.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\config_protobuf.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\core_codegen_interface.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\grpc_library.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\method_handler_impl.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\proto_utils.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_method.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\rpc_service_method.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\security\auth_context.h"> |
||||
<Filter>include\grpc++\impl\codegen\security</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\serialization_traits.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_context.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\server_interface.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\service_type.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\status_code_enum.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\string_ref.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\stub_options.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_cxx11.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_no_cxx11.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\sync_stream.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc++\impl\codegen\time.h"> |
||||
<Filter>include\grpc++\impl\codegen</Filter> |
||||
</ClInclude> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="include"> |
||||
<UniqueIdentifier>{cf409044-341b-37b5-03f3-0b09c3c474c4}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc"> |
||||
<UniqueIdentifier>{cddccffd-da89-18ad-da57-0c9d704a4633}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc++"> |
||||
<UniqueIdentifier>{cb8cb5ad-cf23-a491-046c-1c0688be53ac}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc++\impl"> |
||||
<UniqueIdentifier>{a734ff7f-2489-0c04-3fc6-35e361240cf1}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc++\impl\codegen"> |
||||
<UniqueIdentifier>{ffc473f2-ece4-fedf-238f-f161e5c3d5e7}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc++\impl\codegen\security"> |
||||
<UniqueIdentifier>{89065a9e-e4a0-e5e4-32e9-51cd4cadab46}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc\impl"> |
||||
<UniqueIdentifier>{45ab28cb-74e7-1a53-77c1-bbf2ec383fa2}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc\impl\codegen"> |
||||
<UniqueIdentifier>{311586c5-1a08-e1ba-8dd8-d1cbe10156b3}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src"> |
||||
<UniqueIdentifier>{e9bdb195-1cf9-a0f4-231c-fcee59eb54ca}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src\cpp"> |
||||
<UniqueIdentifier>{d2e57ea3-c758-0f7c-3bc9-e71dd87bd654}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src\cpp\codegen"> |
||||
<UniqueIdentifier>{f93ade18-7c50-7ed9-b8e7-383b11f077c2}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
@ -0,0 +1,81 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\alloc.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_atomic.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_gcc_sync.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\atm_win32.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\log.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\port_platform.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\slice_buffer.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_generic.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_posix.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\sync_win32.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\time.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\byte_buffer.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\compression_types.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\connectivity_state.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\grpc_types.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\propagation_bits.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
<ClInclude Include="$(SolutionDir)\..\include\grpc\impl\codegen\status.h"> |
||||
<Filter>include\grpc\impl\codegen</Filter> |
||||
</ClInclude> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="include"> |
||||
<UniqueIdentifier>{1fe03afe-0c52-a706-2c50-4ea691805d81}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc"> |
||||
<UniqueIdentifier>{386f8a29-15ac-1f26-30ee-d9a605a802be}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc\impl"> |
||||
<UniqueIdentifier>{9828c5d3-4dc2-f116-97bf-015089243c94}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="include\grpc\impl\codegen"> |
||||
<UniqueIdentifier>{0e88ed03-ed1e-49c0-15d7-69934b433494}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
@ -0,0 +1,240 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\1.0.204.1.props')" /> |
||||
<ItemGroup Label="ProjectConfigurations"> |
||||
<ProjectConfiguration Include="Debug|Win32"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Debug|x64"> |
||||
<Configuration>Debug</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|Win32"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>Win32</Platform> |
||||
</ProjectConfiguration> |
||||
<ProjectConfiguration Include="Release|x64"> |
||||
<Configuration>Release</Configuration> |
||||
<Platform>x64</Platform> |
||||
</ProjectConfiguration> |
||||
</ItemGroup> |
||||
<PropertyGroup Label="Globals"> |
||||
<ProjectGuid>{07D92FF8-D0D1-CB1B-51D3-EBA0E5DEBDD7}</ProjectGuid> |
||||
<IgnoreWarnIntDirInTempDetected>true</IgnoreWarnIntDirInTempDetected> |
||||
<IntDir>$(SolutionDir)IntDir\$(MSBuildProjectName)\</IntDir> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '10.0'" Label="Configuration"> |
||||
<PlatformToolset>v100</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '11.0'" Label="Configuration"> |
||||
<PlatformToolset>v110</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '12.0'" Label="Configuration"> |
||||
<PlatformToolset>v120</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(VisualStudioVersion)' == '14.0'" Label="Configuration"> |
||||
<PlatformToolset>v140</PlatformToolset> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>true</UseDebugLibraries> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration"> |
||||
<ConfigurationType>Application</ConfigurationType> |
||||
<UseDebugLibraries>false</UseDebugLibraries> |
||||
<WholeProgramOptimization>true</WholeProgramOptimization> |
||||
<CharacterSet>Unicode</CharacterSet> |
||||
</PropertyGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> |
||||
<ImportGroup Label="ExtensionSettings"> |
||||
</ImportGroup> |
||||
<ImportGroup Label="PropertySheets"> |
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\cpptest.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\global.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\openssl.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\protobuf.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\winsock.props" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\zlib.props" /> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Debug'"> |
||||
<TargetName>codegen_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Debug</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Debug</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<PropertyGroup Condition="'$(Configuration)'=='Release'"> |
||||
<TargetName>codegen_test</TargetName> |
||||
<Linkage-grpc_dependencies_zlib>static</Linkage-grpc_dependencies_zlib> |
||||
<Configuration-grpc_dependencies_zlib>Release</Configuration-grpc_dependencies_zlib> |
||||
<Linkage-grpc_dependencies_openssl>static</Linkage-grpc_dependencies_openssl> |
||||
<Configuration-grpc_dependencies_openssl>Release</Configuration-grpc_dependencies_openssl> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>Disabled</Optimization> |
||||
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> |
||||
<ClCompile> |
||||
<PrecompiledHeader>NotUsing</PrecompiledHeader> |
||||
<WarningLevel>Level3</WarningLevel> |
||||
<Optimization>MaxSpeed</Optimization> |
||||
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
||||
<FunctionLevelLinking>true</FunctionLevelLinking> |
||||
<IntrinsicFunctions>true</IntrinsicFunctions> |
||||
<SDLCheck>true</SDLCheck> |
||||
<RuntimeLibrary>MultiThreaded</RuntimeLibrary> |
||||
<TreatWarningAsError>true</TreatWarningAsError> |
||||
<DebugInformationFormat Condition="$(Jenkins)">None</DebugInformationFormat> |
||||
<MinimalRebuild Condition="$(Jenkins)">false</MinimalRebuild> |
||||
</ClCompile> |
||||
<Link> |
||||
<SubSystem>Console</SubSystem> |
||||
<GenerateDebugInformation Condition="!$(Jenkins)">true</GenerateDebugInformation> |
||||
<GenerateDebugInformation Condition="$(Jenkins)">false</GenerateDebugInformation> |
||||
<EnableCOMDATFolding>true</EnableCOMDATFolding> |
||||
<OptimizeReferences>true</OptimizeReferences> |
||||
</Link> |
||||
</ItemDefinitionGroup> |
||||
|
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\control.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\control.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\control.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\control.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\payloads.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\payloads.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\payloads.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\payloads.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\perf_db.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\perf_db.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\perf_db.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\perf_db.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\services.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\services.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\services.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\services.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\stats.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\stats.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\stats.grpc.pb.cc"> |
||||
</ClCompile> |
||||
<ClInclude Include="$(SolutionDir)\..\src\proto\grpc\testing\stats.grpc.pb.h"> |
||||
</ClInclude> |
||||
<ClCompile Include="$(SolutionDir)\..\test\cpp\codegen\codegen_test.cc"> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<ProjectReference Include="$(SolutionDir)\..\vsprojects\vcxproj\.\grpc++_codegen_lib\grpc++_codegen_lib.vcxproj"> |
||||
<Project>{AAC6AF12-94C8-4A3C-A1BF-DAA4738F4500}</Project> |
||||
</ProjectReference> |
||||
</ItemGroup> |
||||
<ItemGroup> |
||||
<None Include="packages.config" /> |
||||
</ItemGroup> |
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> |
||||
<ImportGroup Label="ExtensionTargets"> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies\grpc.dependencies.zlib.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
<Import Project="$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets" Condition="Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies\grpc.dependencies.openssl.targets')" /> |
||||
</ImportGroup> |
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
||||
<PropertyGroup> |
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText> |
||||
</PropertyGroup> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.redist.1.2.8.10\build\native\grpc.dependencies.zlib.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.zlib.1.2.8.10\build\native\grpc.dependencies.zlib.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.redist.1.0.204.1\build\native\grpc.dependencies.openssl.redist.targets')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.props')" /> |
||||
<Error Condition="!Exists('$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" Text="$([System.String]::Format('$(ErrorText)', '$(SolutionDir)\..\vsprojects\packages\grpc.dependencies.openssl.1.0.204.1\build\native\grpc.dependencies.openssl.targets')" /> |
||||
</Target> |
||||
</Project> |
||||
|
@ -0,0 +1,51 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\control.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\messages.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\payloads.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\perf_db.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\services.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\src\proto\grpc\testing\stats.proto"> |
||||
<Filter>src\proto\grpc\testing</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\test\cpp\codegen\codegen_test.cc"> |
||||
<Filter>test\cpp\codegen</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="src"> |
||||
<UniqueIdentifier>{a37f6960-8f92-51ed-9b99-d24970584bb2}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src\proto"> |
||||
<UniqueIdentifier>{dc3f4032-f0dc-f8f0-e07a-78c0f628e9f5}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src\proto\grpc"> |
||||
<UniqueIdentifier>{250aede7-067f-590b-42d7-15939da4a59d}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="src\proto\grpc\testing"> |
||||
<UniqueIdentifier>{57f4543e-acd0-a4a0-f3c3-8494e509b2b3}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{7337b395-7e96-f49b-0a4f-b8a70be23a57}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\cpp"> |
||||
<UniqueIdentifier>{cf9e3404-0ab9-a301-9715-728febcece23}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\cpp\codegen"> |
||||
<UniqueIdentifier>{d349ac75-02e7-cb63-92f1-1785a74c0561}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
@ -1,30 +0,0 @@ |
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ItemGroup> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\data\test_root_cert.c"> |
||||
<Filter>test\core\end2end\data</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\data\server1_cert.c"> |
||||
<Filter>test\core\end2end\data</Filter> |
||||
</ClCompile> |
||||
<ClCompile Include="$(SolutionDir)\..\test\core\end2end\data\server1_key.c"> |
||||
<Filter>test\core\end2end\data</Filter> |
||||
</ClCompile> |
||||
</ItemGroup> |
||||
|
||||
<ItemGroup> |
||||
<Filter Include="test"> |
||||
<UniqueIdentifier>{c94707fc-9ae9-9cc3-8743-77776eb9d9cc}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core"> |
||||
<UniqueIdentifier>{f91d3831-d4bb-0981-77a4-16d8c5be07e9}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\end2end"> |
||||
<UniqueIdentifier>{afbaeee0-7ab8-872c-8c47-3e3e5a8cc5e3}</UniqueIdentifier> |
||||
</Filter> |
||||
<Filter Include="test\core\end2end\data"> |
||||
<UniqueIdentifier>{5e4bc33c-7867-c329-d107-009b198f97dc}</UniqueIdentifier> |
||||
</Filter> |
||||
</ItemGroup> |
||||
</Project> |
||||
|
Loading…
Reference in new issue