Sailfish Crypto
API DocumentationInteractionParameters Class
(Sailfish::Crypto::InteractionParameters)Encapsulates parameters related to requesting input from the user More...
Header: | #include <Crypto/interactionparameters.h> |
Instantiated By: | InteractionParameters |
Public Types
class | PromptText |
enum | EchoMode { UnknownEcho, NormalEcho, PasswordEcho, NoEcho, LastEchoMode } |
enum | InputType { UnknownInput, AuthenticationInput, ConfirmationInput, NumericInput, ..., LastInputType } |
flags | InputTypes |
enum | Operation { UnknownOperation, RequestUserData, UnlockDatabase, LockDatabase, ..., LastOperation } |
flags | Operations |
enum | Prompt { Message, Instruction, NewInstruction, RepeatInstruction, Accept, Cancel } |
Properties
|
|
Public Functions
InteractionParameters() | |
InteractionParameters(const InteractionParameters &other) | |
~InteractionParameters() | |
QString | applicationId() const |
QString | authenticationPluginName() const |
QString | collectionName() const |
EchoMode | echoMode() const |
InputType | inputType() const |
bool | isValid() const |
QString | keyName() const |
Operation | operation() const |
QString | pluginName() const |
PromptText | promptText() const |
void | setApplicationId(const QString &id) |
void | setAuthenticationPluginName(const QString &pluginName) |
void | setCollectionName(const QString &name) |
void | setEchoMode(EchoMode mode) |
void | setInputType(InputType type) |
void | setKeyName(const QString &name) |
void | setOperation(Operation op) |
void | setPluginName(const QString &name) |
void | setPromptText(const PromptText &prompt) |
void | setPromptText(const QString &message) |
InteractionParameters & | operator=(const InteractionParameters &other) |
Detailed Description
Encapsulates parameters related to requesting input from the user
This class encapsulates a variety of parameters which will affect the look and feel, as well as functionality, of a prompt to be shown to the user of the device.
Usually, this will be used when requesting some secret data from the user from which a cryptographic key will be generated (that is, a passphrase or a PIN code).
Please see the documentation for GenerateStoredKeyRequest for more information about how it can be used.
Member Type Documentation
enum InteractionParameters::EchoMode
enum InteractionParameters::InputType
flags InteractionParameters::InputTypes
The InputTypes type is a typedef for QFlags<InputType>. It stores an OR combination of InputType values.
enum InteractionParameters::Operation
flags InteractionParameters::Operations
The Operations type is a typedef for QFlags<Operation>. It stores an OR combination of Operation values.
enum InteractionParameters::Prompt
Identifiers for prompt strings which will be shown to the user when requesting input.
Constant | Value | Description |
---|---|---|
Sailfish::Crypto::InteractionParameters::Message | 0 | A message describing the reason for the prompt. |
Sailfish::Crypto::InteractionParameters::Instruction | 0x10 | An instruction asking the user to enter a passphrase. |
Sailfish::Crypto::InteractionParameters::NewInstruction | ? | An instruction asking the user to enter a new passphrase. |
Sailfish::Crypto::InteractionParameters::RepeatInstruction | ? | An instruction asking the user to repeat a new passphrase. |
Sailfish::Crypto::InteractionParameters::Accept | 0x20 | A label for the prompt accept action. |
Sailfish::Crypto::InteractionParameters::Cancel | 0x30 | A label for the prompt cancel action. |
Property Documentation
applicationId : QString
Access functions:
QString | applicationId() const |
void | setApplicationId(const QString &id) |
authenticationPluginName : QString
Access functions:
QString | authenticationPluginName() const |
void | setAuthenticationPluginName(const QString &pluginName) |
collectionName : QString
Access functions:
QString | collectionName() const |
void | setCollectionName(const QString &name) |
echoMode : EchoMode
Access functions:
EchoMode | echoMode() const |
void | setEchoMode(EchoMode mode) |
inputType : InputType
Access functions:
InputType | inputType() const |
void | setInputType(InputType type) |
keyName : QString
Access functions:
QString | keyName() const |
void | setKeyName(const QString &name) |
operation : Operation
Access functions:
Operation | operation() const |
void | setOperation(Operation op) |
pluginName : QString
Access functions:
QString | pluginName() const |
void | setPluginName(const QString &name) |
promptText : Sailfish::Crypto::InteractionParameters::PromptText
Access functions:
PromptText | promptText() const |
void | setPromptText(const PromptText &prompt) |
void | setPromptText(const QString &message) |
Member Function Documentation
InteractionParameters::InteractionParameters()
Constructs a new InteractionParameters instance
InteractionParameters::InteractionParameters(const InteractionParameters &other)
Constructs a copy of the other InteractionParameters instance
InteractionParameters::~InteractionParameters()
Destroys the InteractionParameters instance
QString InteractionParameters::applicationId() const
Returns the identifier of the client application making the request
Note: Getter function for property applicationId.
See also setApplicationId().
QString InteractionParameters::authenticationPluginName() const
Returns the name of the authentication plugin which will provide the user input flow
Note: Getter function for property authenticationPluginName.
See also setAuthenticationPluginName().
QString InteractionParameters::collectionName() const
Returns the name of the collection in which the key is stored, which is associated with the user input request
Note: Getter function for property collectionName.
See also setCollectionName().
EchoMode InteractionParameters::echoMode() const
Returns the echo mode which should apply as the user provides the input
Note: Getter function for property echoMode.
See also setEchoMode().
InputType InteractionParameters::inputType() const
Returns the type of input required from the user
Note: Getter function for property inputType.
See also setInputType().
bool InteractionParameters::isValid() const
Returns true if the required user input type is well-specified
QString InteractionParameters::keyName() const
Returns the name of the key associated with the user input request
Note: Getter function for property keyName.
See also setKeyName().
Operation InteractionParameters::operation() const
Returns the type of operation which will be performed with the user input once received
Note: Getter function for property operation.
See also setOperation().
QString InteractionParameters::pluginName() const
Returns the name of the extension plugin which is associated with the user input request
Note: Getter function for property pluginName.
See also setPluginName().
PromptText InteractionParameters::promptText() const
Returns the application-specified prompt text to be displayed as part of the user input flow
Note: Getter function for property promptText.
See also setPromptText().
void InteractionParameters::setApplicationId(const QString &id)
Sets the identifier of the client application making the request to id
Note that in general, this parameter will be supplied by the secrets service, so any value set by the client application here will have no effect.
Note: Setter function for property applicationId.
See also applicationId().
void InteractionParameters::setAuthenticationPluginName(const QString &pluginName)
Sets the name of the authentication plugin which will provide the user input flow to pluginName
If no authentication plugin name is specified, the default system authentication plugin for the specified inputType() will be used.
Note: Setter function for property authenticationPluginName.
See also authenticationPluginName().
void InteractionParameters::setCollectionName(const QString &name)
Sets the name of the collection in which the key is stored, which is associated with the user input request to name
Note that in general, this parameter will be supplied by the secrets service, so any value set by the client application here will have no effect.
Note: Setter function for property collectionName.
See also collectionName().
void InteractionParameters::setEchoMode(EchoMode mode)
Sets the echo mode which should apply as the user provides the input to mode
Note: Setter function for property echoMode.
See also echoMode().
void InteractionParameters::setInputType(InputType type)
Sets the type of input required from the user to type
Note: Setter function for property inputType.
See also inputType().
void InteractionParameters::setKeyName(const QString &name)
Sets the name of the key associated with the user input request to name
Note that in general, this parameter will be supplied by the crypto service, so any value set by the client application here will have no effect.
Note: Setter function for property keyName.
See also keyName().
void InteractionParameters::setOperation(Operation op)
Sets the type of operation which will be performed with the user input once received to op
Note that in general, this parameter will be supplied by the secrets service, so any value set by the client application here will have no effect.
Note: Setter function for property operation.
See also operation().
void InteractionParameters::setPluginName(const QString &name)
Sets the name of the extension plugin which is associated with the user input request to name
Note that in general, this parameter will be supplied by the secrets service, so any value set by the client application here will have no effect.
Note: Setter function for property pluginName.
See also pluginName().
void InteractionParameters::setPromptText(const PromptText &prompt)
Sets the application-specified prompt text to be displayed as part of the user input flow to prompt
Note that this field will usually be supplied by the secrets service for system-mediated user interaction flows, so any value set by client applications will have no effect.
Note: Setter function for property promptText.
See also promptText().
void InteractionParameters::setPromptText(const QString &message)
Sets an application-specified message to be displayed as part of the user input flow.
Note that this field will usually be supplied by the secrets service for system-mediated user interaction flows, so any value set by client applications will have no effect.
Note: Setter function for property promptText.
InteractionParameters &InteractionParameters::operator=(const InteractionParameters &other)
Assigns this InteractionParameters to be equal to the other