libweave: Add more methods to modify weave::Command

Added SetProgress, SetResults, Abort, Cancel and Done methods.
base::DictionaryValue is used as type for complex values.
Switched DBusCommandProxy to weave::Command interface.

BUG=brillo:1245
TEST='FEATURES=test emerge-gizmo buffet'

Change-Id: I3a4a7f2ee63041c9f6b60b0af18d8d3d2c0cc7e6
Reviewed-on: https://chromium-review.googlesource.com/288250
Reviewed-by: Alex Vakulenko <avakulenko@chromium.org>
Commit-Queue: Vitaly Buka <vitalybuka@chromium.org>
Tested-by: Vitaly Buka <vitalybuka@chromium.org>
diff --git a/libweave/src/commands/command_instance.h b/libweave/src/commands/command_instance.h
index 0fdc643..e911ede 100644
--- a/libweave/src/commands/command_instance.h
+++ b/libweave/src/commands/command_instance.h
@@ -50,6 +50,13 @@
   std::unique_ptr<base::DictionaryValue> GetParameters() const override;
   std::unique_ptr<base::DictionaryValue> GetProgress() const override;
   std::unique_ptr<base::DictionaryValue> GetResults() const override;
+  bool SetProgress(const base::DictionaryValue& progress,
+                   chromeos::ErrorPtr* error) override;
+  bool SetResults(const base::DictionaryValue& results,
+                  chromeos::ErrorPtr* error) override;
+  void Abort() override;
+  void Cancel() override;
+  void Done() override;
 
   // Returns command definition.
   const CommandDefinition* GetCommandDefinition() const {
@@ -77,21 +84,6 @@
   // Sets the pointer to queue this command is part of.
   void SetCommandQueue(CommandQueue* queue) { queue_ = queue; }
 
-  // Updates the command progress. The |progress| should match the schema.
-  // Returns false if |results| value is incorrect.
-  bool SetProgress(const ValueMap& progress);
-
-  // Updates the command results. The |results| should match the schema.
-  // Returns false if |results| value is incorrect.
-  bool SetResults(const ValueMap& results);
-
-  // Aborts command execution.
-  void Abort();
-  // Cancels command execution.
-  void Cancel();
-  // Marks the command as completed successfully.
-  void Done();
-
   // Values for command execution status.
   static const char kStatusQueued[];
   static const char kStatusInProgress[];