Overte C++ Documentation
PluginManager Class Reference

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< PluginInfogetPluginInfo () const
 Returns information about known plugins. More...
 

Detailed Description

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.

Warning
Users of the PluginManager must take care to do any configuration very early on, because changes become impossible once initialization is done. Plugins can't be added or removed once that happens.

Initialization is performed in the getDisplayPlugins, getInputPlugins and getCodecPlugins functions.

Member Function Documentation

◆ disableDisplays()

void PluginManager::disableDisplays ( const QStringList &  displays)

Disable a list of displays.

This adds the display to a list of displays not to be used.

Parameters
displays

◆ disableInputs()

void PluginManager::disableInputs ( const QStringList &  inputs)

Disable a list of inputs.

This adds the input to a list of inputs not to be used.

Parameters
inputs

◆ getAllDisplayPlugins()

DisplayPluginList PluginManager::getAllDisplayPlugins ( )

Get a list of all the display plugins.

Returns
DisplayPluginList List of display plugins

◆ getCodecPlugins()

const CodecPluginList & PluginManager::getCodecPlugins ( )

Get the list of audio codec plugins.

Note
Calling this function will perform initialization and connects events to all the known the plugins on the first call.
Returns
const CodecPluginList&

◆ getDisplayPlugins()

const DisplayPluginList & PluginManager::getDisplayPlugins ( )

Get the list of display plugins.

Note
Calling this function will perform initialization and connects events to all the known the plugins on the first call.
Returns
const DisplayPluginList&

◆ getInputPlugins()

const InputPluginList & PluginManager::getInputPlugins ( )

Get the list of input plugins.

Note
Calling this function will perform initialization and connects events to all the known the plugins on the first call.
Returns
const InputPluginList&

◆ getOculusPlatformPlugin()

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.

Returns
const OculusPlatformPluginPointer

◆ getPluginInfo()

std::vector< PluginManager::PluginInfo > PluginManager::getPluginInfo ( ) const

Returns information about known plugins.

This is a function for informative/debugging purposes.

Returns
std::vector<PluginInfo>

◆ getPreferredDisplayPlugins()

DisplayPluginList PluginManager::getPreferredDisplayPlugins ( )

Returns the list of preferred display plugins.

The preferred display plugins are set by setPreferredDisplayPlugins.

Returns
DisplayPluginList

◆ getRunningInputDeviceNames()

QStringList PluginManager::getRunningInputDeviceNames ( ) const

Get the list of running input devices.

Returns
QStringList List of input devices in running state

◆ getSteamClientPlugin()

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.

Returns
const SteamClientPluginPointer

◆ setCodecPluginProvider()

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.

Note
This must be called very early on, and only works once. Once the plugin manager builds its internal list of plugins, the final list becomes set in stone.
Parameters
providerA std::function that returns a list of codec plugins

◆ setContainer()

void PluginManager::setContainer ( PluginContainer *  container)
inline

Set the container for plugins.

This will be passed to all active plugins on initialization.

Parameters
container

◆ setDisplayPluginProvider()

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.

Note
This must be called very early on, and only works once. Once the plugin manager builds its internal list of plugins, the final list becomes set in stone.
Parameters
providerA std::function that returns a list of display plugins

◆ setInputPluginProvider()

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.

Note
This must be called very early on, and only works once. Once the plugin manager builds its internal list of plugins, the final list becomes set in stone.
Parameters
providerA std::function that returns a list of input plugins

◆ setInputPluginSettingsPersister()

void PluginManager::setInputPluginSettingsPersister ( const InputPluginSettingsPersister &  persister)

Set the input plugin persister.

Parameters
persisterA std::function that saves input plugin settings

◆ setPluginFilter()

void PluginManager::setPluginFilter ( PluginFilter  pluginFilter)
inline

Set the plugin filter that determines whether a plugin will be used or not.

Note
This must be called very early on. Once the plugin manager builds its internal list of plugins, the final list becomes set in stone.

As of writing, this is used in the audio mixer.

Parameters
pluginFilter

◆ setPreferredDisplayPlugins()

void PluginManager::setPreferredDisplayPlugins ( const QStringList &  displays)

Sets the list of preferred display plugins.

Note
This must be called early, before any call to getPreferredDisplayPlugins.
Parameters
displays

The documentation for this class was generated from the following files: