#include "debugHostSelector_button.hpp"
// add the button iface class to registry
static ButtonIFRegister<DebugHostSelector> buttonRegister;
using namespace phosphor::logging;

void DebugHostSelector::simPress()
{
    pressed();
}

void DebugHostSelector::simRelease()
{
    released();
}

void DebugHostSelector::simLongPress()
{
    pressedLong();
}

/**
 * @brief This method is called from sd-event provided callback function
 * callbackHandler if platform specific event handling is needed then a
 * derived class instance with its specific event handling logic along with
 * init() function can be created to override the default event handling
 */

void DebugHostSelector::handleEvent(sd_event_source* /* es */, int fd,
                                    uint32_t /* revents*/)
{
    int n = -1;
    char buf = '0';

    n = ::lseek(fd, 0, SEEK_SET);

    if (n < 0)
    {
        lg2::error("GPIO fd lseek error!  : {FORM_FACTOR_TYPE}",
                   "FORM_FACTOR_TYPE", getFormFactorType());
        return;
    }

    n = ::read(fd, &buf, sizeof(buf));
    if (n < 0)
    {
        lg2::error("GPIO fd read error!  : {FORM_FACTOR_TYPE}",
                   "FORM_FACTOR_TYPE", getFormFactorType());
        throw sdbusplus::xyz::openbmc_project::Chassis::Common::Error::
            IOError();
    }

    if (buf == '0')
    {
        lg2::info("Button pressed : {FORM_FACTOR_TYPE}", "FORM_FACTOR_TYPE",
                  getFormFactorType());
        // emit pressed signal
        pressed();
    }
    else
    {
        lg2::info("Button released{FORM_FACTOR_TYPE}", "FORM_FACTOR_TYPE",
                  getFormFactorType());
        // emit released signal
        released();
    }
}