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

Sailfish Crypto

API Documentation
  • 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 Types
  • Properties
  • Public Functions
  • Detailed Description

Result Class

(Sailfish::Crypto::Result)

The result of a crypto operation More...

Header: #include <Crypto/result.h>
  • List of all members, including inherited members

Public Types

enum ErrorCode { NoError, UnknownError, SerializationError, StorageError, ..., OtherError }
enum ResultCode { Succeeded, Pending, Failed }

Properties

  • code : Sailfish::Crypto::Result::ResultCode
  • errorCode : Sailfish::Crypto::Result::ErrorCode
  • errorMessage : QString
  • storageErrorCode : int

Public Functions

Result(Sailfish::Crypto::Result::ResultCode resultCode = Succeeded)
Result(Sailfish::Crypto::Result::ErrorCode errorCode, const QString &errorMessage)
Result(Sailfish::Crypto::Result::ErrorCode errorCode, int storageErrorCode, const QString &errorMessage)
Result(const Result &other)
~Result()
Sailfish::Crypto::Result::ResultCode code() const
Sailfish::Crypto::Result::ErrorCode errorCode() const
QString errorMessage() const
void setCode(int c)
void setCode(Sailfish::Crypto::Result::ResultCode c)
void setErrorCode(int c)
void setErrorCode(Sailfish::Crypto::Result::ErrorCode c)
void setErrorMessage(const QString &m)
void setStorageErrorCode(int c)
int storageErrorCode() const
Result &operator=(const Sailfish::Crypto::Result &other)

Detailed Description

The result of a crypto operation

The result encapsulates information about whether a given crypto operation succeeded, failed, or is pending conclusion. If the operation failed, the result will also include some extra information about why the operation failed, to better allow client applications to handle the failure gracefully.

Member Type Documentation

enum Result::ErrorCode

enum Result::ResultCode

Property Documentation

code : Sailfish::Crypto::Result::ResultCode

Access functions:

Sailfish::Crypto::Result::ResultCode code() const
void setCode(int c)
void setCode(Sailfish::Crypto::Result::ResultCode c)

errorCode : Sailfish::Crypto::Result::ErrorCode

Access functions:

Sailfish::Crypto::Result::ErrorCode errorCode() const
void setErrorCode(int c)
void setErrorCode(Sailfish::Crypto::Result::ErrorCode c)

errorMessage : QString

Access functions:

QString errorMessage() const
void setErrorMessage(const QString &m)

storageErrorCode : int

Access functions:

int storageErrorCode() const
void setStorageErrorCode(int c)

Member Function Documentation

Result::Result(Sailfish::Crypto::Result::ResultCode resultCode = Succeeded)

Default constructs an instance of Result.

Result::Result(Sailfish::Crypto::Result::ErrorCode errorCode, const QString &errorMessage)

Default constructs an instance of Result.

Result::Result(Sailfish::Crypto::Result::ErrorCode errorCode, int storageErrorCode, const QString &errorMessage)

Default constructs an instance of Result.

Result::Result(const Result &other)

Constructs a copy of the other result

Result::~Result()

Destroys the result

Sailfish::Crypto::Result::ResultCode Result::code() const

Returns the result code associated with the result

Note: Getter function for property code.

See also setCode().

Sailfish::Crypto::Result::ErrorCode Result::errorCode() const

Returns the error code associated with the result

Note: Getter function for property errorCode.

See also setErrorCode().

QString Result::errorMessage() const

Returns the error message associated with the result

The error message is not meant for consumption by users of the application, as it will not be translated and may contain technical information. It is primarily intended for use by developers during development and debugging of applications.

Note: Getter function for property errorMessage.

See also setErrorMessage().

void Result::setCode(int c)

Sets the result code associated with the result to c

Note: Setter function for property code.

See also code().

void Result::setErrorCode(int c)

Sets the error code associated with the result to c

Note: Setter function for property errorCode.

See also errorCode().

void Result::setErrorMessage(const QString &m)

Sets the error message associated with the result to m

Note: Setter function for property errorMessage.

See also errorMessage().

void Result::setStorageErrorCode(int c)

Sets the storage error code associated with the result to c

Note: Setter function for property storageErrorCode.

See also storageErrorCode().

int Result::storageErrorCode() const

Returns the storage error code associated with the result

Some crypto operations will interact with the secrets storage backend (for example, when retrieving a Key from some crypto storage plugin). Such an operation may fail due to an error emitted by the storage backend, and if so, the storage-specific error code will be included here.

The returned value will be a specific Sailfish::Secrets::Result::ErrorCode value.

Note: Getter function for property storageErrorCode.

See also setStorageErrorCode().

Result &Result::operator=(const Sailfish::Crypto::Result &other)

Copy-assignment operator.

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn