From ccf74413d859a25bd1e79682a6a3e4537d83d200 Mon Sep 17 00:00:00 2001 From: DragonAura Date: Sat, 19 Nov 2022 23:01:23 +0800 Subject: [PATCH] feat(proto): :sparkles: add human status enum --- CAPI/proto/Message2Clients.pb.cc | 84 +-- CAPI/proto/Message2Clients.pb.h | 78 +-- CAPI/proto/MessageType.pb.cc | 57 +- CAPI/proto/MessageType.pb.h | 42 ++ CAPI/proto/Services.grpc.pb.cc | 204 +++++-- CAPI/proto/Services.grpc.pb.h | 771 ++++++++++++++++++++----- CAPI/proto/Services.pb.cc | 27 +- dependency/proto/Message2Clients.proto | 3 +- dependency/proto/MessageType.proto | 10 + dependency/proto/Services.proto | 6 +- 10 files changed, 951 insertions(+), 331 deletions(-) diff --git a/CAPI/proto/Message2Clients.pb.cc b/CAPI/proto/Message2Clients.pb.cc index b4ccac1..51b174f 100644 --- a/CAPI/proto/Message2Clients.pb.cc +++ b/CAPI/proto/Message2Clients.pb.cc @@ -26,7 +26,7 @@ namespace protobuf ::_pbi::ConstantInitialized ) : _impl_{ - /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.life_)*/ 0, /*decltype(_impl_.time_until_skill_available_)*/ 0, /*decltype(_impl_.hanged_time_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.prop_)*/ 0, /*decltype(_impl_.human_type_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.chair_time_)*/ 0, /*decltype(_impl_.on_chair_)*/ false, /*decltype(_impl_.on_ground_)*/ false, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.ground_time_)*/ 0, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} + /*decltype(_impl_.buff_)*/ {}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, /*decltype(_impl_.x_)*/ 0, /*decltype(_impl_.y_)*/ 0, /*decltype(_impl_.speed_)*/ 0, /*decltype(_impl_.life_)*/ 0, /*decltype(_impl_.time_until_skill_available_)*/ 0, /*decltype(_impl_.hanged_time_)*/ 0, /*decltype(_impl_.place_)*/ 0, /*decltype(_impl_.prop_)*/ 0, /*decltype(_impl_.human_type_)*/ 0, /*decltype(_impl_.guid_)*/ int64_t{0}, /*decltype(_impl_.chair_time_)*/ 0, /*decltype(_impl_.state_)*/ 0, /*decltype(_impl_.view_range_)*/ 0, /*decltype(_impl_.ground_time_)*/ 0, /*decltype(_impl_.player_id_)*/ int64_t{0}, /*decltype(_impl_.radius_)*/ 0, /*decltype(_impl_._cached_size_)*/ {}} { } struct MessageOfHumanDefaultTypeInternal @@ -264,9 +264,8 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.prop_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.human_type_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.guid_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.on_chair_), + PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.state_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.chair_time_), - PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.on_ground_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.ground_time_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.player_id_), PROTOBUF_FIELD_OFFSET(::protobuf::MessageOfHuman, _impl_.view_range_), @@ -369,15 +368,15 @@ const uint32_t TableStruct_Message2Clients_2eproto::offsets[] PROTOBUF_SECTION_V }; static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { {0, -1, -1, sizeof(::protobuf::MessageOfHuman)}, - {24, -1, -1, sizeof(::protobuf::MessageOfButcher)}, - {44, -1, -1, sizeof(::protobuf::MessageOfProp)}, - {58, -1, -1, sizeof(::protobuf::MessageOfPickedProp)}, - {69, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, - {76, -1, -1, sizeof(::protobuf::MessageOfMap)}, - {83, -1, -1, sizeof(::protobuf::MessageToClient)}, - {93, -1, -1, sizeof(::protobuf::MoveRes)}, - {102, -1, -1, sizeof(::protobuf::BoolRes)}, - {109, -1, -1, sizeof(::protobuf::MsgRes)}, + {23, -1, -1, sizeof(::protobuf::MessageOfButcher)}, + {43, -1, -1, sizeof(::protobuf::MessageOfProp)}, + {57, -1, -1, sizeof(::protobuf::MessageOfPickedProp)}, + {68, -1, -1, sizeof(::protobuf::MessageOfMap_Row)}, + {75, -1, -1, sizeof(::protobuf::MessageOfMap)}, + {82, -1, -1, sizeof(::protobuf::MessageToClient)}, + {92, -1, -1, sizeof(::protobuf::MoveRes)}, + {101, -1, -1, sizeof(::protobuf::BoolRes)}, + {108, -1, -1, sizeof(::protobuf::MsgRes)}, }; static const ::_pb::Message* const file_default_instances[] = { @@ -401,9 +400,9 @@ const char descriptor_table_protodef_Message2Clients_2eproto[] PROTOBUF_SECTION_ "ill_available\030\006 \001(\001\022\"\n\005place\030\007 \001(\0162\023.pro" "tobuf.PlaceType\022 \n\004prop\030\010 \001(\0162\022.protobuf" ".PropType\022\'\n\nhuman_type\030\t \001(\0162\023.protobuf" - ".HumanType\022\014\n\004guid\030\n \001(\003\022\020\n\010on_chair\030\013 \001" - "(\010\022\022\n\nchair_time\030\014 \001(\001\022\021\n\ton_ground\030\r \001(" - "\010\022\023\n\013ground_time\030\016 \001(\001\022\021\n\tplayer_id\030\017 \001(" + ".HumanType\022\014\n\004guid\030\n \001(\003\022#\n\005state\030\013 \001(\0162" + "\024.protobuf.HumanState\022\022\n\nchair_time\030\014 \001(" + "\001\022\023\n\013ground_time\030\016 \001(\001\022\021\n\tplayer_id\030\017 \001(" "\003\022\022\n\nview_range\030\020 \001(\005\022\016\n\006radius\030\021 \001(\005\022%\n" "\004buff\030\022 \003(\0162\027.protobuf.HumanBuffType\"\335\002\n" "\020MessageOfButcher\022\t\n\001x\030\001 \001(\005\022\t\n\001y\030\002 \001(\005\022" @@ -486,7 +485,7 @@ namespace protobuf MessageOfHuman* const _this = this; (void)_this; new (&_impl_) Impl_{ - decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.life_){}, decltype(_impl_.time_until_skill_available_){}, decltype(_impl_.hanged_time_){}, decltype(_impl_.place_){}, decltype(_impl_.prop_){}, decltype(_impl_.human_type_){}, decltype(_impl_.guid_){}, decltype(_impl_.chair_time_){}, decltype(_impl_.on_chair_){}, decltype(_impl_.on_ground_){}, decltype(_impl_.view_range_){}, decltype(_impl_.ground_time_){}, decltype(_impl_.player_id_){}, decltype(_impl_.radius_){}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.buff_){from._impl_.buff_}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){}, decltype(_impl_.y_){}, decltype(_impl_.speed_){}, decltype(_impl_.life_){}, decltype(_impl_.time_until_skill_available_){}, decltype(_impl_.hanged_time_){}, decltype(_impl_.place_){}, decltype(_impl_.prop_){}, decltype(_impl_.human_type_){}, decltype(_impl_.guid_){}, decltype(_impl_.chair_time_){}, decltype(_impl_.state_){}, decltype(_impl_.view_range_){}, decltype(_impl_.ground_time_){}, decltype(_impl_.player_id_){}, decltype(_impl_.radius_){}, /*decltype(_impl_._cached_size_)*/ {}}; _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); ::memcpy(&_impl_.x_, &from._impl_.x_, static_cast(reinterpret_cast(&_impl_.radius_) - reinterpret_cast(&_impl_.x_)) + sizeof(_impl_.radius_)); @@ -500,7 +499,7 @@ namespace protobuf (void)arena; (void)is_message_owned; new (&_impl_) Impl_{ - decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.life_){0}, decltype(_impl_.time_until_skill_available_){0}, decltype(_impl_.hanged_time_){0}, decltype(_impl_.place_){0}, decltype(_impl_.prop_){0}, decltype(_impl_.human_type_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.chair_time_){0}, decltype(_impl_.on_chair_){false}, decltype(_impl_.on_ground_){false}, decltype(_impl_.view_range_){0}, decltype(_impl_.ground_time_){0}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.radius_){0}, /*decltype(_impl_._cached_size_)*/ {}}; + decltype(_impl_.buff_){arena}, /*decltype(_impl_._buff_cached_byte_size_)*/ {0}, decltype(_impl_.x_){0}, decltype(_impl_.y_){0}, decltype(_impl_.speed_){0}, decltype(_impl_.life_){0}, decltype(_impl_.time_until_skill_available_){0}, decltype(_impl_.hanged_time_){0}, decltype(_impl_.place_){0}, decltype(_impl_.prop_){0}, decltype(_impl_.human_type_){0}, decltype(_impl_.guid_){int64_t{0}}, decltype(_impl_.chair_time_){0}, decltype(_impl_.state_){0}, decltype(_impl_.view_range_){0}, decltype(_impl_.ground_time_){0}, decltype(_impl_.player_id_){int64_t{0}}, decltype(_impl_.radius_){0}, /*decltype(_impl_._cached_size_)*/ {}}; } MessageOfHuman::~MessageOfHuman() @@ -651,12 +650,13 @@ namespace protobuf else goto handle_unusual; continue; - // bool on_chair = 11; + // .protobuf.HumanState state = 11; case 11: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { - _impl_.on_chair_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); CHK_(ptr); + _internal_set_state(static_cast<::protobuf::HumanState>(val)); } else goto handle_unusual; @@ -671,16 +671,6 @@ namespace protobuf else goto handle_unusual; continue; - // bool on_ground = 13; - case 13: - if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 104)) - { - _impl_.on_ground_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); - CHK_(ptr); - } - else - goto handle_unusual; - continue; // double ground_time = 14; case 14: if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 113)) @@ -851,11 +841,13 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteInt64ToArray(10, this->_internal_guid(), target); } - // bool on_chair = 11; - if (this->_internal_on_chair() != 0) + // .protobuf.HumanState state = 11; + if (this->_internal_state() != 0) { target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_on_chair(), target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 11, this->_internal_state(), target + ); } // double chair_time = 12; @@ -869,13 +861,6 @@ namespace protobuf target = ::_pbi::WireFormatLite::WriteDoubleToArray(12, this->_internal_chair_time(), target); } - // bool on_ground = 13; - if (this->_internal_on_ground() != 0) - { - target = stream->EnsureSpace(target); - target = ::_pbi::WireFormatLite::WriteBoolToArray(13, this->_internal_on_ground(), target); - } - // double ground_time = 14; static_assert(sizeof(uint64_t) == sizeof(double), "Code assumes uint64_t and double are the same size."); double tmp_ground_time = this->_internal_ground_time(); @@ -1035,16 +1020,11 @@ namespace protobuf total_size += 1 + 8; } - // bool on_chair = 11; - if (this->_internal_on_chair() != 0) + // .protobuf.HumanState state = 11; + if (this->_internal_state() != 0) { - total_size += 1 + 1; - } - - // bool on_ground = 13; - if (this->_internal_on_ground() != 0) - { - total_size += 1 + 1; + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_state()); } // int32 view_range = 16; @@ -1154,13 +1134,9 @@ namespace protobuf { _this->_internal_set_chair_time(from._internal_chair_time()); } - if (from._internal_on_chair() != 0) - { - _this->_internal_set_on_chair(from._internal_on_chair()); - } - if (from._internal_on_ground() != 0) + if (from._internal_state() != 0) { - _this->_internal_set_on_ground(from._internal_on_ground()); + _this->_internal_set_state(from._internal_state()); } if (from._internal_view_range() != 0) { diff --git a/CAPI/proto/Message2Clients.pb.h b/CAPI/proto/Message2Clients.pb.h index 6585fad..dba5aca 100644 --- a/CAPI/proto/Message2Clients.pb.h +++ b/CAPI/proto/Message2Clients.pb.h @@ -277,8 +277,7 @@ namespace protobuf kHumanTypeFieldNumber = 9, kGuidFieldNumber = 10, kChairTimeFieldNumber = 12, - kOnChairFieldNumber = 11, - kOnGroundFieldNumber = 13, + kStateFieldNumber = 11, kViewRangeFieldNumber = 16, kGroundTimeFieldNumber = 14, kPlayerIdFieldNumber = 15, @@ -415,24 +414,14 @@ namespace protobuf void _internal_set_chair_time(double value); public: - // bool on_chair = 11; - void clear_on_chair(); - bool on_chair() const; - void set_on_chair(bool value); + // .protobuf.HumanState state = 11; + void clear_state(); + ::protobuf::HumanState state() const; + void set_state(::protobuf::HumanState value); private: - bool _internal_on_chair() const; - void _internal_set_on_chair(bool value); - - public: - // bool on_ground = 13; - void clear_on_ground(); - bool on_ground() const; - void set_on_ground(bool value); - - private: - bool _internal_on_ground() const; - void _internal_set_on_ground(bool value); + ::protobuf::HumanState _internal_state() const; + void _internal_set_state(::protobuf::HumanState value); public: // int32 view_range = 16; @@ -499,8 +488,7 @@ namespace protobuf int human_type_; int64_t guid_; double chair_time_; - bool on_chair_; - bool on_ground_; + int state_; int32_t view_range_; double ground_time_; int64_t player_id_; @@ -2955,28 +2943,28 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.guid) } - // bool on_chair = 11; - inline void MessageOfHuman::clear_on_chair() + // .protobuf.HumanState state = 11; + inline void MessageOfHuman::clear_state() { - _impl_.on_chair_ = false; + _impl_.state_ = 0; } - inline bool MessageOfHuman::_internal_on_chair() const + inline ::protobuf::HumanState MessageOfHuman::_internal_state() const { - return _impl_.on_chair_; + return static_cast<::protobuf::HumanState>(_impl_.state_); } - inline bool MessageOfHuman::on_chair() const + inline ::protobuf::HumanState MessageOfHuman::state() const { - // @@protoc_insertion_point(field_get:protobuf.MessageOfHuman.on_chair) - return _internal_on_chair(); + // @@protoc_insertion_point(field_get:protobuf.MessageOfHuman.state) + return _internal_state(); } - inline void MessageOfHuman::_internal_set_on_chair(bool value) + inline void MessageOfHuman::_internal_set_state(::protobuf::HumanState value) { - _impl_.on_chair_ = value; + _impl_.state_ = value; } - inline void MessageOfHuman::set_on_chair(bool value) + inline void MessageOfHuman::set_state(::protobuf::HumanState value) { - _internal_set_on_chair(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.on_chair) + _internal_set_state(value); + // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.state) } // double chair_time = 12; @@ -3003,30 +2991,6 @@ namespace protobuf // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.chair_time) } - // bool on_ground = 13; - inline void MessageOfHuman::clear_on_ground() - { - _impl_.on_ground_ = false; - } - inline bool MessageOfHuman::_internal_on_ground() const - { - return _impl_.on_ground_; - } - inline bool MessageOfHuman::on_ground() const - { - // @@protoc_insertion_point(field_get:protobuf.MessageOfHuman.on_ground) - return _internal_on_ground(); - } - inline void MessageOfHuman::_internal_set_on_ground(bool value) - { - _impl_.on_ground_ = value; - } - inline void MessageOfHuman::set_on_ground(bool value) - { - _internal_set_on_ground(value); - // @@protoc_insertion_point(field_set:protobuf.MessageOfHuman.on_ground) - } - // double ground_time = 14; inline void MessageOfHuman::clear_ground_time() { diff --git a/CAPI/proto/MessageType.pb.cc b/CAPI/proto/MessageType.pb.cc index 4386d9d..b5fe3d7 100644 --- a/CAPI/proto/MessageType.pb.cc +++ b/CAPI/proto/MessageType.pb.cc @@ -23,7 +23,7 @@ namespace _pbi = _pb::internal; namespace protobuf { } // namespace protobuf -static const ::_pb::EnumDescriptor* file_level_enum_descriptors_MessageType_2eproto[8]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_MessageType_2eproto[9]; static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_MessageType_2eproto = nullptr; const uint32_t TableStruct_MessageType_2eproto::offsets[1] = {}; static constexpr ::_pbi::MigrationSchema* schemas = nullptr; @@ -39,22 +39,24 @@ const char descriptor_table_protodef_MessageType_2eproto[] PROTOBUF_SECTION_VARI "PTYPE2\020\002\022\n\n\006PTYPE3\020\003\022\n\n\006PTYPE4\020\004*d\n\rHuma" "nBuffType\022\023\n\017NULL_HBUFF_TYPE\020\000\022\016\n\nHBUFFT" "YPE1\020\001\022\016\n\nHBUFFTYPE2\020\002\022\016\n\nHBUFFTYPE3\020\003\022\016" - "\n\nHBUFFTYPE4\020\004*f\n\017ButcherBuffType\022\023\n\017NUL" - "L_BBUFF_TYPE\020\000\022\016\n\nBBUFFTYPE1\020\001\022\016\n\nBBUFFT" - "YPE2\020\002\022\016\n\nBBUFFTYPE3\020\003\022\016\n\nBBUFFTYPE4\020\004*H" - "\n\nPlayerType\022\024\n\020NULL_PLAYER_TYPE\020\000\022\020\n\014HU" - "MAN_PLAYER\020\001\022\022\n\016BUTCHER_PLAYER\020\002*`\n\tHuma" - "nType\022\023\n\017NULL_HUMAN_TYPE\020\000\022\016\n\nHUMANTYPE1" - "\020\001\022\016\n\nHUMANTYPE2\020\002\022\016\n\nHUMANTYPE3\020\003\022\016\n\nHU" - "MANTYPE4\020\004*l\n\013ButcherType\022\025\n\021NULL_BUTCHE" - "R_TYPE\020\000\022\020\n\014BUTCHERTYPE1\020\001\022\020\n\014BUTCHERTYP" - "E2\020\002\022\020\n\014BUTCHERTYPE3\020\003\022\020\n\014BUTCHERTYPE4\020\004" - "b\006proto3"; + "\n\nHBUFFTYPE4\020\004*V\n\nHumanState\022\017\n\013NULL_STA" + "TUS\020\000\022\010\n\004IDLE\020\001\022\n\n\006FIXING\020\002\022\t\n\005DYING\020\003\022\014" + "\n\010ON_CHAIR\020\004\022\010\n\004DEAD\020\005*f\n\017ButcherBuffTyp" + "e\022\023\n\017NULL_BBUFF_TYPE\020\000\022\016\n\nBBUFFTYPE1\020\001\022\016" + "\n\nBBUFFTYPE2\020\002\022\016\n\nBBUFFTYPE3\020\003\022\016\n\nBBUFFT" + "YPE4\020\004*H\n\nPlayerType\022\024\n\020NULL_PLAYER_TYPE" + "\020\000\022\020\n\014HUMAN_PLAYER\020\001\022\022\n\016BUTCHER_PLAYER\020\002" + "*`\n\tHumanType\022\023\n\017NULL_HUMAN_TYPE\020\000\022\016\n\nHU" + "MANTYPE1\020\001\022\016\n\nHUMANTYPE2\020\002\022\016\n\nHUMANTYPE3" + "\020\003\022\016\n\nHUMANTYPE4\020\004*l\n\013ButcherType\022\025\n\021NUL" + "L_BUTCHER_TYPE\020\000\022\020\n\014BUTCHERTYPE1\020\001\022\020\n\014BU" + "TCHERTYPE2\020\002\022\020\n\014BUTCHERTYPE3\020\003\022\020\n\014BUTCHE" + "RTYPE4\020\004b\006proto3"; static ::_pbi::once_flag descriptor_table_MessageType_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_MessageType_2eproto = { false, false, - 768, + 856, descriptor_table_protodef_MessageType_2eproto, "MessageType.proto", &descriptor_table_MessageType_2eproto_once, @@ -157,11 +159,32 @@ namespace protobuf } } - const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherBuffType_descriptor() + const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanState_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); return file_level_enum_descriptors_MessageType_2eproto[4]; } + bool HumanState_IsValid(int value) + { + switch (value) + { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } + } + + const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherBuffType_descriptor() + { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); + return file_level_enum_descriptors_MessageType_2eproto[5]; + } bool ButcherBuffType_IsValid(int value) { switch (value) @@ -180,7 +203,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* PlayerType_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); - return file_level_enum_descriptors_MessageType_2eproto[5]; + return file_level_enum_descriptors_MessageType_2eproto[6]; } bool PlayerType_IsValid(int value) { @@ -198,7 +221,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanType_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); - return file_level_enum_descriptors_MessageType_2eproto[6]; + return file_level_enum_descriptors_MessageType_2eproto[7]; } bool HumanType_IsValid(int value) { @@ -218,7 +241,7 @@ namespace protobuf const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ButcherType_descriptor() { ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_MessageType_2eproto); - return file_level_enum_descriptors_MessageType_2eproto[7]; + return file_level_enum_descriptors_MessageType_2eproto[8]; } bool ButcherType_IsValid(int value) { diff --git a/CAPI/proto/MessageType.pb.h b/CAPI/proto/MessageType.pb.h index 3f01977..3c1d55c 100644 --- a/CAPI/proto/MessageType.pb.h +++ b/CAPI/proto/MessageType.pb.h @@ -178,6 +178,39 @@ namespace protobuf HumanBuffType_descriptor(), name, value ); } + enum HumanState : int + { + NULL_STATUS = 0, + IDLE = 1, + FIXING = 2, + DYING = 3, + ON_CHAIR = 4, + DEAD = 5, + HumanState_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits::min(), + HumanState_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits::max() + }; + bool HumanState_IsValid(int value); + constexpr HumanState HumanState_MIN = NULL_STATUS; + constexpr HumanState HumanState_MAX = DEAD; + constexpr int HumanState_ARRAYSIZE = HumanState_MAX + 1; + + const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* HumanState_descriptor(); + template + inline const std::string& HumanState_Name(T enum_t_value) + { + static_assert(::std::is_same::value || ::std::is_integral::value, "Incorrect type passed to function HumanState_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + HumanState_descriptor(), enum_t_value + ); + } + inline bool HumanState_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, HumanState* value + ) + { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + HumanState_descriptor(), name, value + ); + } enum ButcherBuffType : int { NULL_BBUFF_TYPE = 0, @@ -361,6 +394,15 @@ inline const EnumDescriptor* GetEnumDescriptor<::protobuf::HumanBuffType>() return ::protobuf::HumanBuffType_descriptor(); } template<> +struct is_proto_enum<::protobuf::HumanState> : ::std::true_type +{ +}; +template<> +inline const EnumDescriptor* GetEnumDescriptor<::protobuf::HumanState>() +{ + return ::protobuf::HumanState_descriptor(); +} +template<> struct is_proto_enum<::protobuf::ButcherBuffType> : ::std::true_type { }; diff --git a/CAPI/proto/Services.grpc.pb.cc b/CAPI/proto/Services.grpc.pb.cc index 044ca39..b5edb79 100644 --- a/CAPI/proto/Services.grpc.pb.cc +++ b/CAPI/proto/Services.grpc.pb.cc @@ -32,8 +32,10 @@ namespace protobuf "/protobuf.AvailableService/SendMessage", "/protobuf.AvailableService/HaveMessage", "/protobuf.AvailableService/GetMessage", - "/protobuf.AvailableService/FixMachine", + "/protobuf.AvailableService/StartFixMachine", + "/protobuf.AvailableService/EndFixMachine", "/protobuf.AvailableService/SaveHuman", + "/protobuf.AvailableService/EndSaveHuman", "/protobuf.AvailableService/Attack", "/protobuf.AvailableService/CarryHuman", "/protobuf.AvailableService/ReleaseHuman", @@ -59,13 +61,15 @@ namespace protobuf rpcmethod_SendMessage_(AvailableService_method_names[6], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_HaveMessage_(AvailableService_method_names[7], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), rpcmethod_GetMessage_(AvailableService_method_names[8], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_FixMachine_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::BIDI_STREAMING, channel), - rpcmethod_SaveHuman_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::BIDI_STREAMING, channel), - rpcmethod_Attack_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_CarryHuman_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_ReleaseHuman_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_HangHuman_(AvailableService_method_names[14], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), - rpcmethod_Escape_(AvailableService_method_names[15], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) + rpcmethod_StartFixMachine_(AvailableService_method_names[9], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_EndFixMachine_(AvailableService_method_names[10], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_SaveHuman_(AvailableService_method_names[11], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_EndSaveHuman_(AvailableService_method_names[12], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_Attack_(AvailableService_method_names[13], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_CarryHuman_(AvailableService_method_names[14], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_ReleaseHuman_(AvailableService_method_names[15], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_HangHuman_(AvailableService_method_names[16], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel), + rpcmethod_Escape_(AvailableService_method_names[17], options.suffix_for_stats(), ::grpc::internal::RpcMethod::NORMAL_RPC, channel) { } @@ -313,44 +317,116 @@ namespace protobuf return result; } - ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::FixMachineRaw(::grpc::ClientContext* context) + ::grpc::Status AvailableService::Stub::StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) { - return ::grpc::internal::ClientReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), rpcmethod_FixMachine_, context); + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_StartFixMachine_, context, request, response); } - void AvailableService::Stub::async::FixMachine(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) + void AvailableService::Stub::async::StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) { - ::grpc::internal::ClientCallbackReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(stub_->channel_.get(), stub_->rpcmethod_FixMachine_, context, reactor); + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartFixMachine_, context, request, response, std::move(f)); } - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::AsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + void AvailableService::Stub::async::StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) { - return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_FixMachine_, context, true, tag); + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_StartFixMachine_, context, request, response, reactor); } - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_FixMachine_, context, false, nullptr); + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_StartFixMachine_, context, request); } - ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::SaveHumanRaw(::grpc::ClientContext* context) + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), rpcmethod_SaveHuman_, context); + auto* result = + this->PrepareAsyncStartFixMachineRaw(context, request, cq); + result->StartCall(); + return result; + } + + ::grpc::Status AvailableService::Stub::EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_EndFixMachine_, context, request, response); + } + + void AvailableService::Stub::async::EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndFixMachine_, context, request, response, std::move(f)); } - void AvailableService::Stub::async::SaveHuman(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) + void AvailableService::Stub::async::EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) { - ::grpc::internal::ClientCallbackReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(stub_->channel_.get(), stub_->rpcmethod_SaveHuman_, context, reactor); + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndFixMachine_, context, request, response, reactor); } - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::AsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_SaveHuman_, context, true, tag); + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_EndFixMachine_, context, request); } - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncReaderWriterFactory<::protobuf::IDMsg, ::protobuf::BoolRes>::Create(channel_.get(), cq, rpcmethod_SaveHuman_, context, false, nullptr); + auto* result = + this->PrepareAsyncEndFixMachineRaw(context, request, cq); + result->StartCall(); + return result; + } + + ::grpc::Status AvailableService::Stub::SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_SaveHuman_, context, request, response); + } + + void AvailableService::Stub::async::SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SaveHuman_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_SaveHuman_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_SaveHuman_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncSaveHumanRaw(context, request, cq); + result->StartCall(); + return result; + } + + ::grpc::Status AvailableService::Stub::EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) + { + return ::grpc::internal::BlockingUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), rpcmethod_EndSaveHuman_, context, request, response); + } + + void AvailableService::Stub::async::EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function f) + { + ::grpc::internal::CallbackUnaryCall<::protobuf::IDMsg, ::protobuf::BoolRes, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndSaveHuman_, context, request, response, std::move(f)); + } + + void AvailableService::Stub::async::EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) + { + ::grpc::internal::ClientCallbackUnaryFactory::Create<::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(stub_->channel_.get(), stub_->rpcmethod_EndSaveHuman_, context, request, response, reactor); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::PrepareAsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return ::grpc::internal::ClientAsyncResponseReaderHelper::Create<::protobuf::BoolRes, ::protobuf::IDMsg, ::grpc::protobuf::MessageLite, ::grpc::protobuf::MessageLite>(channel_.get(), cq, rpcmethod_EndSaveHuman_, context, request); + } + + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AvailableService::Stub::AsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + auto* result = + this->PrepareAsyncEndSaveHumanRaw(context, request, cq); + result->StartCall(); + return result; } ::grpc::Status AvailableService::Stub::Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) @@ -623,26 +699,28 @@ namespace protobuf )); AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[9], - ::grpc::internal::RpcMethod::BIDI_STREAMING, - new ::grpc::internal::BidiStreamingHandler( + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, - ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) { - return service->FixMachine(ctx, stream); + return service->StartFixMachine(ctx, req, resp); }, this ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[10], - ::grpc::internal::RpcMethod::BIDI_STREAMING, - new ::grpc::internal::BidiStreamingHandler( + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, - ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) { - return service->SaveHuman(ctx, stream); + return service->EndFixMachine(ctx, req, resp); }, this ) @@ -650,6 +728,34 @@ namespace protobuf AddMethod(new ::grpc::internal::RpcServiceMethod( AvailableService_method_names[11], ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( + [](AvailableService::Service* service, + ::grpc::ServerContext* ctx, + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) + { + return service->SaveHuman(ctx, req, resp); + }, + this + ) + )); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AvailableService_method_names[12], + ::grpc::internal::RpcMethod::NORMAL_RPC, + new ::grpc::internal::RpcMethodHandler( + [](AvailableService::Service* service, + ::grpc::ServerContext* ctx, + const ::protobuf::IDMsg* req, + ::protobuf::BoolRes* resp) + { + return service->EndSaveHuman(ctx, req, resp); + }, + this + ) + )); + AddMethod(new ::grpc::internal::RpcServiceMethod( + AvailableService_method_names[13], + ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, ::grpc::ServerContext* ctx, @@ -662,7 +768,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[12], + AvailableService_method_names[14], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -676,7 +782,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[13], + AvailableService_method_names[15], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -690,7 +796,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[14], + AvailableService_method_names[16], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -704,7 +810,7 @@ namespace protobuf ) )); AddMethod(new ::grpc::internal::RpcServiceMethod( - AvailableService_method_names[15], + AvailableService_method_names[17], ::grpc::internal::RpcMethod::NORMAL_RPC, new ::grpc::internal::RpcMethodHandler( [](AvailableService::Service* service, @@ -795,17 +901,35 @@ namespace protobuf return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::FixMachine(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) + ::grpc::Status AvailableService::Service::StartFixMachine(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + + ::grpc::Status AvailableService::Service::EndFixMachine(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { (void)context; - (void)stream; + (void)request; + (void)response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - ::grpc::Status AvailableService::Service::SaveHuman(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream) + ::grpc::Status AvailableService::Service::SaveHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { (void)context; - (void)stream; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + + ::grpc::Status AvailableService::Service::EndSaveHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { + (void)context; + (void)request; + (void)response; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } diff --git a/CAPI/proto/Services.grpc.pb.h b/CAPI/proto/Services.grpc.pb.h index 9b6ecb1..bb709c6 100644 --- a/CAPI/proto/Services.grpc.pb.h +++ b/CAPI/proto/Services.grpc.pb.h @@ -128,31 +128,46 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::MsgRes>>(PrepareAsyncGetMessageRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> FixMachine(::grpc::ClientContext* context) + virtual ::grpc::Status StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncStartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(FixMachineRaw(context)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncStartFixMachineRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> AsyncFixMachine(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncStartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(AsyncFixMachineRaw(context, cq, tag)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncStartFixMachineRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> PrepareAsyncFixMachine(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + // 开始修理机器 + virtual ::grpc::Status EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncEndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(PrepareAsyncFixMachineRaw(context, cq)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncEndFixMachineRaw(context, request, cq)); } - // 若正常修复且未被打断则返回修复成功,位置错误/被打断则返回修复失败,下同 - std::unique_ptr<::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> SaveHuman(::grpc::ClientContext* context) + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncEndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(SaveHumanRaw(context)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncEndFixMachineRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> AsyncSaveHuman(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + // 主动停止修复 + virtual ::grpc::Status SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(AsyncSaveHumanRaw(context, cq, tag)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncSaveHumanRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>> PrepareAsyncSaveHuman(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>>(PrepareAsyncSaveHumanRaw(context, cq)); + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncSaveHumanRaw(context, request, cq)); } + // 开始救人 + virtual ::grpc::Status EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncEndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(AsyncEndSaveHumanRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> PrepareAsyncEndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>>(PrepareAsyncEndSaveHumanRaw(context, request, cq)); + } + // 主动停止救人 virtual ::grpc::Status Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) = 0; std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>> AsyncAttack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) { @@ -224,9 +239,18 @@ namespace protobuf virtual void HaveMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, std::function) = 0; virtual void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; - virtual void FixMachine(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) = 0; - // 若正常修复且未被打断则返回修复成功,位置错误/被打断则返回修复失败,下同 - virtual void SaveHuman(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) = 0; + virtual void StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 开始修理机器 + virtual void EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 主动停止修复 + virtual void SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 开始救人 + virtual void EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; + virtual void EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; + // 主动停止救人 virtual void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function) = 0; virtual void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) = 0; virtual void CarryHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) = 0; @@ -268,12 +292,14 @@ namespace protobuf virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncHaveMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::MsgRes>* AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::MsgRes>* PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* FixMachineRaw(::grpc::ClientContext* context) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* AsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* PrepareAsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* SaveHumanRaw(::grpc::ClientContext* context) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* AsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; - virtual ::grpc::ClientAsyncReaderWriterInterface<::protobuf::IDMsg, ::protobuf::BoolRes>* PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) = 0; virtual ::grpc::ClientAsyncResponseReaderInterface<::protobuf::BoolRes>* AsyncCarryHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) = 0; @@ -373,29 +399,41 @@ namespace protobuf { return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::MsgRes>>(PrepareAsyncGetMessageRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> FixMachine(::grpc::ClientContext* context) + ::grpc::Status StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncStartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncStartFixMachineRaw(context, request, cq)); + } + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncStartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) + { + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncStartFixMachineRaw(context, request, cq)); + } + ::grpc::Status EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncEndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(FixMachineRaw(context)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncEndFixMachineRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> AsyncFixMachine(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncEndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(AsyncFixMachineRaw(context, cq, tag)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncEndFixMachineRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> PrepareAsyncFixMachine(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + ::grpc::Status SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(PrepareAsyncFixMachineRaw(context, cq)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncSaveHumanRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> SaveHuman(::grpc::ClientContext* context) + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(SaveHumanRaw(context)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncSaveHumanRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> AsyncSaveHuman(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) + ::grpc::Status EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::protobuf::BoolRes* response) override; + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncEndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(AsyncSaveHumanRaw(context, cq, tag)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(AsyncEndSaveHumanRaw(context, request, cq)); } - std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>> PrepareAsyncSaveHuman(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) + std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> PrepareAsyncEndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>>(PrepareAsyncSaveHumanRaw(context, cq)); + return std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>>(PrepareAsyncEndSaveHumanRaw(context, request, cq)); } ::grpc::Status Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::protobuf::BoolRes* response) override; std::unique_ptr<::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>> AsyncAttack(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) @@ -463,8 +501,14 @@ namespace protobuf void HaveMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, std::function) override; void GetMessage(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response, ::grpc::ClientUnaryReactor* reactor) override; - void FixMachine(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) override; - void SaveHuman(::grpc::ClientContext* context, ::grpc::ClientBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* reactor) override; + void StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void StartFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void EndFixMachine(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void SaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; + void EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; + void EndSaveHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, std::function) override; void Attack(::grpc::ClientContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response, ::grpc::ClientUnaryReactor* reactor) override; void CarryHuman(::grpc::ClientContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response, std::function) override; @@ -518,12 +562,14 @@ namespace protobuf ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncHaveMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::MsgRes>* AsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::MsgRes>* PrepareAsyncGetMessageRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* FixMachineRaw(::grpc::ClientContext* context) override; - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* PrepareAsyncFixMachineRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; - ::grpc::ClientReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* SaveHumanRaw(::grpc::ClientContext* context) override; - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* AsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) override; - ::grpc::ClientAsyncReaderWriter<::protobuf::IDMsg, ::protobuf::BoolRes>* PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncStartFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncEndFixMachineRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; + ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncEndSaveHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* PrepareAsyncAttackRaw(::grpc::ClientContext* context, const ::protobuf::AttackMsg& request, ::grpc::CompletionQueue* cq) override; ::grpc::ClientAsyncResponseReader<::protobuf::BoolRes>* AsyncCarryHumanRaw(::grpc::ClientContext* context, const ::protobuf::IDMsg& request, ::grpc::CompletionQueue* cq) override; @@ -543,8 +589,10 @@ namespace protobuf const ::grpc::internal::RpcMethod rpcmethod_SendMessage_; const ::grpc::internal::RpcMethod rpcmethod_HaveMessage_; const ::grpc::internal::RpcMethod rpcmethod_GetMessage_; - const ::grpc::internal::RpcMethod rpcmethod_FixMachine_; + const ::grpc::internal::RpcMethod rpcmethod_StartFixMachine_; + const ::grpc::internal::RpcMethod rpcmethod_EndFixMachine_; const ::grpc::internal::RpcMethod rpcmethod_SaveHuman_; + const ::grpc::internal::RpcMethod rpcmethod_EndSaveHuman_; const ::grpc::internal::RpcMethod rpcmethod_Attack_; const ::grpc::internal::RpcMethod rpcmethod_CarryHuman_; const ::grpc::internal::RpcMethod rpcmethod_ReleaseHuman_; @@ -570,9 +618,14 @@ namespace protobuf virtual ::grpc::Status SendMessage(::grpc::ServerContext* context, const ::protobuf::SendMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status HaveMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status GetMessage(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::MsgRes* response); - virtual ::grpc::Status FixMachine(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream); - // 若正常修复且未被打断则返回修复成功,位置错误/被打断则返回修复失败,下同 - virtual ::grpc::Status SaveHuman(::grpc::ServerContext* context, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream); + virtual ::grpc::Status StartFixMachine(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 开始修理机器 + virtual ::grpc::Status EndFixMachine(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 主动停止修复 + virtual ::grpc::Status SaveHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 开始救人 + virtual ::grpc::Status EndSaveHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); + // 主动停止救人 virtual ::grpc::Status Attack(::grpc::ServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status CarryHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); virtual ::grpc::Status ReleaseHuman(::grpc::ServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response); @@ -832,7 +885,7 @@ namespace protobuf } }; template - class WithAsyncMethod_FixMachine : public BaseClass + class WithAsyncMethod_StartFixMachine : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -840,23 +893,51 @@ namespace protobuf } public: - WithAsyncMethod_FixMachine() + WithAsyncMethod_StartFixMachine() { ::grpc::Service::MarkMethodAsync(9); } - ~WithAsyncMethod_FixMachine() override + ~WithAsyncMethod_StartFixMachine() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status FixMachine(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestFixMachine(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestStartFixMachine(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncBidiStreaming(9, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithAsyncMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodAsync(10); + } + ~WithAsyncMethod_EndFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEndFixMachine(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -870,21 +951,49 @@ namespace protobuf public: WithAsyncMethod_SaveHuman() { - ::grpc::Service::MarkMethodAsync(10); + ::grpc::Service::MarkMethodAsync(11); } ~WithAsyncMethod_SaveHuman() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestSaveHuman(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithAsyncMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodAsync(12); + } + ~WithAsyncMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestSaveHuman(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestEndSaveHuman(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncBidiStreaming(10, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -898,7 +1007,7 @@ namespace protobuf public: WithAsyncMethod_Attack() { - ::grpc::Service::MarkMethodAsync(11); + ::grpc::Service::MarkMethodAsync(13); } ~WithAsyncMethod_Attack() override { @@ -912,7 +1021,7 @@ namespace protobuf } void RequestAttack(::grpc::ServerContext* context, ::protobuf::AttackMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -926,7 +1035,7 @@ namespace protobuf public: WithAsyncMethod_CarryHuman() { - ::grpc::Service::MarkMethodAsync(12); + ::grpc::Service::MarkMethodAsync(14); } ~WithAsyncMethod_CarryHuman() override { @@ -940,7 +1049,7 @@ namespace protobuf } void RequestCarryHuman(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -954,7 +1063,7 @@ namespace protobuf public: WithAsyncMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodAsync(13); + ::grpc::Service::MarkMethodAsync(15); } ~WithAsyncMethod_ReleaseHuman() override { @@ -968,7 +1077,7 @@ namespace protobuf } void RequestReleaseHuman(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -982,7 +1091,7 @@ namespace protobuf public: WithAsyncMethod_HangHuman() { - ::grpc::Service::MarkMethodAsync(14); + ::grpc::Service::MarkMethodAsync(16); } ~WithAsyncMethod_HangHuman() override { @@ -996,7 +1105,7 @@ namespace protobuf } void RequestHangHuman(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -1010,7 +1119,7 @@ namespace protobuf public: WithAsyncMethod_Escape() { - ::grpc::Service::MarkMethodAsync(15); + ::grpc::Service::MarkMethodAsync(17); } ~WithAsyncMethod_Escape() override { @@ -1024,10 +1133,10 @@ namespace protobuf } void RequestEscape(::grpc::ServerContext* context, ::protobuf::IDMsg* request, ::grpc::ServerAsyncResponseWriter<::protobuf::BoolRes>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(17, context, request, response, new_call_cq, notification_cq, tag); } }; - typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>> AsyncService; + typedef WithAsyncMethod_TryConnection>>>>>>>>>>>>>>>>> AsyncService; template class WithCallbackMethod_TryConnection : public BaseClass { @@ -1372,7 +1481,7 @@ namespace protobuf } }; template - class WithCallbackMethod_FixMachine : public BaseClass + class WithCallbackMethod_StartFixMachine : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1380,23 +1489,70 @@ namespace protobuf } public: - WithCallbackMethod_FixMachine() + WithCallbackMethod_StartFixMachine() { - ::grpc::Service::MarkMethodCallback(9, new ::grpc::internal::CallbackBidiHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context) - { return this->FixMachine(context); })); + ::grpc::Service::MarkMethodCallback(9, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->StartFixMachine(context, request, response); })); } - ~WithCallbackMethod_FixMachine() override + void SetMessageAllocatorFor_StartFixMachine( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(9); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_StartFixMachine() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status FixMachine(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* FixMachine( - ::grpc::CallbackServerContext* /*context*/ + virtual ::grpc::ServerUnaryReactor* StartFixMachine( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithCallbackMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithCallbackMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodCallback(10, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->EndFixMachine(context, request, response); })); + } + void SetMessageAllocatorFor_EndFixMachine( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(10); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_EndFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EndFixMachine( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ ) { return nullptr; @@ -1413,21 +1569,68 @@ namespace protobuf public: WithCallbackMethod_SaveHuman() { - ::grpc::Service::MarkMethodCallback(10, new ::grpc::internal::CallbackBidiHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context) - { return this->SaveHuman(context); })); + ::grpc::Service::MarkMethodCallback(11, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->SaveHuman(context, request, response); })); + } + void SetMessageAllocatorFor_SaveHuman( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); } ~WithCallbackMethod_SaveHuman() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerBidiReactor<::protobuf::IDMsg, ::protobuf::BoolRes>* SaveHuman( - ::grpc::CallbackServerContext* /*context*/ + virtual ::grpc::ServerUnaryReactor* SaveHuman( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithCallbackMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithCallbackMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + { return this->EndSaveHuman(context, request, response); })); + } + void SetMessageAllocatorFor_EndSaveHuman( + ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator + ) + { + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); + static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) + ->SetMessageAllocator(allocator); + } + ~WithCallbackMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EndSaveHuman( + ::grpc::CallbackServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/ ) { return nullptr; @@ -1444,14 +1647,14 @@ namespace protobuf public: WithCallbackMethod_Attack() { - ::grpc::Service::MarkMethodCallback(11, new ::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(13, new ::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::AttackMsg* request, ::protobuf::BoolRes* response) { return this->Attack(context, request, response); })); } void SetMessageAllocatorFor_Attack( ::grpc::MessageAllocator<::protobuf::AttackMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(11); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1483,14 +1686,14 @@ namespace protobuf public: WithCallbackMethod_CarryHuman() { - ::grpc::Service::MarkMethodCallback(12, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(14, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->CarryHuman(context, request, response); })); } void SetMessageAllocatorFor_CarryHuman( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(12); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1522,14 +1725,14 @@ namespace protobuf public: WithCallbackMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodCallback(13, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(15, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->ReleaseHuman(context, request, response); })); } void SetMessageAllocatorFor_ReleaseHuman( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(13); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(15); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1561,14 +1764,14 @@ namespace protobuf public: WithCallbackMethod_HangHuman() { - ::grpc::Service::MarkMethodCallback(14, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(16, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->HangHuman(context, request, response); })); } void SetMessageAllocatorFor_HangHuman( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(14); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(16); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1600,14 +1803,14 @@ namespace protobuf public: WithCallbackMethod_Escape() { - ::grpc::Service::MarkMethodCallback(15, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) + ::grpc::Service::MarkMethodCallback(17, new ::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::CallbackServerContext* context, const ::protobuf::IDMsg* request, ::protobuf::BoolRes* response) { return this->Escape(context, request, response); })); } void SetMessageAllocatorFor_Escape( ::grpc::MessageAllocator<::protobuf::IDMsg, ::protobuf::BoolRes>* allocator ) { - ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(15); + ::grpc::internal::MethodHandler* const handler = ::grpc::Service::GetHandler(17); static_cast<::grpc::internal::CallbackUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>*>(handler) ->SetMessageAllocator(allocator); } @@ -1628,7 +1831,7 @@ namespace protobuf return nullptr; } }; - typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>> CallbackService; + typedef WithCallbackMethod_TryConnection>>>>>>>>>>>>>>>>> CallbackService; typedef CallbackService ExperimentalCallbackService; template class WithGenericMethod_TryConnection : public BaseClass @@ -1847,7 +2050,7 @@ namespace protobuf } }; template - class WithGenericMethod_FixMachine : public BaseClass + class WithGenericMethod_StartFixMachine : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -1855,16 +2058,40 @@ namespace protobuf } public: - WithGenericMethod_FixMachine() + WithGenericMethod_StartFixMachine() { ::grpc::Service::MarkMethodGeneric(9); } - ~WithGenericMethod_FixMachine() override + ~WithGenericMethod_StartFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithGenericMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodGeneric(10); + } + ~WithGenericMethod_EndFixMachine() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status FixMachine(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); @@ -1881,14 +2108,38 @@ namespace protobuf public: WithGenericMethod_SaveHuman() { - ::grpc::Service::MarkMethodGeneric(10); + ::grpc::Service::MarkMethodGeneric(11); } ~WithGenericMethod_SaveHuman() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithGenericMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodGeneric(12); + } + ~WithGenericMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); @@ -1905,7 +2156,7 @@ namespace protobuf public: WithGenericMethod_Attack() { - ::grpc::Service::MarkMethodGeneric(11); + ::grpc::Service::MarkMethodGeneric(13); } ~WithGenericMethod_Attack() override { @@ -1929,7 +2180,7 @@ namespace protobuf public: WithGenericMethod_CarryHuman() { - ::grpc::Service::MarkMethodGeneric(12); + ::grpc::Service::MarkMethodGeneric(14); } ~WithGenericMethod_CarryHuman() override { @@ -1953,7 +2204,7 @@ namespace protobuf public: WithGenericMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodGeneric(13); + ::grpc::Service::MarkMethodGeneric(15); } ~WithGenericMethod_ReleaseHuman() override { @@ -1977,7 +2228,7 @@ namespace protobuf public: WithGenericMethod_HangHuman() { - ::grpc::Service::MarkMethodGeneric(14); + ::grpc::Service::MarkMethodGeneric(16); } ~WithGenericMethod_HangHuman() override { @@ -2001,7 +2252,7 @@ namespace protobuf public: WithGenericMethod_Escape() { - ::grpc::Service::MarkMethodGeneric(15); + ::grpc::Service::MarkMethodGeneric(17); } ~WithGenericMethod_Escape() override { @@ -2267,7 +2518,7 @@ namespace protobuf } }; template - class WithRawMethod_FixMachine : public BaseClass + class WithRawMethod_StartFixMachine : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2275,23 +2526,51 @@ namespace protobuf } public: - WithRawMethod_FixMachine() + WithRawMethod_StartFixMachine() { ::grpc::Service::MarkMethodRaw(9); } - ~WithRawMethod_FixMachine() override + ~WithRawMethod_StartFixMachine() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status FixMachine(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestFixMachine(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter<::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestStartFixMachine(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncBidiStreaming(9, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(9, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodRaw(10); + } + ~WithRawMethod_EndFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEndFixMachine(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(10, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2305,21 +2584,49 @@ namespace protobuf public: WithRawMethod_SaveHuman() { - ::grpc::Service::MarkMethodRaw(10); + ::grpc::Service::MarkMethodRaw(11); } ~WithRawMethod_SaveHuman() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestSaveHuman(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter<::grpc::ByteBuffer, ::grpc::ByteBuffer>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + void RequestSaveHuman(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncBidiStreaming(10, context, stream, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + } + }; + template + class WithRawMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodRaw(12); + } + ~WithRawMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestEndSaveHuman(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) + { + ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2333,7 +2640,7 @@ namespace protobuf public: WithRawMethod_Attack() { - ::grpc::Service::MarkMethodRaw(11); + ::grpc::Service::MarkMethodRaw(13); } ~WithRawMethod_Attack() override { @@ -2347,7 +2654,7 @@ namespace protobuf } void RequestAttack(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(11, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2361,7 +2668,7 @@ namespace protobuf public: WithRawMethod_CarryHuman() { - ::grpc::Service::MarkMethodRaw(12); + ::grpc::Service::MarkMethodRaw(14); } ~WithRawMethod_CarryHuman() override { @@ -2375,7 +2682,7 @@ namespace protobuf } void RequestCarryHuman(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(12, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2389,7 +2696,7 @@ namespace protobuf public: WithRawMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodRaw(13); + ::grpc::Service::MarkMethodRaw(15); } ~WithRawMethod_ReleaseHuman() override { @@ -2403,7 +2710,7 @@ namespace protobuf } void RequestReleaseHuman(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(13, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2417,7 +2724,7 @@ namespace protobuf public: WithRawMethod_HangHuman() { - ::grpc::Service::MarkMethodRaw(14); + ::grpc::Service::MarkMethodRaw(16); } ~WithRawMethod_HangHuman() override { @@ -2431,7 +2738,7 @@ namespace protobuf } void RequestHangHuman(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(14, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(16, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2445,7 +2752,7 @@ namespace protobuf public: WithRawMethod_Escape() { - ::grpc::Service::MarkMethodRaw(15); + ::grpc::Service::MarkMethodRaw(17); } ~WithRawMethod_Escape() override { @@ -2459,7 +2766,7 @@ namespace protobuf } void RequestEscape(::grpc::ServerContext* context, ::grpc::ByteBuffer* request, ::grpc::ServerAsyncResponseWriter<::grpc::ByteBuffer>* response, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(15, context, request, response, new_call_cq, notification_cq, tag); + ::grpc::Service::RequestAsyncUnary(17, context, request, response, new_call_cq, notification_cq, tag); } }; template @@ -2742,7 +3049,7 @@ namespace protobuf } }; template - class WithRawCallbackMethod_FixMachine : public BaseClass + class WithRawCallbackMethod_StartFixMachine : public BaseClass { private: void BaseClassMustBeDerivedFromService(const Service* /*service*/) @@ -2750,23 +3057,54 @@ namespace protobuf } public: - WithRawCallbackMethod_FixMachine() + WithRawCallbackMethod_StartFixMachine() { - ::grpc::Service::MarkMethodRawCallback(9, new ::grpc::internal::CallbackBidiHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context) - { return this->FixMachine(context); })); + ::grpc::Service::MarkMethodRawCallback(9, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->StartFixMachine(context, request, response); })); } - ~WithRawCallbackMethod_FixMachine() override + ~WithRawCallbackMethod_StartFixMachine() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status FixMachine(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerBidiReactor<::grpc::ByteBuffer, ::grpc::ByteBuffer>* FixMachine( - ::grpc::CallbackServerContext* /*context*/ + virtual ::grpc::ServerUnaryReactor* StartFixMachine( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithRawCallbackMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawCallbackMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodRawCallback(10, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->EndFixMachine(context, request, response); })); + } + ~WithRawCallbackMethod_EndFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EndFixMachine( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ ) { return nullptr; @@ -2783,21 +3121,52 @@ namespace protobuf public: WithRawCallbackMethod_SaveHuman() { - ::grpc::Service::MarkMethodRawCallback(10, new ::grpc::internal::CallbackBidiHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context) - { return this->SaveHuman(context); })); + ::grpc::Service::MarkMethodRawCallback(11, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->SaveHuman(context, request, response); })); } ~WithRawCallbackMethod_SaveHuman() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, ::grpc::ServerReaderWriter<::protobuf::BoolRes, ::protobuf::IDMsg>* /*stream*/) override + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual ::grpc::ServerBidiReactor<::grpc::ByteBuffer, ::grpc::ByteBuffer>* SaveHuman( - ::grpc::CallbackServerContext* /*context*/ + virtual ::grpc::ServerUnaryReactor* SaveHuman( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ + ) + { + return nullptr; + } + }; + template + class WithRawCallbackMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithRawCallbackMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + { return this->EndSaveHuman(context, request, response); })); + } + ~WithRawCallbackMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + virtual ::grpc::ServerUnaryReactor* EndSaveHuman( + ::grpc::CallbackServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/ ) { return nullptr; @@ -2814,7 +3183,7 @@ namespace protobuf public: WithRawCallbackMethod_Attack() { - ::grpc::Service::MarkMethodRawCallback(11, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(13, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Attack(context, request, response); })); } ~WithRawCallbackMethod_Attack() override @@ -2845,7 +3214,7 @@ namespace protobuf public: WithRawCallbackMethod_CarryHuman() { - ::grpc::Service::MarkMethodRawCallback(12, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(14, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->CarryHuman(context, request, response); })); } ~WithRawCallbackMethod_CarryHuman() override @@ -2876,7 +3245,7 @@ namespace protobuf public: WithRawCallbackMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodRawCallback(13, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(15, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->ReleaseHuman(context, request, response); })); } ~WithRawCallbackMethod_ReleaseHuman() override @@ -2907,7 +3276,7 @@ namespace protobuf public: WithRawCallbackMethod_HangHuman() { - ::grpc::Service::MarkMethodRawCallback(14, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(16, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->HangHuman(context, request, response); })); } ~WithRawCallbackMethod_HangHuman() override @@ -2938,7 +3307,7 @@ namespace protobuf public: WithRawCallbackMethod_Escape() { - ::grpc::Service::MarkMethodRawCallback(15, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) + ::grpc::Service::MarkMethodRawCallback(17, new ::grpc::internal::CallbackUnaryHandler<::grpc::ByteBuffer, ::grpc::ByteBuffer>([this](::grpc::CallbackServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response) { return this->Escape(context, request, response); })); } ~WithRawCallbackMethod_Escape() override @@ -3175,6 +3544,114 @@ namespace protobuf virtual ::grpc::Status StreamedGetMessage(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::MsgRes>* server_unary_streamer) = 0; }; template + class WithStreamedUnaryMethod_StartFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_StartFixMachine() + { + ::grpc::Service::MarkMethodStreamed(9, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedStartFixMachine(context, streamer); })); + } + ~WithStreamedUnaryMethod_StartFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status StartFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedStartFixMachine(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_EndFixMachine : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_EndFixMachine() + { + ::grpc::Service::MarkMethodStreamed(10, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedEndFixMachine(context, streamer); })); + } + ~WithStreamedUnaryMethod_EndFixMachine() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status EndFixMachine(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedEndFixMachine(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_SaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_SaveHuman() + { + ::grpc::Service::MarkMethodStreamed(11, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedSaveHuman(context, streamer); })); + } + ~WithStreamedUnaryMethod_SaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status SaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedSaveHuman(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template + class WithStreamedUnaryMethod_EndSaveHuman : public BaseClass + { + private: + void BaseClassMustBeDerivedFromService(const Service* /*service*/) + { + } + + public: + WithStreamedUnaryMethod_EndSaveHuman() + { + ::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + { return this->StreamedEndSaveHuman(context, streamer); })); + } + ~WithStreamedUnaryMethod_EndSaveHuman() override + { + BaseClassMustBeDerivedFromService(this); + } + // disable regular version of this method + ::grpc::Status EndSaveHuman(::grpc::ServerContext* /*context*/, const ::protobuf::IDMsg* /*request*/, ::protobuf::BoolRes* /*response*/) override + { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + // replace default version of method with streamed unary + virtual ::grpc::Status StreamedEndSaveHuman(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; + }; + template class WithStreamedUnaryMethod_Attack : public BaseClass { private: @@ -3185,7 +3662,7 @@ namespace protobuf public: WithStreamedUnaryMethod_Attack() { - ::grpc::Service::MarkMethodStreamed(11, new ::grpc::internal::StreamedUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::AttackMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(13, new ::grpc::internal::StreamedUnaryHandler<::protobuf::AttackMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::AttackMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedAttack(context, streamer); })); } ~WithStreamedUnaryMethod_Attack() override @@ -3212,7 +3689,7 @@ namespace protobuf public: WithStreamedUnaryMethod_CarryHuman() { - ::grpc::Service::MarkMethodStreamed(12, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(14, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedCarryHuman(context, streamer); })); } ~WithStreamedUnaryMethod_CarryHuman() override @@ -3239,7 +3716,7 @@ namespace protobuf public: WithStreamedUnaryMethod_ReleaseHuman() { - ::grpc::Service::MarkMethodStreamed(13, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(15, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedReleaseHuman(context, streamer); })); } ~WithStreamedUnaryMethod_ReleaseHuman() override @@ -3266,7 +3743,7 @@ namespace protobuf public: WithStreamedUnaryMethod_HangHuman() { - ::grpc::Service::MarkMethodStreamed(14, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(16, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedHangHuman(context, streamer); })); } ~WithStreamedUnaryMethod_HangHuman() override @@ -3293,7 +3770,7 @@ namespace protobuf public: WithStreamedUnaryMethod_Escape() { - ::grpc::Service::MarkMethodStreamed(15, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) + ::grpc::Service::MarkMethodStreamed(17, new ::grpc::internal::StreamedUnaryHandler<::protobuf::IDMsg, ::protobuf::BoolRes>([this](::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* streamer) { return this->StreamedEscape(context, streamer); })); } ~WithStreamedUnaryMethod_Escape() override @@ -3309,7 +3786,7 @@ namespace protobuf // replace default version of method with streamed unary virtual ::grpc::Status StreamedEscape(::grpc::ServerContext* context, ::grpc::ServerUnaryStreamer<::protobuf::IDMsg, ::protobuf::BoolRes>* server_unary_streamer) = 0; }; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>> StreamedUnaryService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>> StreamedUnaryService; template class WithSplitStreamingMethod_AddPlayer : public BaseClass { @@ -3338,7 +3815,7 @@ namespace protobuf virtual ::grpc::Status StreamedAddPlayer(::grpc::ServerContext* context, ::grpc::ServerSplitStreamer<::protobuf::PlayerMsg, ::protobuf::MessageToClient>* server_split_streamer) = 0; }; typedef WithSplitStreamingMethod_AddPlayer SplitStreamedService; - typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>> StreamedService; + typedef WithStreamedUnaryMethod_TryConnection>>>>>>>>>>>>>>>>> StreamedService; }; } // namespace protobuf diff --git a/CAPI/proto/Services.pb.cc b/CAPI/proto/Services.pb.cc index 03c1df6..e5cc936 100644 --- a/CAPI/proto/Services.pb.cc +++ b/CAPI/proto/Services.pb.cc @@ -31,7 +31,7 @@ static constexpr ::_pb::Message* const* file_default_instances = nullptr; const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n\016Services.proto\022\010protobuf\032\025Message2Clie" - "nts.proto\032\024Message2Server.proto2\300\006\n\020Avai" + "nts.proto\032\024Message2Server.proto2\246\007\n\020Avai" "lableService\0223\n\rTryConnection\022\017.protobuf" ".IDMsg\032\021.protobuf.BoolRes\022=\n\tAddPlayer\022\023" ".protobuf.PlayerMsg\032\031.protobuf.MessageTo" @@ -43,16 +43,19 @@ const char descriptor_table_protodef_Services_2eproto[] PROTOBUF_SECTION_VARIABL "3\n\013SendMessage\022\021.protobuf.SendMsg\032\021.prot" "obuf.BoolRes\0221\n\013HaveMessage\022\017.protobuf.I" "DMsg\032\021.protobuf.BoolRes\022/\n\nGetMessage\022\017." - "protobuf.IDMsg\032\020.protobuf.MsgRes\0224\n\nFixM" - "achine\022\017.protobuf.IDMsg\032\021.protobuf.BoolR" - "es(\0010\001\0223\n\tSaveHuman\022\017.protobuf.IDMsg\032\021.p" - "rotobuf.BoolRes(\0010\001\0220\n\006Attack\022\023.protobuf" - ".AttackMsg\032\021.protobuf.BoolRes\0220\n\nCarryHu" - "man\022\017.protobuf.IDMsg\032\021.protobuf.BoolRes\022" - "2\n\014ReleaseHuman\022\017.protobuf.IDMsg\032\021.proto" - "buf.BoolRes\022/\n\tHangHuman\022\017.protobuf.IDMs" - "g\032\021.protobuf.BoolRes\022,\n\006Escape\022\017.protobu" - "f.IDMsg\032\021.protobuf.BoolResb\006proto3"; + "protobuf.IDMsg\032\020.protobuf.MsgRes\0225\n\017Star" + "tFixMachine\022\017.protobuf.IDMsg\032\021.protobuf." + "BoolRes\0223\n\rEndFixMachine\022\017.protobuf.IDMs" + "g\032\021.protobuf.BoolRes\022/\n\tSaveHuman\022\017.prot" + "obuf.IDMsg\032\021.protobuf.BoolRes\0222\n\014EndSave" + "Human\022\017.protobuf.IDMsg\032\021.protobuf.BoolRe" + "s\0220\n\006Attack\022\023.protobuf.AttackMsg\032\021.proto" + "buf.BoolRes\0220\n\nCarryHuman\022\017.protobuf.IDM" + "sg\032\021.protobuf.BoolRes\0222\n\014ReleaseHuman\022\017." + "protobuf.IDMsg\032\021.protobuf.BoolRes\022/\n\tHan" + "gHuman\022\017.protobuf.IDMsg\032\021.protobuf.BoolR" + "es\022,\n\006Escape\022\017.protobuf.IDMsg\032\021.protobuf" + ".BoolResb\006proto3"; static const ::_pbi::DescriptorTable* const descriptor_table_Services_2eproto_deps[2] = { &::descriptor_table_Message2Clients_2eproto, &::descriptor_table_Message2Server_2eproto, @@ -61,7 +64,7 @@ static ::_pbi::once_flag descriptor_table_Services_2eproto_once; const ::_pbi::DescriptorTable descriptor_table_Services_2eproto = { false, false, - 914, + 1016, descriptor_table_protodef_Services_2eproto, "Services.proto", &descriptor_table_Services_2eproto_once, diff --git a/dependency/proto/Message2Clients.proto b/dependency/proto/Message2Clients.proto index f8403a2..7925964 100755 --- a/dependency/proto/Message2Clients.proto +++ b/dependency/proto/Message2Clients.proto @@ -16,9 +16,8 @@ message MessageOfHuman PropType prop = 8; HumanType human_type = 9; int64 guid = 10; - bool on_chair = 11; // 是否被挂 + HumanState state = 11; double chair_time = 12; // 被挂的时间 - bool on_ground = 13; // 是否倒地 double ground_time = 14; // 倒地时间 int64 player_id = 15; int32 view_range = 16; // 视野距离 diff --git a/dependency/proto/MessageType.proto b/dependency/proto/MessageType.proto index 2041fe0..f92708f 100755 --- a/dependency/proto/MessageType.proto +++ b/dependency/proto/MessageType.proto @@ -43,6 +43,16 @@ enum HumanBuffType // 人类可用的增益效果类型 HBUFFTYPE4 = 4; } +enum HumanState +{ + NULL_STATUS = 0; + IDLE = 1; // 正常状态 + FIXING = 2; // 修理状态 + DYING = 3; // 濒死状态 + ON_CHAIR = 4; // 被挂 + DEAD = 5; // 死亡状态 +} + enum ButcherBuffType // 屠夫可用的增益效果类型 { NULL_BBUFF_TYPE = 0; diff --git a/dependency/proto/Services.proto b/dependency/proto/Services.proto index 77e150d..d903045 100755 --- a/dependency/proto/Services.proto +++ b/dependency/proto/Services.proto @@ -19,8 +19,10 @@ service AvailableService rpc SendMessage(SendMsg) returns (BoolRes); rpc HaveMessage(IDMsg) returns (BoolRes); rpc GetMessage(IDMsg) returns (MsgRes); - rpc FixMachine(stream IDMsg) returns (stream BoolRes); // 若正常修复且未被打断则返回修复成功,位置错误/被打断则返回修复失败,下同 - rpc SaveHuman(stream IDMsg) returns (stream BoolRes); + rpc StartFixMachine(IDMsg) returns (BoolRes); // 开始修理机器 + rpc EndFixMachine(IDMsg) returns (BoolRes); // 主动停止修复 + rpc SaveHuman(IDMsg) returns (BoolRes); // 开始救人 + rpc EndSaveHuman(IDMsg) returns (BoolRes); // 主动停止救人 rpc Attack (AttackMsg) returns (BoolRes); rpc CarryHuman (IDMsg) returns (BoolRes); rpc ReleaseHuman (IDMsg) returns (BoolRes);