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

  • Properties
  • Public Functions
  • Reimplemented Public Functions
  • Signals
  • Detailed Description

GenericAccountProvisioner Class

(Sailfish::Mdm::Accounts::GenericAccountProvisioner)

The GenericAccountProvisioner class allows clients to create generic accounts. More...

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

Properties

  • defaultServiceName : QString
  • password : QString
  • username : QString
  • 9 properties inherited from Sailfish::Mdm::Accounts::Provisioner

Public Functions

GenericAccountProvisioner(QObject *parent = nullptr)
QString defaultServiceName() const
QString password() const
void setDefaultServiceName(const QString &servicename)
void setPassword(const QString &password)
void setUsername(const QString &username)
QString username() const

Reimplemented Public Functions

virtual bool createAccount()
  • 23 public functions inherited from Sailfish::Mdm::Accounts::Provisioner

Signals

void defaultServiceNameChanged()
void passwordChanged()
void usernameChanged()
  • 9 signals inherited from Sailfish::Mdm::Accounts::Provisioner

Detailed Description

The GenericAccountProvisioner class allows clients to create generic accounts.

The GenericAccountProvisioner class provides a simple API which allows an MDM client to provision a device with an account with specific settings.

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

 CONFIG += link_pkgconfig
 PKGCONFIG += sailfishmdm

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

Example of usage:

 #include <mdm-accounts.h>
 void createAccount(const QString &providerName, const QString &defaultServiceName, const QString &username, const QString &password)
 {
     Sailfish::Mdm::Accounts::GenericAccountProvisioner gap;
     gap.setProviderName(providerName);
     gap.setDefaultServiceName(defaultServiceName);
     gap.setUsername(username);
     gap.setPassword(password);
     if (!gap.createAccount()) {
         qWarning() << "Account creation failed:" << eap.errorMessage();
     }
 }

Property Documentation

defaultServiceName : QString

This property holds the default service name for the account.

This is the service name for which credentials will be initially created and stored. Most system processes will attempt to use the credentials associated with the default service of an account when connecting to the remote server.

If no default service name is set prior to account creation, an attempt will be made to autodiscover an appropriate service from the Sailfish::Mdm::Accounts::Provisioner::providerName().

Access functions:

QString defaultServiceName() const
void setDefaultServiceName(const QString &servicename)

Notifier signal:

void defaultServiceNameChanged()

password : QString

This property holds the password associated with the account.

Access functions:

QString password() const
void setPassword(const QString &password)

Notifier signal:

void passwordChanged()

username : QString

This property holds the username associated with the account.

Access functions:

QString username() const
void setUsername(const QString &username)

Notifier signal:

void usernameChanged()

Member Function Documentation

GenericAccountProvisioner::GenericAccountProvisioner(QObject *parent = nullptr)

Constructs a new generic account provisioner with the parent.

[virtual] bool GenericAccountProvisioner::createAccount()

Reimplemented from Provisioner::createAccount().

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn