[METROL-1219] Add notification plugin states: Hibernated and Destroyed#2123
Open
nxtum wants to merge 5 commits into
Open
[METROL-1219] Add notification plugin states: Hibernated and Destroyed#2123nxtum wants to merge 5 commits into
nxtum wants to merge 5 commits into
Conversation
Contributor
There was a problem hiding this comment.
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::INotificationExtendedwith cancelable callbacks forHibernatedandDestroyedand 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 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
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(); | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requires this to compile:
rdkcentral/ThunderTools#253