Skip to content

Commit 5440606

Browse files
authored
RDKEMW-6451: Improve robustness in PowerManager Plugin (#449)
1 parent 9e68cdc commit 5440606

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

apis/PowerManager/IPowerManager.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ namespace WPEFramework
100100
virtual void OnRebootBegin(const string &rebootReasonCustom, const string &rebootReasonOther, const string &rebootRequestor) {};
101101
};
102102
virtual Core::hresult Register(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0;
103-
virtual Core::hresult Unregister(Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0;
103+
virtual Core::hresult Unregister(const Exchange::IPowerManager::IRebootNotification* notification /* @in */) = 0;
104104

105105
// @event
106106
struct EXTERNAL IModePreChangeNotification : virtual public Core::IUnknown
@@ -119,7 +119,7 @@ namespace WPEFramework
119119
// @brief Unregister for Power Mode pre-change event
120120
// IMPORTANT: If client is also engaged in power mode pre-change operation (requested via AddPowerModePreChangeClient API),
121121
// make sure to disengage (using RemovePowerModePreChangeClient API) before calling Unregister.
122-
virtual Core::hresult Unregister(IModePreChangeNotification* notification /* @in */) = 0;
122+
virtual Core::hresult Unregister(const IModePreChangeNotification* notification /* @in */) = 0;
123123

124124
// @event
125125
struct EXTERNAL IModeChangedNotification : virtual public Core::IUnknown
@@ -132,7 +132,7 @@ namespace WPEFramework
132132
virtual void OnPowerModeChanged(const PowerState currentState, const PowerState newState) {};
133133
};
134134
virtual Core::hresult Register(IModeChangedNotification* notification /* @in */) = 0;
135-
virtual Core::hresult Unregister(IModeChangedNotification* notification /* @in */) = 0;
135+
virtual Core::hresult Unregister(const IModeChangedNotification* notification /* @in */) = 0;
136136

137137
// @event
138138
struct EXTERNAL IDeepSleepTimeoutNotification : virtual public Core::IUnknown
@@ -144,7 +144,7 @@ namespace WPEFramework
144144
virtual void OnDeepSleepTimeout(const int wakeupTimeout) {};
145145
};
146146
virtual Core::hresult Register(IDeepSleepTimeoutNotification* notification /* @in */) = 0;
147-
virtual Core::hresult Unregister(IDeepSleepTimeoutNotification* notification /* @in */) = 0;
147+
virtual Core::hresult Unregister(const IDeepSleepTimeoutNotification* notification /* @in */) = 0;
148148

149149
// @event
150150
struct EXTERNAL INetworkStandbyModeChangedNotification : virtual public Core::IUnknown
@@ -156,7 +156,7 @@ namespace WPEFramework
156156
virtual void OnNetworkStandbyModeChanged(const bool enabled) {};
157157
};
158158
virtual Core::hresult Register(INetworkStandbyModeChangedNotification* notification /* @in */) = 0;
159-
virtual Core::hresult Unregister(INetworkStandbyModeChangedNotification* notification /* @in */) = 0;
159+
virtual Core::hresult Unregister(const INetworkStandbyModeChangedNotification* notification /* @in */) = 0;
160160

161161
// @event
162162
struct EXTERNAL IThermalModeChangedNotification : virtual public Core::IUnknown
@@ -170,7 +170,7 @@ namespace WPEFramework
170170
virtual void OnThermalModeChanged(const ThermalTemperature currentThermalLevel, const ThermalTemperature newThermalLevel, const float currentTemperature) {};
171171
};
172172
virtual Core::hresult Register(IThermalModeChangedNotification* notification /* @in */) = 0;
173-
virtual Core::hresult Unregister(IThermalModeChangedNotification* notification /* @in */) = 0;
173+
virtual Core::hresult Unregister(const IThermalModeChangedNotification* notification /* @in */) = 0;
174174

175175
/** Engage a client in power mode change operation. */
176176
// @text addPowerModePreChangeClient

0 commit comments

Comments
 (0)