Add a desired-state property to GPlugin.Plugin

Review Request #1200 — Created Dec. 26, 2021 and submitted

Information

gplugin/gplugin
default

Reviewers

This allows us to track what state the user wanted a plugin to be in. The use
case here is, I want to disable a plugin, but the plugin can't be cleanly
unloaded. The plugin returns FALSE from its unload function with an error
stating as such.

For a GPlugin consuming application this creates a dilema where the user can't
actually disable this plugin, because as far as everyone knows, that plugin
should be loaded. With this new property, the consuming application can then
check if the desired state is set to loaded before saving it to a list of
plugins to that should be loaded at the next launch.

Updated the loader unit tests to make sure that the property is being set properly by GPluginLoader.

Summary ID
Add a desired-state property to GPlugin.Plugin
This allows us to track what state the user wanted a plugin to be in. The use case here is, I want to disable a plugin, but the plugin can't be cleanly unloaded. The plugin return's FALSE from it's unload function with an error stating as such. For a GPlugin consuming application this creates a dilema where the user can't actually disable this plugin, because as far as everyone knows, that plugin should be loaded. With this new property, the consuming application can then check if the desired state is set to loaded before saving it to a list of plugins to that should be loaded at the next launch.
555c5b51f7ac0f9855d8053a1513d6e02caa2835
QuLogic
QuLogic
  1. Ship It!
  2. 
      
grim
Review request changed
Status:
Completed