Skip to content

Commit

Permalink
fix: C++ Pascal casing method name (#233)
Browse files Browse the repository at this point in the history
  • Loading branch information
AdityaKasar authored Nov 27, 2024
1 parent aba491e commit ed1106f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions languages/cpp/templates/methods/allowsFocus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
JsonObject jsonParameters;
${method.params.serialization}

Firebolt::Error status = FireboltSDK::Async::Instance().Invoke<${method.result.json.type}>(_T("${info.title.lowercase}.${method.name}"), jsonParameters, ${method.name}AsyncResponseInnerCallback, reinterpret_cast<void*>(&response));
Firebolt::Error status = FireboltSDK::Async::Instance().Invoke<${method.result.json.type}>(_T("${info.title}.${method.name}"), jsonParameters, ${method.name}AsyncResponseInnerCallback, reinterpret_cast<void*>(&response));
if (status == Firebolt::Error::None) {
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "${info.Title}.${method.name} is successfully invoked");
} else {
Expand All @@ -38,7 +38,7 @@
}
void ${info.Title}Impl::abort${method.Name}(I${info.Title}AsyncResponse& response, Firebolt::Error *err)
{
Firebolt::Error status = FireboltSDK::Async::Instance().Abort(_T("${info.title.lowercase}.${method.name}"), reinterpret_cast<void*>(&response));
Firebolt::Error status = FireboltSDK::Async::Instance().Abort(_T("${info.title}.${method.name}"), reinterpret_cast<void*>(&response));
if (err != nullptr) {
*err = status;
}
Expand Down
2 changes: 1 addition & 1 deletion languages/cpp/templates/methods/calls-metrics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
JsonObject jsonParameters;
${method.params.serialization.with.indent}
${method.result.json.type} jsonResult;
status = transport->Invoke("${info.title.lowercase}.${method.name}", jsonParameters, jsonResult);
status = transport->Invoke("${info.title}.${method.name}", jsonParameters, jsonResult);
if (status == Firebolt::Error::None) {
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "${info.Title}.${method.name} is successfully invoked");
${if.result.nonvoid}${method.result.instantiation.with.indent}${end.if.result.nonvoid}
Expand Down
2 changes: 1 addition & 1 deletion languages/cpp/templates/methods/default.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
JsonObject jsonParameters;
${method.params.serialization.with.indent}
${method.result.json.type} jsonResult;
statusError = transport->Invoke("${info.title.lowercase}.${method.name}", jsonParameters, jsonResult);
statusError = transport->Invoke("${info.title}.${method.name}", jsonParameters, jsonResult);
if (statusError == Firebolt::Error::None) {
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "${info.Title}.${method.name} is successfully invoked");
${if.result.nonvoid}${method.result.instantiation.with.indent}${end.if.result.nonvoid}
Expand Down
4 changes: 2 additions & 2 deletions languages/cpp/templates/methods/event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
}
void ${info.Title}Impl::globalSubscribe( I${info.Title}::I${method.Name}Notification& notification, Firebolt::Error *err )
{
const string eventName = _T("${info.title.lowercase}.${method.rpc.name}");
const string eventName = _T("${info.title}.${method.rpc.name}");
Firebolt::Error status = Firebolt::Error::None;

JsonObject jsonParameters;
Expand All @@ -66,7 +66,7 @@
}
void ${info.Title}Impl::globalUnsubscribe( I${info.Title}::I${method.Name}Notification& notification, Firebolt::Error *err )
{
Firebolt::Error status = FireboltSDK::Event::Instance().Unsubscribe(_T("${info.title.lowercase}.${method.rpc.name}"), reinterpret_cast<void*>(&notification));
Firebolt::Error status = FireboltSDK::Event::Instance().Unsubscribe(_T("${info.title}.${method.rpc.name}"), reinterpret_cast<void*>(&notification));

if (err != nullptr) {
*err = status;
Expand Down

0 comments on commit ed1106f

Please sign in to comment.