Skip to content

Comments

Make type const in Unregister methods#484

Open
nxtum wants to merge 2 commits intordkcentral:masterfrom
nxtum:AddConstToUnregisters
Open

Make type const in Unregister methods#484
nxtum wants to merge 2 commits intordkcentral:masterfrom
nxtum:AddConstToUnregisters

Conversation

@nxtum
Copy link
Contributor

@nxtum nxtum commented Feb 16, 2026

No description provided.

Copilot AI review requested due to automatic review settings February 16, 2026 13:41
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 from T* to const 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;
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
virtual void Unregister(const INotification* sink) = 0;
virtual void Unregister(INotification* sink) = 0;

Copilot uses AI. Check for mistakes.
@nxtum nxtum requested review from sebaszm February 16, 2026 14:37
@nxtum
Copy link
Contributor Author

nxtum commented Feb 16, 2026

Will submit the PR for Nanoservices(RDK) once this PR is in

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant