API Documentation

Documentation for developing SailfishOS applications

SecuritySettings Class


The SecuritySettings class controls the installation of insecure software. More...

Header: #include <mdm-security.h>

Public Functions

SecuritySettings(QObject *parent = 0)
virtual ~SecuritySettings()
bool developerModeEnabled()
void setDeveloperModeEnabled(bool enabled)
bool setSideloadingAllowed(bool allowed)
bool sideloadingAllowed()


Detailed Description

The SecuritySettings class controls the installation of insecure software.

It allows or disallows the installation of insecure software to the device (a.k.a. sideloading).

To use this class, clients must add the following to their qmake project:

 CONFIG += link_pkgconfig
 PKGCONFIG += sailfishmdm

and then #include <mdm-security.h>.

Example of usage:

 #include <mdm-security.h>
 void allowOrDisallowSideLoading(bool allow, QObject *parent)
     Sailfish::Mdm::SecuritySettings *settings = new Sailfish::Mdm::SecuritySettings(parent);

Member Function Documentation

SecuritySettings::SecuritySettings(QObject *parent = 0)

Creates a SecuritySettings instance with the given parent.

[virtual] SecuritySettings::~SecuritySettings()

Destroys a SecuritySettings() instance.

[signal] void SecuritySettings::developerModeChangeError()

Emitted when setDeveloperModeEnabled() is called but developer mode cannot be changed due to an error.

bool SecuritySettings::developerModeEnabled()

Returns whether developer mode is currently enabled.

See also setDeveloperModeEnabled().

[signal] void SecuritySettings::developerModeEnabledChanged()

Emitted when setDeveloperModeEnabled() is called and developer mode is enabled or disabled as a result.

void SecuritySettings::setDeveloperModeEnabled(bool enabled)

Sets whether developer mode is enabled.

If developer mode is successfully changed, developerModeEnabledChanged() is emitted. Otherwise, developerModeChangeError() is emitted.

See also developerModeEnabled().

bool SecuritySettings::setSideloadingAllowed(bool allowed)

Allows the client to enable or disable sideloading.

Returns true if the new sideloading setting value allowed was applied successfully.

Installing insecure software (also known as "sideloading") should be disabled on devices which contain sensitive data or have access to networks which provide access to sensitive data.

Note that this method allows the MDM client to enable or disable sideloading, but doesn't prevent this setting from being changed via e.g. the settings UI. In order to prevent the value from being changed by the user, the MDM client should also set the policy for this setting via the libsailfishpolicy API.

See also sideloadingAllowed().

bool SecuritySettings::sideloadingAllowed()

Returns true if the system settings allow insecure software to be installed.

See also setSideloadingAllowed().

We use cookies to improve your user experience and to help us to develop our services. By continuing to browse the site, you approve of our use of cookies.