Sailfish Secrets
API DocumentationResult Class
(Sailfish::Secrets::Result)The result of a secrets operation More...
Header: | #include <Secrets/result.h> |
Public Types
enum | ErrorCode { NoError, UnknownError, SerializationError, DaemonError, ..., OtherError } |
enum | ResultCode { Succeeded, Pending, Failed } |
Properties
- code : Sailfish::Secrets::Result::ResultCode
- errorCode : Sailfish::Secrets::Result::ErrorCode
- errorMessage : QString
Public Functions
Result(Sailfish::Secrets::Result::ResultCode resultCode = Succeeded) | |
Result(Sailfish::Secrets::Result::ErrorCode errorCode, const QString &errorMessage) | |
Result(const Result &other) | |
~Result() | |
Sailfish::Secrets::Result::ResultCode | code() const |
Sailfish::Secrets::Result::ErrorCode | errorCode() const |
QString | errorMessage() const |
void | setCode(int c) |
void | setCode(Sailfish::Secrets::Result::ResultCode c) |
void | setErrorCode(int c) |
void | setErrorCode(Sailfish::Secrets::Result::ErrorCode c) |
void | setErrorMessage(const QString &m) |
Result & | operator=(const Sailfish::Secrets::Result &other) |
Detailed Description
The result of a secrets operation
The result encapsulates information about whether a given secrets 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.
Property Documentation
code : Sailfish::Secrets::Result::ResultCode
Access functions:
Sailfish::Secrets::Result::ResultCode | code() const |
void | setCode(int c) |
void | setCode(Sailfish::Secrets::Result::ResultCode c) |
errorCode : Sailfish::Secrets::Result::ErrorCode
Access functions:
Sailfish::Secrets::Result::ErrorCode | errorCode() const |
void | setErrorCode(int c) |
void | setErrorCode(Sailfish::Secrets::Result::ErrorCode c) |
errorMessage : QString
Access functions:
QString | errorMessage() const |
void | setErrorMessage(const QString &m) |
Member Function Documentation
Result::Result(Sailfish::Secrets::Result::ResultCode resultCode = Succeeded)
Default constructs an instance of Result.
Result::Result(Sailfish::Secrets::Result::ErrorCode errorCode, 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::Secrets::Result::ResultCode Result::code() const
Returns the result code associated with the result
Note: Getter function for property code.
See also setCode().
Sailfish::Secrets::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().
Result &Result::operator=(const Sailfish::Secrets::Result &other)
Copy-assignment operator.