A plugin interface for custom container solutions. More...
|virtual ContainerInterface *||create(bool isQuickLaunch, const QVector<int> &stdioRedirections, const QMap<QString, QString> &debugWrapperEnvironment, const QStringList &debugWrapperCommand) = 0|
|virtual QString||identifier() const = 0|
|virtual void||setConfiguration(const QVariantMap &configuration) = 0|
|virtual bool||supportsQuickLaunch() const = 0|
This is the interface that you have to implement, if you want to get your own custom container solution into the application manager.
For an example, please see
examples/software-container. This example shows the integration of Pelagicore's SoftwareContainers (which are essentially nice-to-use LXC wrappers).
Member Function Documentation
Destroys the instance of ContainerManagerInterface. The destructor is virtual.
[pure virtual] ContainerInterface *ContainerManagerInterface::create(bool isQuickLaunch, const QVector<int> &stdioRedirections, const QMap<QString, QString> &debugWrapperEnvironment, const QStringList &debugWrapperCommand)
The application manager will call this function every time it needs to create a specific container for a direct application launch, or a runtime quick-launcher (depending on the value of the isQuickLaunch parameter).
If the stdioRedirections vector is not empty, the plugin should - if possible - redirect standard-io streams: the vector can have 3 entries at most, with the index corresponding to the Unix standard-io file number (0:
stdout and 2:
stderr). The values in this vector are either open OS file descriptors for redirections or
[-1, 5, 5] would mean: ignore
stdin and redirect both
stderr to fd
The ownership of these file descriptors is transferred if, and only if, a new ContainerInterface is successfully instantiated (i.e. the return value is not nullptr). They then have to be closed either immediately, in case this plugin is not able to use them, or latest, when the started application has finished.
The debugWrapperEnvironment is an optional string map for environment variables and their values, if a debug-wrapper is to be used (the debugWrapperCommand is not empty - see below). An empty value in this map means, that the environment variable denoted by its key shall be unset.
In case the debugWrapperCommand is not empty, the plugin is requested to execute the binary set by ContainterInterface::setProgram using this debug-wrapper. The plugin is responsible for combining both and for handling the replacement of
%arguments%. See the debug-wrapper documentation for more information.
[pure virtual] QString ContainerManagerInterface::identifier() const
Should return the unique identifier string for this container plugin.
[pure virtual] void ContainerManagerInterface::setConfiguration(const QVariantMap &configuration)
Called by the application manager after parsing its configuration files. The configuration map corresponds to the (optional) container specific configuration as described in the container documentation.
[pure virtual] bool ContainerManagerInterface::supportsQuickLaunch() const
Expected to return
true if the interface has support for quick-launching or
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.