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

ActiveSyncAccountProvisioner Class

(Sailfish::Mdm::Accounts::ActiveSyncAccountProvisioner)

The ActiveSyncAccountProvisioner class allows clients to create Active Sync accounts. More...

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

Properties

  • acceptUntrustedCertificates : bool
  • certPassphrase : QString
  • certificate : QString
  • description : QString
  • domain : QString
  • emailAddress : QString
  • password : QString
  • port : int
  • secureConnection : bool
  • serverAddress : QString
  • signature : QString
  • username : QString
  • 9 properties inherited from Sailfish::Mdm::Accounts::Provisioner

Public Functions

ActiveSyncAccountProvisioner(QObject *parent = nullptr)
bool acceptUntrustedCertificates() const
QString certPassphrase() const
QString certificate() const
QString description() const
QString domain() const
QString emailAddress() const
QString password() const
int port() const
bool secureConnection() const
QString serverAddress() const
void setAcceptUntrustedCertificates(bool acceptUntrustedCertificates)
void setCertPassphrase(const QString &certPassphrase)
void setCertificate(const QString &certificate)
void setDescription(const QString &description)
void setDomain(const QString &domain)
void setEmailAddress(const QString &emailAddress)
void setPassword(const QString &password)
void setPort(int port)
void setSecureConnection(bool secureConnection)
void setServerAddress(const QString &serverAddress)
void setSignature(const QString &signature)
void setUsername(const QString &username)
QString signature() const
QString username() const

Reimplemented Public Functions

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

Signals

void acceptUntrustedCertificatesChanged()
void certPassphraseChanged()
void certificateChanged()
void descriptionChanged()
void domainChanged()
void emailAddressChanged()
void passwordChanged()
void portChanged()
void secureConnectionChanged()
void serverAddressChanged()
void signatureChanged()
void usernameChanged()
  • 9 signals inherited from Sailfish::Mdm::Accounts::Provisioner

Detailed Description

The ActiveSyncAccountProvisioner class allows clients to create Active Sync accounts.

It provides an API which allows an MDM client to provision a device with an Active Sync account with specific settings.

The Sailfish::Mdm::Accounts::Provisioner::providerName is set by default. Also, if you wish to allow the device to accept untrusted certificates, that must be explicitly specified, otherwise they will be disallowed by default. Similarly secureConnection is enabled by default and port defaulting to 443.

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

 CONFIG += link_pkgconfig
 PKGCONFIG += sailfishmdm

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

 #include <mdm-accounts.h>
 void createActiveSyncAccount(const QString &emailAddress, const QString &serverAddress, const QString &username)
 {
     Sailfish::Mdm::Accounts::ActiveSyncAccountProvisioner activeSyncAccount;
     activeSyncAccount.setEmailAddress(emailAddress);
     activeSyncAccount.setServerAddress(serverAddress);
     activeSyncAccount.setUsername(username);

     if (!activeSyncAccount.createAccount()) {
         qWarning() << "Account creation failed:" << activeSyncAccount.errorMessage();
     }
 }

Or to modify an existing account

Property Documentation

acceptUntrustedCertificates : bool

This property holds true if the device should accept untrusted certificates from the Active Sync server.

The default value is false.

Access functions:

bool acceptUntrustedCertificates() const
void setAcceptUntrustedCertificates(bool acceptUntrustedCertificates)

Notifier signal:

void acceptUntrustedCertificatesChanged()

certPassphrase : QString

This property holds passphrase for unlocking the PKCS#12 client certificate.

Note, setting this will have no effect unless certificate file is also defined. The passphrase will be validated during account creation / modification.

Access functions:

QString certPassphrase() const
void setCertPassphrase(const QString &certPassphrase)

Notifier signal:

void certPassphraseChanged()

certificate : QString

This property holds path to a PKCS#12 client certificate bundle to be used for authentication.

The path should be an absolute path, relative paths will not be resolved. Use QString() to clear.

Access functions:

QString certificate() const
void setCertificate(const QString &certificate)

Notifier signal:

void certificateChanged()

description : QString

This property holds the description of the account.

Access functions:

QString description() const
void setDescription(const QString &description)

Notifier signal:

void descriptionChanged()

domain : QString

This property holds the domain of the Active Sync account.

Access functions:

QString domain() const
void setDomain(const QString &domain)

Notifier signal:

void domainChanged()

emailAddress : QString

This property holds the email address associated with the account.

Access functions:

QString emailAddress() const
void setEmailAddress(const QString &emailAddress)

Notifier signal:

void emailAddressChanged()

password : QString

This property holds the password to use with the account.

The password is an optional value for the account creation. It is recommended to let the user to finalize account creation by entering the password.

Access functions:

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

Notifier signal:

void passwordChanged()

port : int

This property holds the port to which to connect to communicate with the Active Sync server.

See the serverAddress

Access functions:

int port() const
void setPort(int port)

Notifier signal:

void portChanged()

secureConnection : bool

This property holds true if the account uses secure connection, otherwise false.

Set value to false to not use secure connection. Note, this does not affect port, it needs to be changed separately.

The default value is true.

Access functions:

bool secureConnection() const
void setSecureConnection(bool secureConnection)

Notifier signal:

void secureConnectionChanged()

serverAddress : QString

This property holds the internet server address or URL of the Active Sync server.

See the port

Access functions:

QString serverAddress() const
void setServerAddress(const QString &serverAddress)

Notifier signal:

void serverAddressChanged()

signature : QString

This property holds the signature that is appended for an email message.

Access functions:

QString signature() const
void setSignature(const QString &signature)

Notifier signal:

void signatureChanged()

username : QString

This property holds the username to use with the account.

Access functions:

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

Notifier signal:

void usernameChanged()

Member Function Documentation

ActiveSyncAccountProvisioner::ActiveSyncAccountProvisioner(QObject *parent = nullptr)

Constructs an Active Sync account provisioner with the given parent.

[virtual] bool ActiveSyncAccountProvisioner::commitChanges()

[virtual] bool ActiveSyncAccountProvisioner::createAccount()

Reimplemented from Provisioner::createAccount().

[virtual] bool ActiveSyncAccountProvisioner::selectAccount(quint64 accountId)

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn