QtPass
2.0.0
Developer documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
userinfo.h
Go to the documentation of this file.
1
// SPDX-FileCopyrightText: 2015 Anne Jan Brouwer
2
// SPDX-License-Identifier: GPL-3.0-or-later
8
#ifndef SRC_USERINFO_H_
9
#define SRC_USERINFO_H_
10
11
#include <QDateTime>
12
#include <QString>
13
19
struct
UserInfo
{
23
UserInfo
() {}
24
30
auto
fullyValid
() const ->
bool
{
31
return
(
validity
==
'f'
) || (
validity
==
'u'
);
32
}
33
38
auto
marginallyValid
() const ->
bool
{
return
validity
==
'm'
; }
43
auto
isValid
() const ->
bool
{
return
fullyValid
() ||
marginallyValid
(); }
44
48
QString
name
;
52
QString
key_id
;
57
char
validity
{
'-'
};
61
bool
have_secret
{
false
};
65
bool
enabled
{
false
};
69
QDateTime
expiry
;
73
QDateTime
created
;
74
};
75
76
#endif
// SRC_USERINFO_H_
UserInfo::have_secret
bool have_secret
Whether secret key is available (can decrypt with this key).
Definition
userinfo.h:61
UserInfo::enabled
bool enabled
Whether this user/key is enabled for normal use.
Definition
userinfo.h:65
UserInfo::marginallyValid
auto marginallyValid() const -> bool
Check marginal validity per GnuPG validity codes.
Definition
userinfo.h:38
UserInfo::key_id
QString key_id
Hexadecimal representation of the GnuPG key identifier.
Definition
userinfo.h:52
UserInfo::fullyValid
auto fullyValid() const -> bool
Check full validity per GnuPG validity codes.
Definition
userinfo.h:30
UserInfo::isValid
auto isValid() const -> bool
Check whether the key has any usable validity level.
Definition
userinfo.h:43
UserInfo::created
QDateTime created
Date/time when key was created.
Definition
userinfo.h:73
UserInfo::name
QString name
GPG user ID / full name.
Definition
userinfo.h:48
UserInfo::UserInfo
UserInfo()
Construct a UserInfo with default (invalid/disabled) state.
Definition
userinfo.h:23
UserInfo::validity
char validity
GnuPG representation of validity. http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg....
Definition
userinfo.h:57
UserInfo::expiry
QDateTime expiry
Date/time when key expires.
Definition
userinfo.h:69
src
userinfo.h
Generated by
1.18.0