Anton Muhin | 5975552 | 2014-11-05 21:30:12 +0400 | [diff] [blame] | 1 | // Copyright 2014 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
| 5 | #ifndef BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_ |
| 6 | #define BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_ |
| 7 | |
| 8 | #include <base/macros.h> |
| 9 | |
| 10 | #include <string> |
| 11 | |
| 12 | #include "buffet/commands/command_proxy_interface.h" |
| 13 | |
| 14 | namespace buffet { |
| 15 | |
| 16 | class CommandInstance; |
| 17 | class DeviceRegistrationInfo; |
| 18 | |
| 19 | // Command proxy which publishes command updates to the cloud. |
| 20 | class CloudCommandProxy final : public CommandProxyInterface { |
| 21 | public: |
| 22 | CloudCommandProxy(CommandInstance* command_instance, |
| 23 | DeviceRegistrationInfo* device_registration_info); |
| 24 | ~CloudCommandProxy() override = default; |
| 25 | |
| 26 | // CommandProxyInterface implementation/overloads. |
Anton Muhin | cfde869 | 2014-11-25 03:36:59 +0400 | [diff] [blame] | 27 | void OnResultsChanged(const native_types::Object& results) override; |
Anton Muhin | 5975552 | 2014-11-05 21:30:12 +0400 | [diff] [blame] | 28 | void OnStatusChanged(const std::string& status) override; |
| 29 | void OnProgressChanged(int progress) override; |
| 30 | |
| 31 | private: |
| 32 | CommandInstance* command_instance_; |
| 33 | DeviceRegistrationInfo* device_registration_info_; |
| 34 | |
| 35 | DISALLOW_COPY_AND_ASSIGN(CloudCommandProxy); |
| 36 | }; |
| 37 | |
| 38 | } // namespace buffet |
| 39 | |
| 40 | #endif // BUFFET_COMMANDS_CLOUD_COMMAND_PROXY_H_ |