You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* [PluginInitService] Initial commit
* [PluginInitService] now make it go in parallel
* [PluginInitService] improved queue logging
* [PluginInitService] more fixes
* [PluginInitService] Final changes after testing
* [PluginInitService] More final changes :)
* [PluginInitService] gcc fixes
* [PluginInitService] update
* [PluginInitService] fixed some typos
* [PluginInitializerService] forgot one explicit
* [PluginInitService] Update copyrights
* [ThunderNanoservices] add RDK management credit to Notice file
* [PluginInitService] first set of fixes after review
* [PluginInitService] Improve startup handling
* [PluginInitService] More changes
* [PluginInitService] more changes
* [PluginInitService] more fixes
* [PluginInitService] And more fixes
* [PLuginInitService] and even more changes
* [PluginInitService] update
* [PluginInitService] it builds again...
* [PluginInitService] code complete beforen internal review
* [PluginInitService] Fixes after selfreview
* [PluginInitService] first run again
* [PluginInitService] adding activationresult job
* [PluginInitService] fix typos
* [PluginInitService] okay most complex (failing preconditions) case seems to work gain
* [PluginInitService] fix typo
* [PluginInitService] add some useful comment
* [PluginInitService] update some comments
* [PluginInitService] blocked bool does no longer need to be atomic
* [PluginInitService] make it log queue info morem consistent (as the cost
of an if sometimes :) )
* [PluginInitSerice] fix abba and cancelall (not complete)
* [PluginInitService] initial decoupling notifications
* [PluginInitService] First few tests look promosing
* [PlugInitService] add some usefull coments
* [PluginInitService] more comments and small fixes
* [PluginInitService] Ordering
* [PluginInitService] small fixes
* [PluginInitServiece] add some useful comment
// note we will not register for the plugin state notifications here but only do that when it actually needed later on, and more importantly also stop listening when there are no more plugins to start
73
+
// (this to make sure hat even if this plugin is not deactivated when there are no more plugins to start it will not give any unnecessary overhead like constantly being notified on plugin state transitions)
74
+
75
+
return (message);
76
+
}
77
+
78
+
voidPluginInitializerService::Deinitialize(PluginHost::IShell* service VARIABLE_IS_NOT_USED)
PluginHost::IShell::state state = requestedpluginShell->State();
107
+
if ((state == PluginHost::IShell::DEACTIVATED) ||
108
+
(state == PluginHost::IShell::DEACTIVATION) ||
109
+
(state == PluginHost::IShell::ACTIVATION) || // this and the PRECONDITION are rather special cases, These plugin were already request to activate somewhere else, as we cannot just send a success notification (they might fail to initialize) we'll take them into account, if it was the result of a previous PluginInitializerService we'll find out anyway.
110
+
(state == PluginHost::IShell::PRECONDITION) ) // note PRECONDITION can be both reached during deactivation and activation, for the purpose here it does not matter, we only have to monitor if the activation succeeds and report back or monitor deinitialization failure and retry
111
+
{
112
+
TRACE(Trace::Information, (_T("Plugin Activate request received for plugin [%s] in state [%s]"), callsign.c_str(), Core::EnumerateType<PluginHost::IShell::state>(state).Data()));
TRACE(Trace::Warning, (_T("Plugin Activate received for plugin [%s] that was already active, state [%s]"), callsign.c_str(), Core::EnumerateType<PluginHost::IShell::state>(state).Data()));
125
+
126
+
if (cb != nullptr)
127
+
{
128
+
TRACE(Trace::DetailedInfo, (_T("Result callback success called for plugin [%s]"), callsign.c_str()));
TRACE(Trace::Error, (_T("Could not start activating plugin [%s] as it is in an illegal state [%s]"), callsign.c_str(), Core::EnumerateType<PluginHost::IShell::state>(state).Data()));
133
+
result = Core::ERROR_ILLEGAL_STATE;
134
+
}
135
+
136
+
requestedpluginShell->Release();
137
+
requestedpluginShell = nullptr;
138
+
139
+
} else {
140
+
TRACE(Trace::Error, (_T("Could not start activating plugin [%s] as it is unknown"), callsign.c_str()));
TRACE(Trace::Information, (_T("Plugin Abort Activate request received for plugin [%s]"), callsign.c_str()));
150
+
151
+
Core::hresult result = Core::ERROR_NONE;
152
+
153
+
if (CancelPluginStarter(callsign) == true) {
154
+
TRACE(Trace::DetailedInfo, (_T("Plugin Activate request was canceled for plugin [%s]"), callsign.c_str()));
155
+
} else {
156
+
// note this is not necessarily an error, the abort request could just have crossed the successful activation (or failure to do so for that matter) so it was just removed from the list
157
+
TRACE(Trace::Warning, (_T("Plugin Abort Activate request: plugin was not in activation list [%s]"), callsign.c_str()));
0 commit comments