diff options
Diffstat (limited to 'include/grpc++/impl/codegen/serialization_traits.h')
-rw-r--r-- | include/grpc++/impl/codegen/serialization_traits.h | 46 |
1 files changed, 6 insertions, 40 deletions
diff --git a/include/grpc++/impl/codegen/serialization_traits.h b/include/grpc++/impl/codegen/serialization_traits.h index 4d91739cc4..480575d109 100644 --- a/include/grpc++/impl/codegen/serialization_traits.h +++ b/include/grpc++/impl/codegen/serialization_traits.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015 gRPC authors. + * Copyright 2018 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -16,47 +16,13 @@ * */ +// DEPRECATED: The headers in include/grpc++ are deprecated. Please include the +// headers in include/grpcpp instead. This header exists only for backwards +// compatibility. + #ifndef GRPCXX_IMPL_CODEGEN_SERIALIZATION_TRAITS_H #define GRPCXX_IMPL_CODEGEN_SERIALIZATION_TRAITS_H -namespace grpc { - -/// Defines how to serialize and deserialize some type. -/// -/// Used for hooking different message serialization API's into GRPC. -/// Each SerializationTraits<Message> implementation must provide the -/// following functions: -/// 1. static Status Serialize(const Message& msg, -/// ByteBuffer* buffer, -/// bool* own_buffer); -/// OR -/// static Status Serialize(const Message& msg, -/// grpc_byte_buffer** buffer, -/// bool* own_buffer); -/// The former is preferred; the latter is deprecated -/// -/// 2. static Status Deserialize(ByteBuffer* buffer, -/// Message* msg); -/// OR -/// static Status Deserialize(grpc_byte_buffer* buffer, -/// Message* msg); -/// The former is preferred; the latter is deprecated -/// -/// Serialize is required to convert message to a ByteBuffer, and -/// return that byte buffer through *buffer. *own_buffer should -/// be set to true if the caller owns said byte buffer, or false if -/// ownership is retained elsewhere. -/// -/// Deserialize is required to convert buffer into the message stored at -/// msg. max_receive_message_size is passed in as a bound on the maximum -/// number of message bytes Deserialize should accept. -/// -/// Both functions return a Status, allowing them to explain what went -/// wrong if required. -template <class Message, - class UnusedButHereForPartialTemplateSpecialization = void> -class SerializationTraits; - -} // namespace grpc +#include <grpcpp/impl/codegen/serialization_traits.h> #endif // GRPCXX_IMPL_CODEGEN_SERIALIZATION_TRAITS_H |