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 WAKEUPBACKEND_H 0008 #define WAKEUPBACKEND_H 0009 0010 #include <QObject> 0011 #include <QVariantMap> 0012 0013 /** 0014 * @brief Power management backend that offers scheduling wake up at a time specified 0015 * 0016 */ 0017 class WakeupBackend : public QObject 0018 { 0019 public: 0020 explicit WakeupBackend(QObject *parent = nullptr) : QObject {parent} {} 0021 0022 /** 0023 * @brief Schedule a wake-up at the time provided 0024 * 0025 * @param callbackInfo Information about the method to call back after awaking by the power manager module 0026 * @return The scheduled wakeup returned by the power manager module 0027 */ 0028 virtual QVariant scheduleWakeup(const QVariantMap &callbackInfo, const quint64 wakeupAt) = 0; 0029 0030 /** 0031 * @brief Clear a scheduled wake-up 0032 * 0033 * @param scheduledWakeup The scheduled wake up, as returned by the scheduleWakeup method 0034 */ 0035 virtual void clearWakeup(const QVariant &scheduledWakeup) = 0; 0036 0037 /** 0038 * @return True if the backend offers wakeup features 0039 */ 0040 virtual bool isWakeupBackend() const = 0; 0041 0042 }; 0043 0044 #endif // WAKEUPBACKEND_H