mirror of
https://github.com/unclechu/gRPC-haskell.git
synced 2024-11-18 00:59:42 +01:00
ce56953b24
* initial echo client/server examples * registered and unregistered versions of the example client * ignore pyc files * cpp echo code, flag to build examples * threaded server example
183 lines
6.1 KiB
C++
183 lines
6.1 KiB
C++
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
|
// source: echo.proto
|
|
|
|
#ifndef PROTOBUF_echo_2eproto__INCLUDED
|
|
#define PROTOBUF_echo_2eproto__INCLUDED
|
|
|
|
#include <string>
|
|
|
|
#include <google/protobuf/stubs/common.h>
|
|
|
|
#if GOOGLE_PROTOBUF_VERSION < 3000000
|
|
#error This file was generated by a newer version of protoc which is
|
|
#error incompatible with your Protocol Buffer headers. Please update
|
|
#error your headers.
|
|
#endif
|
|
#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
|
|
#error This file was generated by an older version of protoc which is
|
|
#error incompatible with your Protocol Buffer headers. Please
|
|
#error regenerate this file with a newer version of protoc.
|
|
#endif
|
|
|
|
#include <google/protobuf/arena.h>
|
|
#include <google/protobuf/arenastring.h>
|
|
#include <google/protobuf/generated_message_util.h>
|
|
#include <google/protobuf/metadata.h>
|
|
#include <google/protobuf/message.h>
|
|
#include <google/protobuf/repeated_field.h>
|
|
#include <google/protobuf/extension_set.h>
|
|
#include <google/protobuf/unknown_field_set.h>
|
|
// @@protoc_insertion_point(includes)
|
|
|
|
namespace echo {
|
|
|
|
// Internal implementation detail -- do not call these.
|
|
void protobuf_AddDesc_echo_2eproto();
|
|
void protobuf_AssignDesc_echo_2eproto();
|
|
void protobuf_ShutdownFile_echo_2eproto();
|
|
|
|
class EchoRequest;
|
|
|
|
// ===================================================================
|
|
|
|
class EchoRequest : public ::google::protobuf::Message {
|
|
public:
|
|
EchoRequest();
|
|
virtual ~EchoRequest();
|
|
|
|
EchoRequest(const EchoRequest& from);
|
|
|
|
inline EchoRequest& operator=(const EchoRequest& from) {
|
|
CopyFrom(from);
|
|
return *this;
|
|
}
|
|
|
|
static const ::google::protobuf::Descriptor* descriptor();
|
|
static const EchoRequest& default_instance();
|
|
|
|
void Swap(EchoRequest* other);
|
|
|
|
// implements Message ----------------------------------------------
|
|
|
|
inline EchoRequest* New() const { return New(NULL); }
|
|
|
|
EchoRequest* New(::google::protobuf::Arena* arena) const;
|
|
void CopyFrom(const ::google::protobuf::Message& from);
|
|
void MergeFrom(const ::google::protobuf::Message& from);
|
|
void CopyFrom(const EchoRequest& from);
|
|
void MergeFrom(const EchoRequest& from);
|
|
void Clear();
|
|
bool IsInitialized() const;
|
|
|
|
int ByteSize() const;
|
|
bool MergePartialFromCodedStream(
|
|
::google::protobuf::io::CodedInputStream* input);
|
|
void SerializeWithCachedSizes(
|
|
::google::protobuf::io::CodedOutputStream* output) const;
|
|
::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
|
|
int GetCachedSize() const { return _cached_size_; }
|
|
private:
|
|
void SharedCtor();
|
|
void SharedDtor();
|
|
void SetCachedSize(int size) const;
|
|
void InternalSwap(EchoRequest* other);
|
|
private:
|
|
inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
|
|
return _internal_metadata_.arena();
|
|
}
|
|
inline void* MaybeArenaPtr() const {
|
|
return _internal_metadata_.raw_arena_ptr();
|
|
}
|
|
public:
|
|
|
|
::google::protobuf::Metadata GetMetadata() const;
|
|
|
|
// nested types ----------------------------------------------------
|
|
|
|
// accessors -------------------------------------------------------
|
|
|
|
// optional string message = 1;
|
|
void clear_message();
|
|
static const int kMessageFieldNumber = 1;
|
|
const ::std::string& message() const;
|
|
void set_message(const ::std::string& value);
|
|
void set_message(const char* value);
|
|
void set_message(const char* value, size_t size);
|
|
::std::string* mutable_message();
|
|
::std::string* release_message();
|
|
void set_allocated_message(::std::string* message);
|
|
|
|
// @@protoc_insertion_point(class_scope:echo.EchoRequest)
|
|
private:
|
|
|
|
::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
|
|
bool _is_default_instance_;
|
|
::google::protobuf::internal::ArenaStringPtr message_;
|
|
mutable int _cached_size_;
|
|
friend void protobuf_AddDesc_echo_2eproto();
|
|
friend void protobuf_AssignDesc_echo_2eproto();
|
|
friend void protobuf_ShutdownFile_echo_2eproto();
|
|
|
|
void InitAsDefaultInstance();
|
|
static EchoRequest* default_instance_;
|
|
};
|
|
// ===================================================================
|
|
|
|
|
|
// ===================================================================
|
|
|
|
#if !PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
// EchoRequest
|
|
|
|
// optional string message = 1;
|
|
inline void EchoRequest::clear_message() {
|
|
message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline const ::std::string& EchoRequest::message() const {
|
|
// @@protoc_insertion_point(field_get:echo.EchoRequest.message)
|
|
return message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline void EchoRequest::set_message(const ::std::string& value) {
|
|
|
|
message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
|
|
// @@protoc_insertion_point(field_set:echo.EchoRequest.message)
|
|
}
|
|
inline void EchoRequest::set_message(const char* value) {
|
|
|
|
message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
|
|
// @@protoc_insertion_point(field_set_char:echo.EchoRequest.message)
|
|
}
|
|
inline void EchoRequest::set_message(const char* value, size_t size) {
|
|
|
|
message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
|
|
::std::string(reinterpret_cast<const char*>(value), size));
|
|
// @@protoc_insertion_point(field_set_pointer:echo.EchoRequest.message)
|
|
}
|
|
inline ::std::string* EchoRequest::mutable_message() {
|
|
|
|
// @@protoc_insertion_point(field_mutable:echo.EchoRequest.message)
|
|
return message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline ::std::string* EchoRequest::release_message() {
|
|
|
|
return message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
|
|
}
|
|
inline void EchoRequest::set_allocated_message(::std::string* message) {
|
|
if (message != NULL) {
|
|
|
|
} else {
|
|
|
|
}
|
|
message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), message);
|
|
// @@protoc_insertion_point(field_set_allocated:echo.EchoRequest.message)
|
|
}
|
|
|
|
#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
|
|
|
|
// @@protoc_insertion_point(namespace_scope)
|
|
|
|
} // namespace echo
|
|
|
|
// @@protoc_insertion_point(global_scope)
|
|
|
|
#endif // PROTOBUF_echo_2eproto__INCLUDED
|