buffet: Support cloud command proxy.

This proxy allows publishing command updates to cloud API.

BUG=chromium:432540
TEST=cros_workon_make buffet --test&&manual

Change-Id: Id5730df60c3d40dfb7254d5f65c84dc51aea09eb
Reviewed-on: https://chromium-review.googlesource.com/228462
Reviewed-by: Anton Muhin <antonm@chromium.org>
Commit-Queue: Anton Muhin <antonm@chromium.org>
Tested-by: Anton Muhin <antonm@chromium.org>
diff --git a/buffet/commands/cloud_command_proxy.h b/buffet/commands/cloud_command_proxy.h
new file mode 100644
index 0000000..0c35c0c
--- /dev/null
+++ b/buffet/commands/cloud_command_proxy.h
@@ -0,0 +1,39 @@
+// Copyright 2014 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_
+#define BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_
+
+#include <base/macros.h>
+
+#include <string>
+
+#include "buffet/commands/command_proxy_interface.h"
+
+namespace buffet {
+
+class CommandInstance;
+class DeviceRegistrationInfo;
+
+// Command proxy which publishes command updates to the cloud.
+class CloudCommandProxy final : public CommandProxyInterface {
+ public:
+  CloudCommandProxy(CommandInstance* command_instance,
+                    DeviceRegistrationInfo* device_registration_info);
+  ~CloudCommandProxy() override = default;
+
+  // CommandProxyInterface implementation/overloads.
+  void OnStatusChanged(const std::string& status) override;
+  void OnProgressChanged(int progress) override;
+
+ private:
+  CommandInstance* command_instance_;
+  DeviceRegistrationInfo* device_registration_info_;
+
+  DISALLOW_COPY_AND_ASSIGN(CloudCommandProxy);
+};
+
+}  // namespace buffet
+
+#endif  // BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_