softwarecontainer
0.18.0-739e8d7 2017-05-04
|
Public Types | |
enum | GatewayState : unsigned int { CREATED, CONFIGURED, ACTIVATED } |
Public Member Functions | |
DBusGateway (const std::string &gatewayDir, std::shared_ptr< ContainerAbstractInterface > container) | |
virtual bool | setConfig (const json_t *config) override |
Sets config for both dbus session instances. More... | |
virtual bool | activate () override |
Activates both dbus session instances. More... | |
virtual bool | readConfigElement (const json_t *) override |
Stubbed since this class only does containment. More... | |
virtual bool | activateGateway () override |
Stubbed since this class only does containment. More... | |
virtual bool | teardownGateway () override |
Stubbed since this class only does containment. More... | |
virtual bool | teardown () override |
Restore system to the state prior to launching of gateway. More... | |
virtual bool | isConfigured () override |
Is the gateway configured or not? More... | |
virtual bool | isActivated () override |
Is the gateway activated or not? More... | |
virtual std::string | id () const |
Returns the ID of the gateway. More... | |
Static Public Attributes | |
static constexpr const char * | ID |
Protected Member Functions | |
std::shared_ptr< ContainerAbstractInterface > | getContainer () |
Get a handle to the associated container. More... | |
bool | setEnvironmentVariable (const std::string &variable, const std::string &value) |
Set an environment variable in the associated container. More... | |
Protected Attributes | |
bool | m_activatedOnce |
Definition at line 27 of file dbusgateway.h.
|
overridevirtual |
Sets config for both dbus session instances.
Reimplemented from softwarecontainer::Gateway.
Definition at line 37 of file dbusgateway.cpp.
|
overridevirtual |
Activates both dbus session instances.
Reimplemented from softwarecontainer::Gateway.
Definition at line 58 of file dbusgateway.cpp.
|
inlineoverridevirtual |
Stubbed since this class only does containment.
Implements softwarecontainer::Gateway.
Definition at line 51 of file dbusgateway.h.
|
inlineoverridevirtual |
Stubbed since this class only does containment.
Implements softwarecontainer::Gateway.
Definition at line 56 of file dbusgateway.h.
|
inlineoverridevirtual |
Stubbed since this class only does containment.
Implements softwarecontainer::Gateway.
Definition at line 61 of file dbusgateway.h.
References isActivated(), isConfigured(), and teardown().
|
overridevirtual |
Restore system to the state prior to launching of gateway.
Any cleanup code (removal of files, virtual interfaces, etc) should be placed here.
GatewayError | If called on a non activated gateway. |
Reimplemented from softwarecontainer::Gateway.
Definition at line 79 of file dbusgateway.cpp.
Referenced by teardownGateway().
|
overridevirtual |
Is the gateway configured or not?
Reimplemented from softwarecontainer::Gateway.
Definition at line 105 of file dbusgateway.cpp.
Referenced by teardownGateway().
|
overridevirtual |
Is the gateway activated or not?
Dynamic gateways will return true if they have been activated at least once. Non-dynamic gateways will return true if they are in state ACTIVATED
Reimplemented from softwarecontainer::Gateway.
Definition at line 110 of file dbusgateway.cpp.
Referenced by teardownGateway().
|
virtualinherited |
Returns the ID of the gateway.
Definition at line 36 of file gateway.cpp.
Referenced by softwarecontainer::Gateway::activate(), softwarecontainer::DBusGatewayInstance::DBusGatewayInstance(), softwarecontainer::Gateway::setConfig(), and softwarecontainer::Gateway::teardown().
|
protectedinherited |
Get a handle to the associated container.
GatewayError | If called before setContainer() has been called. |
Definition at line 128 of file gateway.cpp.
Referenced by softwarecontainer::NetworkGateway::activateGateway(), softwarecontainer::DBusGatewayInstance::activateGateway(), softwarecontainer::WaylandGateway::readConfigElement(), and softwarecontainer::NetworkGateway::teardownGateway().
|
protectedinherited |
Set an environment variable in the associated container.