Make type const in Unregister methods#484
Conversation
There was a problem hiding this comment.
Pull request overview
Updates several Thunder/Exchange (and QA) C++ interface headers to make Unregister* methods accept a const pointer to the sink/test being removed, aligning the observer-unsubscribe API surface across interfaces.
Changes:
- Change
Unregister(...)/UnregisterEvents(...)parameters fromT*toconst T*in multiple public interfaces. - Update the corresponding override signature in
interfaces/IExternalBase.h.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| qa_interfaces/ITestController.h | Make ICategory::Unregister take const ITest*. |
| interfaces/IWifiControl.h | Make Unregister take const IWifiControl::INotification*. |
| interfaces/IWatermark.h | Make Unregister take const INotification*. |
| interfaces/ITimeZone.h | Make Unregister take const ITimeZone::INotification*. |
| interfaces/ITimeSync.h | Make Unregister take const INotification*. |
| interfaces/ITextToSpeech.h | Make Unregister take const ITextToSpeech::INotification*. |
| interfaces/ISystemAudioPlayer.h | Make Unregister take const INotification*. |
| interfaces/ISwitchBoard.h | Make Unregister take const INotification*. |
| interfaces/IStore.h | Make Unregister take const Exchange::IStore::INotification*. |
| interfaces/IRemoteControl.h | Make UnregisterEvents take const INotification*. |
| interfaces/IRPCLink.h | Make Unregister take const INotification*. |
| interfaces/IProvisioning.h | Make Unregister take const IProvisioning::INotification*. |
| interfaces/IPackageManager.h | Make Unregister take const IPackageManager::INotification*. |
| interfaces/INetworkControl.h | Make Unregister take const INetworkControl::INotification*. |
| interfaces/INetflix.h | Make Unregister take const INetflix::INotification*. |
| interfaces/IMediaPlayer.h | Make Unregister take const INotification*. |
| interfaces/ILISA.h | Make Unregister take const ILISA::INotification*. |
| interfaces/IInputPin.h | Make Unregister take const IInputPin::INotification*. |
| interfaces/IGuide.h | Make Unregister take const IGuide::INotification*. |
| interfaces/IExternalBase.h | Update Unregister override signature to match new interface. |
| interfaces/IExternal.h | Make both catalog and external Unregister take const ...::INotification*. |
| interfaces/IDolby.h | Make Unregister take const INotification*. |
| interfaces/IDisplayInfo.h | Make Unregister take const INotification*. |
| interfaces/IContentProtection.h | Make Unregister take const INotification*. |
| interfaces/IContentDecryption.h | Make inline Unregister take const IContentDecryption::INotification*. |
| interfaces/IComposition.h | Make Unregister take const IComposition::INotification*. |
| interfaces/IBrowser.h | Make multiple Unregister methods take const ...::INotification*. |
| interfaces/IApplication.h | Make Unregister take const INotification*. |
| interfaces/IAmazonPrime.h | Make Unregister take const IAmazonPrime::INotification*. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| virtual void Register(INotification* sink) = 0; | ||
| virtual void Unregister(INotification* sink) = 0; | ||
| virtual void Unregister(const INotification* sink) = 0; |
There was a problem hiding this comment.
Changing the Unregister parameter type from INotification* to const INotification* is a breaking API/ABI change for all implementers of this interface (their overrides must be updated and any binary plugins built against the previous header will no longer match). If these Exchange interfaces are consumed across independently-built components, consider versioning the interface (new ID / new interface type) or otherwise documenting/releasing this as a coordinated breaking change.
| virtual void Unregister(const INotification* sink) = 0; | |
| virtual void Unregister(INotification* sink) = 0; |
|
Will submit the PR for Nanoservices(RDK) once this PR is in |
No description provided.