Improve specificity of namespaces in generated service code.

This commit is contained in:
Eric Harding committed 2017-08-25 15:04:43 -04:00
1 parent 2ec5233de5
commit 3a1df1b7ff
2 files changed
+5 -5

No files matched your search

@@ -44,15 +44,15 @@ using namespace rxcpp::operators;
{{else}}
void {{../name}}::{{name}}(const {{input_type}}& input, std::function<void(Result<{{output_type}}>)> callback, uint32_t timeout_ms) {
void {{../name}}::{{name}}(const {{input_type}}& input, std::function<void(bts::api::Result<{{output_type}}>)> callback, uint32_t timeout_ms) {
_pchannel->send({{@index}}, input, callback);
}
Result<{{output_type}}> {{../name}}::{{name}}(const {{input_type}}& input, uint32_t timeout_ms) {
bts::api::Result<{{output_type}}> {{../name}}::{{name}}(const {{input_type}}& input, uint32_t timeout_ms) {
if (_pchannel->is_sync_call_ok()) {
std::promise<Result<{{output_type}}>> p;
std::promise<bts::api::Result<{{output_type}}>> p;
auto future = p.get_future();
{{name}}(input, [&](Result<{{output_type}}> res) {
{{name}}(input, [&](bts::api::Result<{{output_type}}> res) {
p.set_value(res);
}, timeout_ms);
future.wait();
@@ -47,7 +47,7 @@ void {{name}}Base::dispatch(const bts::api::RequestHeader& header, google::proto
default: {
bts::api::ResponseHeader response;
response.set_request_id(header.request_id());
response.set_code(ApiError::MISSING_METHOD);
response.set_code(bts::api::ApiError::MISSING_METHOD);
uint8_t buffer[64];
int header_size = response.ByteSize() + 1;
serialize(header_size, response, buffer);