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 Secrets

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 Functions
  • Detailed Description

Identifier Class

(Sailfish::Secrets::Secret::Identifier)

An identifier for a secret More...

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

Public Functions

Identifier()
Identifier(const QString &name, const QString &collectionName, const QString &storagePluginName)
Identifier(const Sailfish::Secrets::Secret::Identifier &other)
~Identifier()
QString collectionName() const
bool identifiesStandaloneSecret() const
bool isValid() const
QString name() const
void setCollectionName(const QString &collectionName)
void setName(const QString &name)
void setStoragePluginName(const QString &storagePluginName)
QString storagePluginName() const
Identifier &operator=(const Sailfish::Secrets::Secret::Identifier &other)

Detailed Description

An identifier for a secret

The identifier consists of the name (alias) of the secret, along with the name of the collection in which the secret is stored (note that the collection name can be empty if the secret is stored as a standalone secret) and the name of the storage plugin which stores the collection.

Together, the secret name, collection name and storage plugin name uniquely identify the secret in the secrets storage.

Member Function Documentation

Identifier::Identifier()

Constructs a new, empty identifier

Identifier::Identifier(const QString &name, const QString &collectionName, const QString &storagePluginName)

Constructs a new identifier from the given secret name, collectionName and storagePluginName

Identifier::Identifier(const Sailfish::Secrets::Secret::Identifier &other)

Copy constructor.

Identifier::~Identifier()

Destroys the identifier

QString Identifier::collectionName() const

Returns the collection name from the identifier

See also setCollectionName().

bool Identifier::identifiesStandaloneSecret() const

Returns true if the collection name is empty

A standalone secret is a secret which is not stored in a collection, but instead is stored "standalone".

Note that standalone secrets are usually less-secure than collection stored secrets, as they are likely to be stored in a database which is not block-level encrypted.

bool Identifier::isValid() const

Returns true if the secret name is not empty

Note that this doesn't mean that the identifier does in fact identify a valid secret stored by the system secrets service; rather, it means that if a secret with that name does exist, then this identifier would identify it.

QString Identifier::name() const

Returns the secret name from the identifier

See also setName().

void Identifier::setCollectionName(const QString &collectionName)

Sets the collection name in the identifier to collectionName

See also collectionName().

void Identifier::setName(const QString &name)

Sets the secret name in the identifier to name

See also name().

void Identifier::setStoragePluginName(const QString &storagePluginName)

Sets the storage plugin name in the identifier to storagePluginName

See also storagePluginName().

QString Identifier::storagePluginName() const

Returns the storage plugin name from the identifier

See also setStoragePluginName().

Identifier &Identifier::operator=(const Sailfish::Secrets::Secret::Identifier &other)

Copy-assignment operator.

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn