Program Listing for File PowerStatus.hpp

Return to documentation for file (doc/include/PowerStatus.hpp)

#ifndef POWERSTATUS_HPP_
#define POWERSTATUS_HPP_

#include <cstdint>

#include "EmodRet.hpp"

typedef void (*PowerStatusChangeCallback)(const bool externa_lpower, void* const ctx);
typedef void (*PowerFailCallback)(void* const ctx);

class PowerStatus {
public:
    virtual ~PowerStatus(){};

    virtual EmodRet setStatusChangeCallback(const PowerStatusChangeCallback cb, void* const ctx) = 0;

    virtual EmodRet setFailCallback(const PowerFailCallback cb, void* const ctx) = 0;
};

#endif  // POWERSTATUS_HPP_