/*
 * Copyright 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/>.
 */

#include "systemdunitmanager.h"

void SystemdUnitManager::setSystemdUnitPropertyEnabled(
    const QString &unitName, const QString &propertyName, bool enabled)
{
    m_systemdDbusInterface.setSystemdUnitPropertyEnabled(unitName, propertyName, enabled);
}

void SystemdUnitManager::setSystemdUnitRun(
        const QString &unitName, bool start)
{
    m_systemdDbusInterface.setSystemdUnitRun(unitName, start, 1);
}

void SystemdUnitManager::setSystemdUnitFreezelimit(
    const QString &unitName, bool freeze)
{
    m_systemdDbusInterface.setSystemdUnitFreezelimit(unitName, freeze, true); // 管理员权限冻结服务
}