20 #ifndef _PRODUCT_TRAITS_
21 #define _PRODUCT_TRAITS_
26 #include "libIBusDaemon.h"
28 namespace dsMgrProductTraits
37 DEFAULT_STB_PROFILE = 0,
39 DEFAULT_STB_PROFILE_EUROPE,
40 DEFAULT_TV_PROFILE_EUROPE,
54 POWER_MODE_LIGHT_SLEEP,
55 POWER_MODE_LAST_KNOWN,
56 POWER_MODE_UNSPECIFIED,
60 enum class reboot_type_t { HARD, SOFT, UNAVAILABLE};
77 deviceType_t deviceType;
78 bool invalidateAsyncBootloaderPattern;
79 bool firstPowerTransitionComplete;
80 mutable std::mutex mutex;
82 bool enableMultiColourLedSupport;
84 bool ledEnabledInStandby;
85 int ledColorInStandby;
87 bool ledEnabledInOnState;
88 int ledColorInOnState;
90 powerModeTrait_t preferedPowerModeOnReboot;
91 bool enableSilentRebootSupport;
95 void initialize_safe_defaults();
96 void sync_power_led_with_power_state(IARM_Bus_PWRMgr_PowerState_t state)
const;
97 inline void sync_display_ports_with_power_state(IARM_Bus_PWRMgr_PowerState_t state)
const;
98 bool _set_bootloader_pattern(mfrBlPattern_t pattern)
const;
99 void _set_bootloader_pattern_async(mfrBlPattern_t pattern)
const;
100 bool set_bootloader_pattern(mfrBlPattern_t pattern);
101 bool set_bootloader_pattern_fault_tolerant(mfrBlPattern_t pattern);
104 static bool initialize_ux_controller(
unsigned int profile_id);
106 ux_controller(
unsigned int in_id,
const std::string &in_name, deviceType_t in_device_type);
109 virtual bool applyPowerStateChangeConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state) {
112 virtual bool applyPreRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
const {
115 virtual bool applyPreMaintenanceRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state) {
118 virtual bool applyPostRebootConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state) {
121 virtual IARM_Bus_PWRMgr_PowerState_t getPreferredPostRebootPowerState(IARM_Bus_PWRMgr_PowerState_t prev_state)
const {
124 virtual void sync_display_ports_with_reboot_reason(reboot_type_t type) {};
133 virtual bool applyPowerStateChangeConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
134 virtual bool applyPreRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
const override;
135 virtual bool applyPreMaintenanceRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
override;
136 virtual bool applyPostRebootConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
137 virtual IARM_Bus_PWRMgr_PowerState_t getPreferredPostRebootPowerState(IARM_Bus_PWRMgr_PowerState_t prev_state)
const override;
144 virtual bool applyPowerStateChangeConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
145 virtual bool applyPreRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
const override;
146 virtual bool applyPreMaintenanceRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
override;
147 virtual bool applyPostRebootConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
148 virtual IARM_Bus_PWRMgr_PowerState_t getPreferredPostRebootPowerState(IARM_Bus_PWRMgr_PowerState_t prev_state)
const override;
155 virtual bool applyPowerStateChangeConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
156 virtual bool applyPreRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
const override;
157 virtual bool applyPreMaintenanceRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
override;
158 virtual bool applyPostRebootConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
159 virtual IARM_Bus_PWRMgr_PowerState_t getPreferredPostRebootPowerState(IARM_Bus_PWRMgr_PowerState_t prev_state)
const override;
160 virtual void sync_display_ports_with_reboot_reason(reboot_type_t type)
override;
167 virtual bool applyPowerStateChangeConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
168 virtual bool applyPreRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
const override;
169 virtual bool applyPreMaintenanceRebootConfig(IARM_Bus_PWRMgr_PowerState_t current_state)
override;
170 virtual bool applyPostRebootConfig(IARM_Bus_PWRMgr_PowerState_t new_state, IARM_Bus_PWRMgr_PowerState_t prev_state)
override;
171 virtual IARM_Bus_PWRMgr_PowerState_t getPreferredPostRebootPowerState(IARM_Bus_PWRMgr_PowerState_t prev_state)
const override;