/**
 * Copyright © 2020 IBM Corporation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
#include "power_interface.hpp"

#include "sdbusplus.hpp"

namespace phosphor::fan::monitor
{

constexpr auto systemdService = "org.freedesktop.systemd1";
constexpr auto systemdPath = "/org/freedesktop/systemd1";
constexpr auto systemdMgrIface = "org.freedesktop.systemd1.Manager";

void PowerInterface::softPowerOff()
{
    util::SDBusPlus::callMethod(systemdService, systemdPath, systemdMgrIface,
                                "StartUnit", "obmc-host-shutdown@0.target",
                                "replace");
}

void PowerInterface::executeHardPowerOff()
{
    util::SDBusPlus::callMethod(
        systemdService, systemdPath, systemdMgrIface, "StartUnit",
        "obmc-chassis-hard-poweroff@0.target", "replace");
}

void PowerInterface::hardPowerOff()
{
    executeHardPowerOff();
}

} // namespace phosphor::fan::monitor
