-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default template implementation added
- Loading branch information
1 parent
8db3860
commit 9c58bb4
Showing
7 changed files
with
78 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
/* ${method.name} - ${method.description} */ | ||
uint32_t ${info.title}_${method.Name}( ${method.signature.params} ) | ||
uint32_t ${info.Title}_${method.Name}( ${method.signature.params} ) | ||
{ | ||
const string method = _T("${info.title}.${method.name}"); | ||
${if.params} | ||
${method.params.serialization} | ||
${end.if.params} | ||
${if.params}${method.params.serialization}${end.if.params} | ||
return FireboltSDK::Properties::Set(method, jsonParameters); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
/* ${method.name} - ${method.description} | ||
${method.params.annotations}${if.deprecated} * @deprecated ${method.deprecation}${end.if.deprecated} */ | ||
uint32_t ${info.Title}_${method.Name}( ${method.signature.params}${if.result}${if.params}, ${end.if.params}${method.result.type}* ${method.result.name}${end.if.result}${if.signature.empty}void${end.if.signature.empty} ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,21 @@ | ||
/* ${method.name} - ${method.description} */ | ||
uint32_t ${info.title}_${method.Name}(${method.params.list}${if.params}, ${end.if.params}${method.result.type}* ${method.result.name}) { | ||
uint32_t status = FireboltSDKErrorUnavailable; | ||
FireboltSDK::Transport<WPEFramework::Core::JSON::IElement>* transport = FireboltSDK::Accessor::Instance().GetTransport(); | ||
if (transport != nullptr) { | ||
|
||
JsonObject jsonParameters; | ||
uint32_t ${info.Title}_${method.Name}( ${method.signature.params}${if.result}${if.params}, ${end.if.params}${method.result.type}* ${method.result.name}${end.if.result}${if.signature.empty}void${end.if.signature.empty} ) { | ||
|
||
${if.params} | ||
${method.params.json} | ||
${end.if.params} | ||
uint32_t status = FireboltSDKErrorUnavailable; | ||
FireboltSDK::Transport<WPEFramework::Core::JSON::IElement>* transport = FireboltSDK::Accessor::Instance().GetTransport(); | ||
if (transport != nullptr) { | ||
|
||
WPEFramework::Core::JSON::Boolean jsonResult; | ||
status = transport->Invoke("${info.title}.${method.name}", jsonParameters, jsonResult); | ||
if (status == FireboltSDKErrorNone) { | ||
*success = jsonResult.Value(); | ||
} | ||
${method.params.serialization.with.indent} | ||
${method.result.json.type} jsonResult; | ||
status = transport->Invoke("${info.title}.${method.name}", jsonParameters, jsonResult); | ||
if (status == FireboltSDKErrorNone) { | ||
FIREBOLT_LOG_INFO(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "${info.Title}.${method.name} is successfully invoked"); | ||
${method.result.instantiation} | ||
} | ||
|
||
} else { | ||
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status); | ||
} | ||
} else { | ||
FIREBOLT_LOG_ERROR(FireboltSDK::Logger::Category::OpenRPC, FireboltSDK::Logger::Module<FireboltSDK::Accessor>(), "Error in getting Transport err = %d", status); | ||
} | ||
|
||
return status; | ||
return status; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters