/** * Autogenerated by Thrift for thrift/compiler/test/fixtures/doctext/src/module.thrift * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated @nocommit */ #include "thrift/compiler/test/fixtures/doctext/gen-cpp2/CAsyncClient.h" #include namespace cpp2 { typedef apache::thrift::ThriftPresult C_f_pargs; typedef apache::thrift::ThriftPresult C_f_presult; typedef apache::thrift::ThriftPresult C_numbers_pargs; typedef apache::thrift::ThriftPResultStream< apache::thrift::ThriftPresult, apache::thrift::ThriftPresult> > C_numbers_presult; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<2, ::apache::thrift::type_class::string, ::std::string*>, apache::thrift::FieldData<3, ::apache::thrift::type_class::set<::apache::thrift::type_class::integral>, ::std::set<::std::int32_t>*>> C_thing_pargs; typedef apache::thrift::ThriftPresult, apache::thrift::FieldData<1, ::apache::thrift::type_class::structure, ::cpp2::Bang>> C_thing_presult; } // namespace cpp2 template void apache::thrift::Client<::cpp2::C>::fT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback) { ::cpp2::C_f_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "f", ::apache::thrift::FunctionQualifier::Unspecified, "C"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::C>::numbersT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::StreamClientCallback* callback) { ::cpp2::C_numbers_pargs args; auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "numbers", ::apache::thrift::FunctionQualifier::Unspecified, "C"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } template void apache::thrift::Client<::cpp2::C>::thingT(Protocol_* prot, RpcOptions&& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { ::cpp2::C_thing_pargs args; args.get<0>().value = &p_a; args.get<1>().value = const_cast<::std::string*>(&p_b); args.get<2>().value = const_cast<::std::set<::std::int32_t>*>(&p_c); auto sizer = [&](Protocol_* p) { return args.serializedSizeZC(p); }; auto writer = [&](Protocol_* p) { args.write(p); }; static ::apache::thrift::MethodMetadata::Data* methodMetadata = new ::apache::thrift::MethodMetadata::Data( "thing", ::apache::thrift::FunctionQualifier::Unspecified, "C"); apache::thrift::clientSendT(prot, std::forward(rpcOptions), std::move(callback), contextStack, std::move(header), channel_.get(), ::apache::thrift::MethodMetadata::from_static(methodMetadata), writer, sizer); } void apache::thrift::Client<::cpp2::C>::f(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; f(rpcOptions, std::move(callback)); } void apache::thrift::Client<::cpp2::C>::f(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = fCtx(&rpcOptions); apache::thrift::RequestCallback::Context callbackContext; callbackContext.protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto* contextStack = ctx.get(); if (callback) { callbackContext.ctx = std::move(ctx); } auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext)); fImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::cpp2::C>::fImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { fT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { fT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { fT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { fT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::C>::fCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "C.f", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::C>::sync_f() { ::apache::thrift::RpcOptions rpcOptions; sync_f(rpcOptions); } void apache::thrift::Client<::cpp2::C>::sync_f(apache::thrift::RpcOptions& rpcOptions) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = fCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); callback.waitUntilDone( evb, [&] { fImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_f(returnState); }); } folly::Future apache::thrift::Client<::cpp2::C>::future_f() { ::apache::thrift::RpcOptions rpcOptions; return future_f(rpcOptions); } folly::SemiFuture apache::thrift::Client<::cpp2::C>::semifuture_f() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_f(rpcOptions); } folly::Future apache::thrift::Client<::cpp2::C>::future_f(apache::thrift::RpcOptions& rpcOptions) { folly::Promise promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_f, channel_); f(rpcOptions, std::move(callback)); return future; } folly::SemiFuture apache::thrift::Client<::cpp2::C>::semifuture_f(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_f, channel_); auto callback = std::move(callbackAndFuture.first); f(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::C>::header_future_f(apache::thrift::RpcOptions& rpcOptions) { folly::Promise>> promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_f, channel_); f(rpcOptions, std::move(callback)); return future; } folly::SemiFuture>> apache::thrift::Client<::cpp2::C>::header_semifuture_f(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_f, channel_); auto callback = std::move(callbackAndFuture.first); f(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::C>::f(folly::Function callback) { f(std::make_unique(std::move(callback))); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_wrapped_f(::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::C_f_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::C>::recv_f(::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_f(state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::C>::recv_instance_f(::apache::thrift::ClientReceiveState& state) { recv_f(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_instance_wrapped_f(::apache::thrift::ClientReceiveState& state) { return recv_wrapped_f(state); } void apache::thrift::Client<::cpp2::C>::numbers(std::unique_ptr callback) { ::apache::thrift::RpcOptions rpcOptions; numbers(rpcOptions, std::move(callback)); } void apache::thrift::Client<::cpp2::C>::numbers(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback) { auto [ctx, header] = numbersCtx(&rpcOptions); apache::thrift::RequestCallback::Context callbackContext; callbackContext.protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto* contextStack = ctx.get(); if (callback) { callbackContext.ctx = std::move(ctx); } auto wrappedCallback = apache::thrift::createStreamClientCallback( apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext)), rpcOptions.getBufferOptions()); numbersImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback)); } void apache::thrift::Client<::cpp2::C>::numbersImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::StreamClientCallback* callback, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { numbersT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { numbersT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { numbersT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback)); } else { numbersT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback)); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::C>::numbersCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "C.numbers", *header); return {std::move(ctx), std::move(header)}; } apache::thrift::ClientBufferedStream<::cpp2::number> apache::thrift::Client<::cpp2::C>::sync_numbers() { ::apache::thrift::RpcOptions rpcOptions; return sync_numbers(rpcOptions); } apache::thrift::ClientBufferedStream<::cpp2::number> apache::thrift::Client<::cpp2::C>::sync_numbers(apache::thrift::RpcOptions& rpcOptions) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = numbersCtx(&rpcOptions); auto wrappedCallback = apache::thrift::createStreamClientCallback( apache::thrift::RequestClientCallback::Ptr(&callback), rpcOptions.getBufferOptions()); callback.waitUntilDone( evb, [&] { numbersImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback)); }); if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { return recv_numbers(returnState); }); } folly::SemiFuture> apache::thrift::Client<::cpp2::C>::semifuture_numbers() { ::apache::thrift::RpcOptions rpcOptions; return semifuture_numbers(rpcOptions); } folly::SemiFuture> apache::thrift::Client<::cpp2::C>::semifuture_numbers(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_numbers, channel_); auto callback = std::move(callbackAndFuture.first); numbers(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } folly::SemiFuture, std::unique_ptr>> apache::thrift::Client<::cpp2::C>::header_semifuture_numbers(apache::thrift::RpcOptions& rpcOptions) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_numbers, channel_); auto callback = std::move(callbackAndFuture.first); numbers(rpcOptions, std::move(callback)); return std::move(callbackAndFuture.second); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_wrapped_numbers(apache::thrift::ClientBufferedStream<::cpp2::number>& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::C_numbers_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } apache::thrift::ClientBufferedStream<::cpp2::number> apache::thrift::Client<::cpp2::C>::recv_numbers(::apache::thrift::ClientReceiveState& state) { apache::thrift::ClientBufferedStream<::cpp2::number> _return; auto ew = recv_wrapped_numbers(_return, state); if (ew) { ew.throw_exception(); } return _return; } apache::thrift::ClientBufferedStream<::cpp2::number> apache::thrift::Client<::cpp2::C>::recv_instance_numbers(::apache::thrift::ClientReceiveState& state) { return recv_numbers(state); } folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_instance_wrapped_numbers(apache::thrift::ClientBufferedStream<::cpp2::number>& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_numbers(_return, state); } void apache::thrift::Client<::cpp2::C>::thing(std::unique_ptr callback, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { ::apache::thrift::RpcOptions rpcOptions; thing(rpcOptions, std::move(callback), p_a, p_b, p_c); } void apache::thrift::Client<::cpp2::C>::thing(apache::thrift::RpcOptions& rpcOptions, std::unique_ptr callback, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { auto [ctx, header] = thingCtx(&rpcOptions); apache::thrift::RequestCallback::Context callbackContext; callbackContext.protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto* contextStack = ctx.get(); if (callback) { callbackContext.ctx = std::move(ctx); } auto wrappedCallback = apache::thrift::toRequestClientCallbackPtr(std::move(callback), std::move(callbackContext)); thingImpl(rpcOptions, std::move(header), contextStack, std::move(wrappedCallback), p_a, p_b, p_c); } void apache::thrift::Client<::cpp2::C>::thingImpl(apache::thrift::RpcOptions& rpcOptions, std::shared_ptr header, apache::thrift::ContextStack* contextStack, apache::thrift::RequestClientCallback::Ptr callback, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c, bool stealRpcOptions) { switch (apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolWriter writer; if (stealRpcOptions) { thingT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_a, p_b, p_c); } else { thingT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_a, p_b, p_c); } break; } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolWriter writer; if (stealRpcOptions) { thingT(&writer, std::move(rpcOptions), std::move(header), contextStack, std::move(callback), p_a, p_b, p_c); } else { thingT(&writer, rpcOptions, std::move(header), contextStack, std::move(callback), p_a, p_b, p_c); } break; } default: { apache::thrift::detail::ac::throw_app_exn("Could not find Protocol"); } } } std::pair<::apache::thrift::ContextStack::UniquePtr, std::shared_ptr<::apache::thrift::transport::THeader>> apache::thrift::Client<::cpp2::C>::thingCtx(apache::thrift::RpcOptions* rpcOptions) { auto header = std::make_shared( apache::thrift::transport::THeader::ALLOW_BIG_FRAMES); header->setProtocolId(channel_->getProtocolId()); if (rpcOptions) { header->setHeaders(rpcOptions->releaseWriteHeaders()); } auto ctx = apache::thrift::ContextStack::createWithClientContext( handlers_, getServiceName(), "C.thing", *header); return {std::move(ctx), std::move(header)}; } void apache::thrift::Client<::cpp2::C>::sync_thing(::std::string& _return, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { ::apache::thrift::RpcOptions rpcOptions; sync_thing(rpcOptions, _return, p_a, p_b, p_c); } void apache::thrift::Client<::cpp2::C>::sync_thing(apache::thrift::RpcOptions& rpcOptions, ::std::string& _return, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { apache::thrift::ClientReceiveState returnState; apache::thrift::ClientSyncCallback callback(&returnState); auto protocolId = apache::thrift::GeneratedAsyncClient::getChannel()->getProtocolId(); auto evb = apache::thrift::GeneratedAsyncClient::getChannel()->getEventBase(); auto ctxAndHeader = thingCtx(&rpcOptions); auto wrappedCallback = apache::thrift::RequestClientCallback::Ptr(&callback); callback.waitUntilDone( evb, [&] { thingImpl(rpcOptions, std::move(ctxAndHeader.second), ctxAndHeader.first.get(), std::move(wrappedCallback), p_a, p_b, p_c); }); if (returnState.isException()) { returnState.exception().throw_exception(); } returnState.resetProtocolId(protocolId); returnState.resetCtx(std::move(ctxAndHeader.first)); SCOPE_EXIT { if (returnState.header() && !returnState.header()->getHeaders().empty()) { rpcOptions.setReadHeaders(returnState.header()->releaseHeaders()); } }; return folly::fibers::runInMainContext([&] { recv_thing(_return, returnState); }); } folly::Future<::std::string> apache::thrift::Client<::cpp2::C>::future_thing(::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { ::apache::thrift::RpcOptions rpcOptions; return future_thing(rpcOptions, p_a, p_b, p_c); } folly::SemiFuture<::std::string> apache::thrift::Client<::cpp2::C>::semifuture_thing(::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { ::apache::thrift::RpcOptions rpcOptions; return semifuture_thing(rpcOptions, p_a, p_b, p_c); } folly::Future<::std::string> apache::thrift::Client<::cpp2::C>::future_thing(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { folly::Promise<::std::string> promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_thing, channel_); thing(rpcOptions, std::move(callback), p_a, p_b, p_c); return future; } folly::SemiFuture<::std::string> apache::thrift::Client<::cpp2::C>::semifuture_thing(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { auto callbackAndFuture = makeSemiFutureCallback(recv_wrapped_thing, channel_); auto callback = std::move(callbackAndFuture.first); thing(rpcOptions, std::move(callback), p_a, p_b, p_c); return std::move(callbackAndFuture.second); } folly::Future>> apache::thrift::Client<::cpp2::C>::header_future_thing(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { folly::Promise>> promise; auto future = promise.getFuture(); auto callback = std::make_unique>(std::move(promise), recv_wrapped_thing, channel_); thing(rpcOptions, std::move(callback), p_a, p_b, p_c); return future; } folly::SemiFuture>> apache::thrift::Client<::cpp2::C>::header_semifuture_thing(apache::thrift::RpcOptions& rpcOptions, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { auto callbackAndFuture = makeHeaderSemiFutureCallback(recv_wrapped_thing, channel_); auto callback = std::move(callbackAndFuture.first); thing(rpcOptions, std::move(callback), p_a, p_b, p_c); return std::move(callbackAndFuture.second); } void apache::thrift::Client<::cpp2::C>::thing(folly::Function callback, ::std::int32_t p_a, const ::std::string& p_b, const ::std::set<::std::int32_t>& p_c) { thing(std::make_unique(std::move(callback)), p_a, p_b, p_c); } #if FOLLY_HAS_COROUTINES #endif // FOLLY_HAS_COROUTINES folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_wrapped_thing(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { if (state.isException()) { return std::move(state.exception()); } if (!state.hasResponseBuffer()) { return folly::make_exception_wrapper("recv_ called without result"); } using result = ::cpp2::C_thing_presult; switch (state.protocolId()) { case apache::thrift::protocol::T_BINARY_PROTOCOL: { apache::thrift::BinaryProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } case apache::thrift::protocol::T_COMPACT_PROTOCOL: { apache::thrift::CompactProtocolReader reader; return apache::thrift::detail::ac::recv_wrapped( &reader, state, _return); } default: { } } return folly::make_exception_wrapper("Could not find Protocol"); } void apache::thrift::Client<::cpp2::C>::recv_thing(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { auto ew = recv_wrapped_thing(_return, state); if (ew) { ew.throw_exception(); } } void apache::thrift::Client<::cpp2::C>::recv_instance_thing(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_thing(_return, state); } folly::exception_wrapper apache::thrift::Client<::cpp2::C>::recv_instance_wrapped_thing(::std::string& _return, ::apache::thrift::ClientReceiveState& state) { return recv_wrapped_thing(_return, state); }