| 1 | // SPDX-License-Identifier: GPL-3.0-or-later |
| 2 | // Copyright 2019 Juan Palacios <[email protected]> |
| 3 | |
| 4 | #pragma once |
| 5 | |
| 6 | #include "core/icommandqueue.h" |
| 7 | #include <QByteArray> |
| 8 | #include <vector> |
| 9 | |
| 10 | class CommandQueueStub final : public ICommandQueue |
| 11 | { |
| 12 | public: |
| 13 | bool hasCommandQueuedFor(std::string const &) override |
| 14 | { |
| 15 | return false; |
| 16 | } |
| 17 | |
| 18 | void add(std::pair<std::string, std::string> &&cmd) override |
| 19 | { |
| 20 | commands_.emplace_back(std::move(cmd)); |
| 21 | } |
| 22 | |
| 23 | QByteArray toRawData() override |
| 24 | { |
| 25 | return QByteArray(); |
| 26 | } |
| 27 | |
| 28 | std::vector<std::pair<std::string, std::string>> const &commands() |
| 29 | { |
| 30 | return commands_; |
| 31 | } |
| 32 | |
| 33 | void clear() |
| 34 | { |
| 35 | commands_.clear(); |
| 36 | } |
| 37 | |
| 38 | void logCommands() const override |
| 39 | { |
| 40 | } |
| 41 | |
| 42 | private: |
| 43 | std::vector<std::pair<std::string, std::string>> commands_; |
| 44 | }; |