/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Copyright 2013 - 2020, nymea GmbH
* Contact: contact@nymea.io
*
* This file is part of maveod.
* This project including source code and documentation is protected by
* copyright law, and remains the property of nymea GmbH. All rights, including
* reproduction, publication, editing and translation, are reserved. The use of
* this project is subject to the terms of a license agreement to be concluded
* with nymea GmbH in accordance with the terms of use of nymea GmbH, available
* under https://nymea.io/license
*
* For any further details and any questions please contact us under
* contact@nymea.io or see our FAQ/Licensing Information on
* https://nymea.io/license/faq
*
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */

#ifndef HARDWAREMANAGER_H
#define HARDWAREMANAGER_H

#include <QObject>

#include "ledcontroller.h"
#include <gpiobutton.h>

class HardwareManager : public QObject
{
    Q_OBJECT
public:
    explicit HardwareManager(QObject *parent = nullptr);
    ~HardwareManager();

    LedController *ledController() const;

private:
    GpioButton *m_userButton = nullptr;
    GpioButton *m_resetButton = nullptr;
    LedController *m_ledController = nullptr;

signals:
    void userButtonClicked();
    void userButtonLongPressed();

    void resetButtonClicked();
    void resetButtonLongPressed();

public slots:
    void enable();
    void disable();

};

#endif // HARDWAREMANAGER_H
