Alex Vakulenko | f6b3871 | 2014-09-03 16:23:38 -0700 | [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_COMMAND_PROXY_INTERFACE_H_ |
| 6 | #define BUFFET_COMMANDS_COMMAND_PROXY_INTERFACE_H_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
Anton Muhin | cfde869 | 2014-11-25 03:36:59 +0400 | [diff] [blame] | 10 | #include "buffet/commands/schema_utils.h" |
| 11 | |
Alex Vakulenko | f6b3871 | 2014-09-03 16:23:38 -0700 | [diff] [blame] | 12 | namespace buffet { |
| 13 | |
| 14 | // This interface lets the command instance to update its proxy of command |
| 15 | // state changes, so that the proxy can then notify clients of the changes over |
| 16 | // their supported protocol (e.g. D-Bus). |
| 17 | class CommandProxyInterface { |
| 18 | public: |
| 19 | virtual ~CommandProxyInterface() = default; |
| 20 | |
Anton Muhin | cfde869 | 2014-11-25 03:36:59 +0400 | [diff] [blame] | 21 | virtual void OnResultsChanged(const native_types::Object& results) = 0; |
Alex Vakulenko | f6b3871 | 2014-09-03 16:23:38 -0700 | [diff] [blame] | 22 | virtual void OnStatusChanged(const std::string& status) = 0; |
| 23 | virtual void OnProgressChanged(int progress) = 0; |
| 24 | }; |
| 25 | |
| 26 | } // namespace buffet |
| 27 | |
| 28 | #endif // BUFFET_COMMANDS_COMMAND_PROXY_INTERFACE_H_ |