KIdleTime

abstractsystempoller.h
1 /* This file is part of the KDE libraries
2  * SPDX-FileCopyrightText: 2009 Dario Freddi <drf at kde.org>
3  *
4  * SPDX-License-Identifier: LGPL-2.0-only
5  */
6 
7 #ifndef ABSTRACTSYSTEMPOLLER_H
8 #define ABSTRACTSYSTEMPOLLER_H
9 
10 #include <kidletime_export.h>
11 
12 #include <QObject>
13 
14 class KIDLETIME_EXPORT AbstractSystemPoller : public QObject
15 {
16  Q_OBJECT
17 
18 public:
19 
20  AbstractSystemPoller(QObject *parent = nullptr);
21  virtual ~AbstractSystemPoller();
22 
23  virtual bool isAvailable() = 0;
24  virtual bool setUpPoller() = 0;
25  virtual void unloadPoller() = 0;
26 
27 public Q_SLOTS:
28  virtual void addTimeout(int nextTimeout) = 0;
29  virtual void removeTimeout(int nextTimeout) = 0;
30  virtual QList<int> timeouts() const = 0;
31  virtual int forcePollRequest() = 0;
32  virtual void catchIdleEvent() = 0;
33  virtual void stopCatchingIdleEvents() = 0;
34  virtual void simulateUserActivity() = 0;
35 
36 Q_SIGNALS:
37  void resumingFromIdle();
38  void timeoutReached(int msec);
39 
40 };
41 
42 Q_DECLARE_INTERFACE(AbstractSystemPoller, "org.kde.kidletime.AbstractSystemPoller")
43 
44 #endif /* ABSTRACTSYSTEMPOLLER_H */
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Fri Jun 5 2020 22:50:27 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.