Skip to content

[METROL-1219] Add notification plugin states: Hibernated and Destroyed#2123

Open
nxtum wants to merge 5 commits into
rdkcentral:masterfrom
nxtum:hibernateDestroy-Notifs
Open

[METROL-1219] Add notification plugin states: Hibernated and Destroyed#2123
nxtum wants to merge 5 commits into
rdkcentral:masterfrom
nxtum:hibernateDestroy-Notifs

Conversation

@nxtum
Copy link
Copy Markdown
Contributor

@nxtum nxtum commented May 18, 2026

Requires this to compile:
rdkcentral/ThunderTools#253

Copilot AI review requested due to automatic review settings May 18, 2026 09:52
Copy link
Copy Markdown
Contributor

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

Adds lifecycle notifications for additional plugin states (HIBERNATED and DESTROYED) so observers (notably the Controller) can react to these transitions in a first-class way within the Thunder daemon’s plugin framework.

Changes:

  • Introduces PluginHost::IPlugin::INotificationExtended with cancelable callbacks for Hibernated and Destroyed and assigns a new RPC interface ID.
  • Extends the Thunder runtime (PluginServer) notifier infrastructure to register/unregister extended sinks and to emit notifications on hibernation and destroy transitions.
  • Updates the Controller’s notification sink to implement and register for the new extended notifications.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Source/Thunder/PluginServer.h Adds extended notifier registry and dispatch for hibernated/destroyed plugin state notifications.
Source/Thunder/PluginServer.cpp Wires INotificationExtended register/unregister and emits hibernation notification.
Source/Thunder/Controller.h Extends Controller sink to handle hibernated/destroyed notifications and exposes the interface via the map.
Source/Thunder/Controller.cpp Registers/unregisters the Controller sink for both notification interfaces (casts to disambiguate overloads).
Source/plugins/IShell.h Extends IShell with register/unregister overloads for INotificationExtended.
Source/plugins/IPlugin.h Adds INotificationExtended interface definition with cancelable callbacks.
Source/com/Ids.h Adds RPC ID for ID_PLUGIN_NOTIFICATION_EXTENDED.

Comment thread Source/plugins/IShell.h
Copilot AI review requested due to automatic review settings May 19, 2026 15:36
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Comment on lines 960 to 964
// It's reference counted, so just take it out of the list, state to DESTROYED
// Also unsubscribe all subscribers. They need to go..
State(DESTROYED);
_administrator.Destroyed(Callsign(), this);

Copilot AI review requested due to automatic review settings May 19, 2026 15:46
Copy link
Copy Markdown
Contributor

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

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Comment on lines 960 to 964
// It's reference counted, so just take it out of the list, state to DESTROYED
// Also unsubscribe all subscribers. They need to go..
State(DESTROYED);
_administrator.Destroyed(Callsign(), this);

Comment on lines 319 to +327
void Server::Service::Register(IPlugin::INotification * sink, const Core::OptionalType<string>& callsign) /* override */
{
_administrator.Register(sink, callsign);

IPlugin::INotificationExtended* extended = sink->QueryInterface<IPlugin::INotificationExtended>();
if (extended != nullptr) {
_administrator.Register(extended, callsign);
extended->Release();
}
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.

2 participants