Sailfish OS
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS
Select Page
  • Info
  • User Experience
  • Cases
  • Community
  • Developers
  • Contact
  • Get Sailfish OS

API Documentation

Documentation for developing SailfishOS applications
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon
  • API Documentation
  • Libsailfishapp
  • Sailfish Silica
    • Documentation
    • Icon Reference
  • Sailfish Components
    • Sailfish Accounts
    • Sailfish Bluetooth
    • Sailfish Contacts
    • Sailfish Crypto
    • Sailfish Gallery
    • Sailfish Media
    • Sailfish Pickers
    • Sailfish Secrets
    • Sailfish Share
    • Sailfish Telephony
    • Sailfish Webview
    • Amber Web Authorization
    • Amber MPRIS
  • Nemo QML Plugins
    • Configuration
    • Contacts
    • D-Bus
    • Keepalive
    • Notifications
    • Thumbnailer
  • Sailfish Middleware
    • MDM Framework
    • MDM Policy Framework
    • User Manager Daemon

Contents

  • Public Functions
  • Signals
  • Detailed Description

SecuritySettings Class

(Sailfish::Mdm::SecuritySettings)

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

Header: #include <mdm-security.h>
  • List of all members, including inherited members

Public Functions

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

Signals

void developerModeChangeError()
void developerModeEnabledChanged()

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);
     settings->setSideloadingAllowed(allow);
 }

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().

  • Legal
  • Contact Us
  • Jollyboys Ltd © 2024

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn