Changeset View
Changeset View
Standalone View
Standalone View
src/solid/devices/backends/iokit/iokitbattery.h
Show All 35 Lines | |||||
36 | { | 36 | { | ||
37 | Q_OBJECT | 37 | Q_OBJECT | ||
38 | Q_INTERFACES(Solid::Ifaces::Battery) | 38 | Q_INTERFACES(Solid::Ifaces::Battery) | ||
39 | 39 | | |||
40 | public: | 40 | public: | ||
41 | Battery(IOKitDevice *device); | 41 | Battery(IOKitDevice *device); | ||
42 | virtual ~Battery(); | 42 | virtual ~Battery(); | ||
43 | 43 | | |||
44 | bool isPresent() const; | 44 | bool isPresent() const Q_DECL_OVERRIDE; | ||
45 | Solid::Battery::BatteryType type() const; | 45 | Solid::Battery::BatteryType type() const Q_DECL_OVERRIDE; | ||
46 | 46 | | |||
47 | int chargePercent() const; | 47 | int chargePercent() const Q_DECL_OVERRIDE; | ||
48 | int capacity() const; | 48 | int capacity() const Q_DECL_OVERRIDE; | ||
49 | 49 | | |||
50 | bool isRechargeable() const; | 50 | bool isRechargeable() const Q_DECL_OVERRIDE; | ||
51 | bool isPowerSupply() const; | 51 | bool isPowerSupply() const Q_DECL_OVERRIDE; | ||
52 | 52 | | |||
53 | Solid::Battery::ChargeState chargeState() const; | 53 | Solid::Battery::ChargeState chargeState() const Q_DECL_OVERRIDE; | ||
54 | | ||||
55 | qlonglong timeToEmpty() const Q_DECL_OVERRIDE; | ||||
56 | qlonglong timeToFull() const Q_DECL_OVERRIDE; | ||||
57 | double voltage() const Q_DECL_OVERRIDE; | ||||
58 | double temperature() const Q_DECL_OVERRIDE; | ||||
59 | QString serial() const Q_DECL_OVERRIDE; | ||||
54 | 60 | | |||
55 | // ### the ones below are TODO | 61 | // ### the ones below are TODO | ||
56 | qlonglong timeToEmpty() const { return 0; } | 62 | Solid::Battery::Technology technology() const Q_DECL_OVERRIDE { return Solid::Battery::UnknownTechnology; } | ||
57 | qlonglong timeToFull() const { return 0; } | 63 | double energy() const Q_DECL_OVERRIDE { return 0.0; } | ||
58 | Solid::Battery::Technology technology() const { return Solid::Battery::UnknownTechnology; } | 64 | double energyFull() const Q_DECL_OVERRIDE { return 0.0; } | ||
59 | double energy() const { return 0.0; } | 65 | double energyFullDesign() const Q_DECL_OVERRIDE { return 0.0; } | ||
60 | double energyFull() const { return 0.0; } | 66 | double energyRate() const Q_DECL_OVERRIDE { return 0.0; } | ||
61 | double energyFullDesign() const { return 0.0; } | 67 | | ||
62 | double energyRate() const { return 0.0; } | 68 | bool isRecalled() const Q_DECL_OVERRIDE { return false; } | ||
63 | double voltage() const { return 0.0; } | 69 | QString recallVendor() const Q_DECL_OVERRIDE { return QString(); } | ||
64 | double temperature() const { return 0.0; } | 70 | QString recallUrl() const Q_DECL_OVERRIDE { return QString(); } | ||
65 | | ||||
66 | bool isRecalled() const { return false; } | | |||
67 | QString recallVendor() const { return QString(); } | | |||
68 | QString recallUrl() const { return QString(); } | | |||
69 | QString serial() const { return QString(); } | | |||
70 | 71 | | |||
71 | qlonglong remainingTime() const { return -1; } | 72 | qlonglong remainingTime() const Q_DECL_OVERRIDE { return -1; } | ||
72 | 73 | | |||
73 | Q_SIGNALS: | 74 | Q_SIGNALS: | ||
74 | void energyChanged(double energy, const QString &udi); | 75 | void energyChanged(double energy, const QString &udi) Q_DECL_OVERRIDE; | ||
75 | void energyFullChanged(double energyFull, const QString &udi); | 76 | void energyFullChanged(double energyFull, const QString &udi) Q_DECL_OVERRIDE; | ||
76 | void energyFullDesignChanged(double energyFullDesign, const QString &udi); | 77 | void energyFullDesignChanged(double energyFullDesign, const QString &udi) Q_DECL_OVERRIDE; | ||
77 | void energyRateChanged(double energyRate, const QString &udi); | 78 | void energyRateChanged(double energyRate, const QString &udi) Q_DECL_OVERRIDE; | ||
78 | void chargePercentChanged(int value, const QString &udi); | 79 | void chargePercentChanged(int value, const QString &udi) Q_DECL_OVERRIDE; | ||
79 | void capacityChanged(int value, const QString &udi); | 80 | void capacityChanged(int value, const QString &udi) Q_DECL_OVERRIDE; | ||
80 | void chargeStateChanged(int newState, const QString &udi); | 81 | void chargeStateChanged(int newState, const QString &udi) Q_DECL_OVERRIDE; | ||
81 | void presentStateChanged(bool newState, const QString &udi); | 82 | void presentStateChanged(bool newState, const QString &udi) Q_DECL_OVERRIDE; | ||
82 | void powerSupplyStateChanged(bool newState, const QString &udi); | 83 | void powerSupplyStateChanged(bool newState, const QString &udi) Q_DECL_OVERRIDE; | ||
83 | void timeToEmptyChanged(qlonglong time, const QString &udi); | 84 | void timeToEmptyChanged(qlonglong time, const QString &udi) Q_DECL_OVERRIDE; | ||
84 | void timeToFullChanged(qlonglong time, const QString &udi); | 85 | void timeToFullChanged(qlonglong time, const QString &udi) Q_DECL_OVERRIDE; | ||
85 | void temperatureChanged(double temperature, const QString &udi); | 86 | void temperatureChanged(double temperature, const QString &udi) Q_DECL_OVERRIDE; | ||
86 | void voltageChanged(double voltage, const QString &udi); | 87 | void voltageChanged(double voltage, const QString &udi) Q_DECL_OVERRIDE; | ||
87 | void remainingTimeChanged(qlonglong time, const QString &udi); | 88 | void remainingTimeChanged(qlonglong time, const QString &udi) Q_DECL_OVERRIDE; | ||
88 | }; | 89 | }; | ||
89 | } | 90 | } | ||
90 | } | 91 | } | ||
91 | } | 92 | } | ||
92 | 93 | | |||
93 | #endif // SOLID_BACKENDS_IOKIT_BATTERY_H | 94 | #endif // SOLID_BACKENDS_IOKIT_BATTERY_H |