blob: e78ff445537431b67c5fec75f8b1ae2c6975cf0e [file] [log] [blame]
Anton Muhin59755522014-11-05 21:30:12 +04001// 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
14namespace buffet {
15
16class CommandInstance;
17class DeviceRegistrationInfo;
18
19// Command proxy which publishes command updates to the cloud.
20class 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 Muhincfde8692014-11-25 03:36:59 +040027 void OnResultsChanged(const native_types::Object& results) override;
Anton Muhin59755522014-11-05 21:30:12 +040028 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_