File indexing completed on 2024-04-21 05:50:56

0001 /*
0002  * SPDX-FileCopyrightText: 2020 Dimitris Kardarakos <dimkard@posteo.net>
0003  *
0004  * SPDX-License-Identifier: GPL-3.0-or-later
0005  */
0006 
0007 #ifndef SOLIDWAKEUPBACKEND_H
0008 #define SOLIDWAKEUPBACKEND_H
0009 
0010 #include "wakeupbackend.h"
0011 
0012 class QDBusInterface;
0013 
0014 class SolidWakeupBackend : public WakeupBackend
0015 {
0016 public:
0017     explicit SolidWakeupBackend(QObject *parent = nullptr);
0018 
0019     /**
0020      * @brief Schedule a wakeup at the time provided
0021      *
0022      * @param callbackInfo should provide:
0023      * dbus-service: the D-Bus service to call back after waking up
0024      * dbus-path: The path of the D-Bus service to call back after waking up
0025      * @param wakeupAt The exact time (in seconds) to schedule the wake-up
0026      * @return The scheduled wakeup returned by the power manager module
0027      */
0028     virtual QVariant scheduleWakeup(const QVariantMap &callbackInfo, const quint64 wakeupAt) override;
0029 
0030     /**
0031      * @brief Clear a scheduled wake-up
0032      *
0033      * @param scheduledWakeup The integer cookie of the scheduled wake up
0034      */
0035     virtual void clearWakeup(const QVariant &scheduledWakeup) override;
0036 
0037     /**
0038      * @return True if the backend offers wakeup features
0039      */
0040     virtual bool isWakeupBackend() const override;
0041 
0042 private:
0043     QDBusInterface *m_interface;
0044 };
0045 
0046 #endif // SOLIDWAKEUPBACKEND_H