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

Secret Class

(Sailfish::Secrets::Secret)

An instance of a secret More...

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

Public Types

class FilterData
class Identifier

Properties

  • collectionName : QString
  • data : QByteArray
  • filterDataFields : const QStringList
  • name : QString
  • storagePluginName : QString
  • type : QString

Public Functions

Secret()
Secret(const Secret &other)
Secret(const QString &name, const QString &collection, const QString &storagePlugin)
Secret(const Secret::Identifier &ident)
Secret(const QByteArray &blob, const Sailfish::Secrets::Secret::FilterData &filterData = Sailfish::Secrets::Secret::FilterData())
~Secret()
QString collectionName() const
QByteArray data() const
Sailfish::Secrets::Secret::FilterData filterData() const
QString filterData(const QString &field) const
QStringList filterDataFields() const
bool hasFilterData(const QString &field) const
Sailfish::Secrets::Secret::Identifier identifier() const
QString name() const
void setCollectionName(const QString &cname)
void setData(const QByteArray &data)
void setFilterData(const Sailfish::Secrets::Secret::FilterData &data)
void setFilterData(const QString &field, const QString &value)
void setIdentifier(const Sailfish::Secrets::Secret::Identifier &identifier)
void setName(const QString &name)
void setStoragePluginName(const QString &pname)
void setType(const QString &type)
QString storagePluginName() const
QString type() const
Secret &operator=(const Sailfish::Secrets::Secret &other)

Detailed Description

An instance of a secret

The Secret class encapsulates a piece of data stored by an application with the system secrets storage service. Each secret is identified by its name (alias) along with the name of the collection in which the secret is stored (the collection name is optional if the secret is stored standalone).

Property Documentation

collectionName : QString

Access functions:

QString collectionName() const
void setCollectionName(const QString &cname)

data : QByteArray

Access functions:

QByteArray data() const
void setData(const QByteArray &data)

filterDataFields : const QStringList

Access functions:

QStringList filterDataFields() const

name : QString

Access functions:

QString name() const
void setName(const QString &name)

storagePluginName : QString

Access functions:

QString storagePluginName() const
void setStoragePluginName(const QString &pname)

type : QString

Access functions:

QString type() const
void setType(const QString &type)

Member Function Documentation

Secret::Secret()

Constructs an empty secret with an unknown type

Secret::Secret(const Secret &other)

Constructs a copy of the other secret

Secret::Secret(const QString &name, const QString &collection, const QString &storagePlugin)

Constructs a secret which references a secret stored in the given storagePlugin with the given name from the given collection.

Secret::Secret(const Secret::Identifier &ident)

Constructs a secret which references a stored secret with the given ident

Secret::Secret(const QByteArray &blob, const Sailfish::Secrets::Secret::FilterData &filterData = Sailfish::Secrets::Secret::FilterData())

Copy constructor.

Secret::~Secret()

Destroys the secret

QString Secret::collectionName() const

Returns the collection name field from the identifier of the secret

Note: Getter function for property collectionName.

See also setCollectionName().

QByteArray Secret::data() const

Returns the secret data from the secret

This is the data which will be stored securely by the secrets service

Note: Getter function for property data.

See also setData().

Sailfish::Secrets::Secret::FilterData Secret::filterData() const

Returns the filter data associated with the secret

This filter data may be used by other clients to find the secret

See also setFilterData().

QString Secret::filterData(const QString &field) const

Returns the filter data value associated with the secret for the given filter field

QStringList Secret::filterDataFields() const

Returns the fields (keys) of filter data associated with the secret

Note: Getter function for property filterDataFields.

bool Secret::hasFilterData(const QString &field) const

Returns true if the secret has filter data associated with it for the given filter field

Sailfish::Secrets::Secret::Identifier Secret::identifier() const

Returns the identifier of the secret

See also setIdentifier().

QString Secret::name() const

Returns the name field from the identifier of the secret

Note: Getter function for property name.

See also setName().

void Secret::setCollectionName(const QString &cname)

Sets the collection name field in the identifier of the secret to cname

Note: Setter function for property collectionName.

See also collectionName().

void Secret::setData(const QByteArray &data)

Sets the secret data in the secret to data

Note: Setter function for property data.

See also data().

void Secret::setFilterData(const Sailfish::Secrets::Secret::FilterData &data)

See also filterData().

void Secret::setFilterData(const QString &field, const QString &value)

Sets the filter data value associated with the secret for the given filter field to value

void Secret::setIdentifier(const Sailfish::Secrets::Secret::Identifier &identifier)

See also identifier().

void Secret::setName(const QString &name)

Sets the name field in the identifier of the secret to name

Note: Setter function for property name.

See also name().

void Secret::setStoragePluginName(const QString &pname)

Sets the storage plugin name field in the identifier of the secret to pname

Note: Setter function for property storagePluginName.

See also storagePluginName().

void Secret::setType(const QString &type)

Sets the type of the secret to the given type

Note: Setter function for property type.

See also type().

QString Secret::storagePluginName() const

Returns the storage plugin name field from the identifier of the secret

Note: Getter function for property storagePluginName.

See also setStoragePluginName().

QString Secret::type() const

Returns the type of the secret

This metadata is informational only, and doesn't affect its storage.

Note: Getter function for property type.

See also setType().

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

Copy-assignment operator.

  • Legal
  • Contact Us
  • Jolla Mobile Ltd © 2025

  • Facebook
  • Twitter
  • Mastodon
  • YouTube
  • LinkedIn