aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/daemon/sample/sample.cc13
1 files changed, 7 insertions, 6 deletions
diff --git a/examples/daemon/sample/sample.cc b/examples/daemon/sample/sample.cc
index 1d036d5..f4ad3d9 100644
--- a/examples/daemon/sample/sample.cc
+++ b/examples/daemon/sample/sample.cc
@@ -19,6 +19,9 @@ const char kTraits[] = R"({
"minimalRole": "user",
"parameters": {
"name": { "type": "string" }
+ },
+ "results": {
+ "reply": { "type": "string" }
}
},
"ping": {
@@ -107,10 +110,9 @@ class SampleHandler {
base::FundamentalValue{++ping_count_}, nullptr);
LOG(INFO) << "New component state: " << device_->GetComponents();
- base::DictionaryValue result;
- cmd->Complete(result, nullptr);
+ cmd->Complete({}, nullptr);
- LOG(INFO) << cmd->GetName() << " command finished: " << result;
+ LOG(INFO) << cmd->GetName() << " command finished";
}
void OnCountdownCommand(const std::weak_ptr<weave::Command>& command) {
@@ -146,10 +148,9 @@ class SampleHandler {
return;
}
- base::DictionaryValue result;
- cmd->Complete(result, nullptr);
+ cmd->Complete({}, nullptr);
LOG(INFO) << "countdown finished";
- LOG(INFO) << cmd->GetName() << " command finished: " << result;
+ LOG(INFO) << cmd->GetName() << " command finished";
}
weave::Device* device_{nullptr};