diff --git a/src/ifirmware.h b/src/ifirmware.h index 5fc8773..5efc851 100644 --- a/src/ifirmware.h +++ b/src/ifirmware.h @@ -1,90 +1,91 @@ /* AtCore Copyright (C) <2016> Authors: Tomaz Canabrava Chris Rizzitello Patrick José Pereira This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) version 3, or any later version accepted by the membership of KDE e.V. (or its successor approved by the membership of KDE e.V.), which shall act as a proxy defined in Section 6 of version 3 of the license. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library. If not, see . */ #pragma once #include #include #include "atcore_export.h" class Temperature; class AtCore; struct IFirmwarePrivate; /** * @brief The IFirmware class * Base Class for Firmware Plugins */ class ATCORE_EXPORT IFirmware : public QObject { Q_OBJECT public: IFirmware(); void init(AtCore *parent); ~IFirmware() override; /** * @brief Virtual name to be reimplemnted by Firmware plugin * * Return the name the firmware the plugin is for * @return Firmware Name */ virtual QString name() const = 0; + /** + * @brief Vitural validateCommand to filter commands from messages + * @param lastMessage: last Message from printer + */ + virtual void validateCommand(const QString &lastMessage) = 0; + /** * @brief Virtual translate to be reimplemnted by Firmwareplugin * * Translate common commands to firmware specific command. * @param command: Command command to translate * @return firmware specific translated command */ virtual QByteArray translate(const QString &command) = 0; /** * @brief AtCore Parent of the firmware plugin * @return */ AtCore *core() const; private: IFirmwarePrivate *d; - /** - * @brief Vitural validateCommand to filter commands from messages - * @param lastMessage: last Message from printer - */ - virtual void validateCommand(const QString &lastMessage) = 0; public slots: /** * @brief call Validate Command * @param lastMessage: last message from printer */ void checkCommand(const QByteArray &lastMessage); signals: /** * @brief emit when firmware is ready for a command */ void readyForCommand(void); }; Q_DECLARE_INTERFACE(IFirmware, "org.kde.atelier.core.firmware")