Manages loadable plugins. More...
#include <PluginManager.h>
Inherits QObject, and Dependency.
Classes | |
struct | PluginInfo |
Information about known plugins. More... | |
Public Member Functions | |
const DisplayPluginList & | getDisplayPlugins () |
Get the list of display plugins. More... | |
const InputPluginList & | getInputPlugins () |
Get the list of input plugins. More... | |
const CodecPluginList & | getCodecPlugins () |
Get the list of audio codec plugins. More... | |
const SteamClientPluginPointer | getSteamClientPlugin () |
Get the pointer to the Steam client plugin. More... | |
const OculusPlatformPluginPointer | getOculusPlatformPlugin () |
Get the pointer to the Oculus Platform Plugin. More... | |
DisplayPluginList | getPreferredDisplayPlugins () |
Returns the list of preferred display plugins. More... | |
void | setPreferredDisplayPlugins (const QStringList &displays) |
Sets the list of preferred display plugins. More... | |
void | disableDisplays (const QStringList &displays) |
Disable a list of displays. More... | |
void | disableInputs (const QStringList &inputs) |
Disable a list of inputs. More... | |
void | saveSettings () |
Save the settings. | |
void | setContainer (PluginContainer *container) |
Set the container for plugins. More... | |
void | setDisplayPluginProvider (const DisplayPluginProvider &provider) |
Provide a list of statically linked plugins. More... | |
void | setInputPluginProvider (const InputPluginProvider &provider) |
Provide a list of statically linked plugins. More... | |
void | setCodecPluginProvider (const CodecPluginProvider &provider) |
Provide a list of statically linked plugins. More... | |
void | setInputPluginSettingsPersister (const InputPluginSettingsPersister &persister) |
Set the input plugin persister. More... | |
QStringList | getRunningInputDeviceNames () const |
Get the list of running input devices. More... | |
void | setPluginFilter (PluginFilter pluginFilter) |
Set the plugin filter that determines whether a plugin will be used or not. More... | |
Q_INVOKABLE DisplayPluginList | getAllDisplayPlugins () |
Get a list of all the display plugins. More... | |
std::vector< PluginInfo > | getPluginInfo () const |
Returns information about known plugins. More... | |
Manages loadable plugins.
The current implementation does initialization only once, as soon as it's needed. Once things are initialized the configuration is made permanent.
Both loadable and statically modules are supported. Static modules have to be provided with setDisplayPluginProvider, setInputPluginProvider and setCodecPluginProvider.
Initialization is performed in the getDisplayPlugins, getInputPlugins and getCodecPlugins functions.
void PluginManager::disableDisplays | ( | const QStringList & | displays | ) |
Disable a list of displays.
This adds the display to a list of displays not to be used.
displays |
void PluginManager::disableInputs | ( | const QStringList & | inputs | ) |
Disable a list of inputs.
This adds the input to a list of inputs not to be used.
inputs |
DisplayPluginList PluginManager::getAllDisplayPlugins | ( | ) |
Get a list of all the display plugins.
const CodecPluginList & PluginManager::getCodecPlugins | ( | ) |
Get the list of audio codec plugins.
const DisplayPluginList & PluginManager::getDisplayPlugins | ( | ) |
Get the list of display plugins.
const InputPluginList & PluginManager::getInputPlugins | ( | ) |
Get the list of input plugins.
const OculusPlatformPluginPointer PluginManager::getOculusPlatformPlugin | ( | ) |
Get the pointer to the Oculus Platform Plugin.
This may return a null pointer if Oculus support isn't built in.
std::vector< PluginManager::PluginInfo > PluginManager::getPluginInfo | ( | ) | const |
Returns information about known plugins.
This is a function for informative/debugging purposes.
DisplayPluginList PluginManager::getPreferredDisplayPlugins | ( | ) |
Returns the list of preferred display plugins.
The preferred display plugins are set by setPreferredDisplayPlugins.
QStringList PluginManager::getRunningInputDeviceNames | ( | ) | const |
Get the list of running input devices.
const SteamClientPluginPointer PluginManager::getSteamClientPlugin | ( | ) |
Get the pointer to the Steam client plugin.
This may return a null pointer if Steam support isn't built in.
void PluginManager::setCodecPluginProvider | ( | const CodecPluginProvider & | provider | ) |
Provide a list of statically linked plugins.
This is used to provide a list of statically linked plugins to the plugin manager.
provider | A std::function that returns a list of codec plugins |
|
inline |
Set the container for plugins.
This will be passed to all active plugins on initialization.
container |
void PluginManager::setDisplayPluginProvider | ( | const DisplayPluginProvider & | provider | ) |
Provide a list of statically linked plugins.
This is used to provide a list of statically linked plugins to the plugin manager.
provider | A std::function that returns a list of display plugins |
void PluginManager::setInputPluginProvider | ( | const InputPluginProvider & | provider | ) |
Provide a list of statically linked plugins.
This is used to provide a list of statically linked plugins to the plugin manager.
provider | A std::function that returns a list of input plugins |
void PluginManager::setInputPluginSettingsPersister | ( | const InputPluginSettingsPersister & | persister | ) |
Set the input plugin persister.
persister | A std::function that saves input plugin settings |
|
inline |
Set the plugin filter that determines whether a plugin will be used or not.
As of writing, this is used in the audio mixer.
pluginFilter |
void PluginManager::setPreferredDisplayPlugins | ( | const QStringList & | displays | ) |
Sets the list of preferred display plugins.
displays |