Changeset View
Changeset View
Standalone View
Standalone View
plugins/battery/batteryplugin.h
Show All 32 Lines | 32 | class BatteryPlugin | |||
---|---|---|---|---|---|
33 | : public KdeConnectPlugin | 33 | : public KdeConnectPlugin | ||
34 | { | 34 | { | ||
35 | Q_OBJECT | 35 | Q_OBJECT | ||
36 | 36 | | |||
37 | public: | 37 | public: | ||
38 | explicit BatteryPlugin(QObject *parent, const QVariantList &args); | 38 | explicit BatteryPlugin(QObject *parent, const QVariantList &args); | ||
39 | ~BatteryPlugin() override; | 39 | ~BatteryPlugin() override; | ||
40 | 40 | | |||
41 | public Q_SLOTS: | | |||
42 | bool receivePackage(const NetworkPackage& np) override; | 41 | bool receivePackage(const NetworkPackage& np) override; | ||
43 | void connected() override; | 42 | void connected() override; | ||
44 | 43 | | |||
45 | private: | 44 | private: | ||
46 | // Keep these values in sync with THRESHOLD* constants in | 45 | // Keep these values in sync with THRESHOLD* constants in | ||
47 | // kdeconnect-android:BatteryPlugin.java | 46 | // kdeconnect-android:BatteryPlugin.java | ||
48 | // see README for their meaning | 47 | // see README for their meaning | ||
49 | enum ThresholdBatteryEvent { | 48 | enum ThresholdBatteryEvent { | ||
50 | ThresholdNone = 0, | 49 | ThresholdNone = 0, | ||
51 | ThresholdBatteryLow = 1 | 50 | ThresholdBatteryLow = 1 | ||
52 | }; | 51 | }; | ||
53 | 52 | | |||
54 | BatteryDbusInterface* batteryDbusInterface; | 53 | BatteryDbusInterface* batteryDbusInterface; | ||
55 | }; | 54 | }; | ||
56 | 55 | | |||
57 | #endif | 56 | #endif |