Warning, file /frameworks/kidletime/src/abstractsystempoller.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE libraries
0002  * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-or-later
0005  */
0006 
0007 #ifndef ABSTRACTSYSTEMPOLLER_H
0008 #define ABSTRACTSYSTEMPOLLER_H
0009 
0010 #include <kidletime_export.h>
0011 
0012 #include <QObject>
0013 
0014 #define AbstractSystemPoller_iid "org.kde.kidletime.AbstractSystemPoller"
0015 
0016 class KIDLETIME_EXPORT AbstractSystemPoller : public QObject
0017 {
0018     Q_OBJECT
0019 
0020 public:
0021     AbstractSystemPoller(QObject *parent = nullptr);
0022     ~AbstractSystemPoller() override;
0023 
0024     virtual bool isAvailable() = 0;
0025     virtual bool setUpPoller() = 0;
0026     virtual void unloadPoller() = 0;
0027 
0028 public Q_SLOTS:
0029     virtual void addTimeout(int nextTimeout) = 0;
0030     virtual void removeTimeout(int nextTimeout) = 0;
0031 
0032     // TODO KF6: Make it a public method
0033     virtual QList<int> timeouts() const = 0; // clazy:exclude=const-signal-or-slot
0034 
0035     virtual int forcePollRequest() = 0;
0036     virtual void catchIdleEvent() = 0;
0037     virtual void stopCatchingIdleEvents() = 0;
0038 #if KIDLETIME_BUILD_DEPRECATED_SINCE(5, 100)
0039     virtual void simulateUserActivity() = 0;
0040 #endif
0041 
0042 Q_SIGNALS:
0043     void resumingFromIdle();
0044     void timeoutReached(int msec);
0045 };
0046 
0047 Q_DECLARE_INTERFACE(AbstractSystemPoller, AbstractSystemPoller_iid)
0048 
0049 #endif /* ABSTRACTSYSTEMPOLLER_H */