|
MythTV master
|
#include <libmythbase/platforms/mythpowerosx.h>
Protected Slots | |
| void | Refresh (void) override |
Protected Slots inherited from MythPower | |
| void | FeatureTimeout (void) |
| virtual void | Refresh (void) |
Protected Member Functions | |
| MythPowerOSX () | |
| Power management for OSX. More... | |
| ~MythPowerOSX () override | |
| void | Init (void) override |
| bool | DoFeature (bool Delayed=false) override |
Protected Member Functions inherited from MythPower | |
| MythPower () | |
| ~MythPower () override=default | |
| virtual void | Init (void) |
| virtual bool | DoFeature (bool=false) |
| virtual void | DidWakeUp (void) |
| virtual void | FeatureHappening (Feature Spontaneous=FeatureNone) |
| Signal to the rest of MythTV that the given feature will happen now. More... | |
| virtual bool | ScheduleFeature (enum Feature Type, std::chrono::seconds Delay) |
| void | SetRequestedDelay (std::chrono::seconds Delay) |
| void | PowerLevelChanged (int Level) |
Protected Member Functions inherited from ReferenceCounter | |
| virtual | ~ReferenceCounter (void) |
| Called on destruction, will warn if object deleted with references in place. More... | |
Static Protected Member Functions | |
| static void | PowerCallBack (void *Reference, io_service_t Service, natural_t Type, void *Data) |
| Receive notification of power status changes. More... | |
| static void | PowerSourceCallBack (void *Reference) |
| Receive notification of changes to the power supply. More... | |
Static Protected Member Functions inherited from MythPower | |
| static QString | FeatureToString (enum Feature Type) |
| static bool | FeatureIsEquivalent (Feature First, Feature Second) |
Protected Attributes | |
| CFRunLoopSourceRef | m_powerRef { nullptr } |
| io_connect_t | m_rootPowerDomain { 0 } |
| io_object_t | m_powerNotifier { MACH_PORT_NULL } |
| IONotificationPortRef | m_powerNotifyPort { nullptr } |
Protected Attributes inherited from MythPower | |
| Features | m_features { FeatureNone } |
| Feature | m_scheduledFeature { FeatureNone } |
| bool | m_isSpontaneous { false } |
| std::chrono::seconds | m_maxRequestedDelay { 0s } |
| std::chrono::seconds | m_maxSupportedDelay { MAXIMUM_SHUTDOWN_WAIT } |
| QTimer | m_featureTimer |
| QDateTime | m_sleepTime |
| int | m_powerLevel { Unset } |
| bool | m_warnForLowBattery { false } |
Protected Attributes inherited from ReferenceCounter | |
| bool | m_logDebug |
| This is used to suppress creating LoggingItem classes for LoggingItem reference count changes. More... | |
| QAtomicInt | m_referenceCount {1} |
Friends | |
| class | MythPower |
Additional Inherited Members | |
Public Types inherited from MythPower | |
| enum | PowerLevel : std::int8_t { UPS = -2 , ACPower = -1 , BatteryEmpty = 0 , BatteryLow = 10 , BatteryFull = 100 , UnknownPower = 101 , Unset = 102 } |
| enum | Feature : std::uint8_t { FeatureNone = 0x00 , FeatureShutdown = 0x01 , FeatureSuspend = 0x02 , FeatureHibernate = 0x04 , FeatureRestart = 0x08 , FeatureHybridSleep = 0x10 } |
Public Slots inherited from MythPower | |
| virtual void | CancelFeature (void) |
| This is untested as it is currently not clear whether it is useful. More... | |
Signals inherited from MythPower | |
| void | ShuttingDown (void) |
| void | Suspending (void) |
| void | Hibernating (void) |
| void | Restarting (void) |
| void | HybridSleeping (void) |
| void | WillShutDown (std::chrono::milliseconds MilliSeconds=0ms) |
| void | WillSuspend (std::chrono::milliseconds MilliSeconds=0ms) |
| void | WillHibernate (std::chrono::milliseconds MilliSeconds=0ms) |
| void | WillRestart (std::chrono::milliseconds MilliSeconds=0ms) |
| void | WillHybridSleep (std::chrono::milliseconds MilliSeconds=0ms) |
| void | WokeUp (std::chrono::seconds SecondsAsleep) |
| void | LowBattery (void) |
Public Member Functions inherited from MythPower | |
| virtual bool | RequestFeature (Feature Request, bool Delay=true) |
| Features | GetFeatures (void) |
| bool | IsFeatureSupported (Feature Supported) |
| int | GetPowerLevel (void) const |
| QStringList | GetFeatureList (void) |
Public Member Functions inherited from ReferenceCounter | |
| ReferenceCounter (const QString &debugName, bool logDebug=true) | |
| Creates reference counter with an initial value of 1. More... | |
| virtual int | IncrRef (void) |
| Increments reference count. More... | |
| virtual int | DecrRef (void) |
| Decrements reference count and deletes on 0. More... | |
Static Public Member Functions inherited from MythPower | |
| static MythPower * | AcquireRelease (void *Reference, bool Acquire, std::chrono::seconds MinimumDelay=0s) |
Static Public Member Functions inherited from ReferenceCounter | |
| static void | PrintDebug (void) |
| Print out any leaks if that level of debugging is enabled. More... | |
Static Protected Attributes inherited from MythPower | |
| static QRecursiveMutex | s_lock |
Definition at line 15 of file mythpowerosx.h.
|
protected |
Power management for OSX.
Definition at line 25 of file mythpowerosx.cpp.
|
overrideprotected |
Definition at line 30 of file mythpowerosx.cpp.
Reimplemented from MythPower.
Definition at line 92 of file mythpowerosx.cpp.
|
overrideprotectedvirtual |
Reimplemented from MythPower.
Definition at line 50 of file mythpowerosx.cpp.
Referenced by MythPowerOSX().
|
staticprotected |
Receive notification of power status changes.
Definition at line 175 of file mythpowerosx.cpp.
Referenced by Init().
|
staticprotected |
Receive notification of changes to the power supply.
Changes may be a change in the battery level or switches between mains power and battery.
Definition at line 161 of file mythpowerosx.cpp.
Referenced by Init().
|
overrideprotectedslot |
Definition at line 109 of file mythpowerosx.cpp.
Referenced by Init(), and PowerSourceCallBack().
|
friend |
Definition at line 19 of file mythpowerosx.h.
|
protected |
Definition at line 38 of file mythpowerosx.h.
Referenced by Init(), and ~MythPowerOSX().
|
protected |
Definition at line 39 of file mythpowerosx.h.
Referenced by Init(), and ~MythPowerOSX().
|
protected |
Definition at line 36 of file mythpowerosx.h.
Referenced by Init(), Refresh(), and ~MythPowerOSX().
|
protected |
Definition at line 37 of file mythpowerosx.h.
Referenced by Init(), and ~MythPowerOSX().