/*
 * Copyright (C) 2023, KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <https://www.gnu.org/licenses/>.
 *
 */
#ifndef UPM_FRACTIONALFREEZING_H
#define UPM_FRACTIONALFREEZING_H

#include <QObject>

#include "common.h"

enum fractionalFreezingBackupState
{
    fractionalFreezingNoBackup = 0,
    fractionalFreezingOff,
    fractionalFreezingOnSoftFreezeModeOff,
    fractionalFreezingOnSoftFreezeModeOn,
};

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

    void dealBatteryLowState(bool);
private:
    bool m_enableFractionalFreezing;
    bool m_enableSoftFreezeMode;
    bool m_autoEnableSoftFreezeMode;

    int m_fractionalFreezingBackupState;

    bool m_batteryLowState = false;

private slots:
    void dealEnableFractionalFreezingChanged(QVariant);
    void dealEnableSoftFreezeModeChanged(QVariant);
    void dealAutoEnableSoftFreezeModeChanged(QVariant);


signals:

};

#endif // UPM_FRACTIONALFREEZING_H
