diff --git a/src/lib/api/public/ApiServer.h b/src/lib/api/public/ApiServer.h index e50be4d3a..6608c1481 100644 --- a/src/lib/api/public/ApiServer.h +++ b/src/lib/api/public/ApiServer.h @@ -15,6 +15,8 @@ namespace bts { namespace api { +template using Response = std::function; + class ServiceContext; class BTS_EXPORT ApiServer { diff --git a/src/lib/api/service_compiler/templates/cpp/server.pb.h b/src/lib/api/service_compiler/templates/cpp/server.pb.h index bf871d788..e582225e0 100644 --- a/src/lib/api/service_compiler/templates/cpp/server.pb.h +++ b/src/lib/api/service_compiler/templates/cpp/server.pb.h @@ -36,7 +36,9 @@ protected: {{cap name}}Publisher make_{{name}}_publisher(const {{input_type}}& qualifier) const; {{else}} // {{comment}} - virtual void {{name}}(const {{input_type}}& request, const std::function& reply) = 0; + virtual void {{name}}( + const {{input_type}}& request, + const api::Response<{{output_type_cpp}}>& reply) = 0; {{/if}} {{/each}}