blob: d1a727d6c939990a0344bddd9697c6898c5fee1d [file] [log] [blame]
Alex Vakulenko515b42b2014-08-07 15:46:31 -07001// 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_DISPATCH_INTERFACE_H_
6#define BUFFET_COMMANDS_COMMAND_DISPATCH_INTERFACE_H_
7
8#include <string>
9
10namespace buffet {
11
12class CommandInstance;
13
14// This is an abstract base interface that a command dispatcher will implement.
15// It allows to abstract out the actual transport layer, such as D-Bus, from
16// the rest of command registration and delivery subsystems.
17class CommandDispachInterface {
18 public:
19 virtual ~CommandDispachInterface() = default;
20 // Callback invoked by CommandQueue when a new command is added to the queue.
Alex Vakulenkofedc4872014-08-20 12:38:43 -070021 virtual void OnCommandAdded(CommandInstance* command_instance) = 0;
Alex Vakulenko515b42b2014-08-07 15:46:31 -070022 // Callback invoked by CommandQueue when a new command is removed from
23 // the queue.
Alex Vakulenkofedc4872014-08-20 12:38:43 -070024 virtual void OnCommandRemoved(CommandInstance* command_instance) = 0;
Alex Vakulenko515b42b2014-08-07 15:46:31 -070025};
26
27} // namespace buffet
28
29#endif // BUFFET_COMMANDS_COMMAND_DISPATCH_INTERFACE_H_