QtPass 1.6.0
Multi-platform GUI for pass, the standard unix password manager.
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
3#ifndef SRC_USERINFO_H_
4#define SRC_USERINFO_H_
5
6#include <QDateTime>
7#include <QString>
8
13struct UserInfo {
14 UserInfo() : validity('-'), have_secret(false), enabled(false) {}
15
20 auto fullyValid() const -> bool {
21 return (validity == 'f') || (validity == 'u');
22 }
23
27 auto marginallyValid() const -> bool { return validity == 'm'; }
31 auto isValid() const -> bool { return fullyValid() || marginallyValid(); }
32
36 QString name;
41 QString key_id;
58 bool enabled;
62 QDateTime expiry;
66 QDateTime created;
67};
68
69#endif // SRC_USERINFO_H_
bool have_secret
UserInfo::have_secret whether secret key is available (can decrypt with this key).
Definition userinfo.h:51
bool enabled
UserInfo::enabled Whether this user/key is enabled for normal use. True when the key should be treate...
Definition userinfo.h:58
auto marginallyValid() const -> bool
UserInfo::marginallyValid when validity is m. http://git.gnupg.org/cgi-bin/gitweb....
Definition userinfo.h:27
QString key_id
UserInfo::key_id hexadecimal representation of the GnuPG key identifier.
Definition userinfo.h:41
auto fullyValid() const -> bool
UserInfo::fullyValid when validity is f or u. http://git.gnupg.org/cgi-bin/gitweb....
Definition userinfo.h:20
auto isValid() const -> bool
UserInfo::isValid when fullyValid or marginallyValid.
Definition userinfo.h:31
QDateTime created
UserInfo::created date/time when key was created.
Definition userinfo.h:66
QString name
UserInfo::name GPG user ID / full name.
Definition userinfo.h:36
UserInfo()
Definition userinfo.h:14
char validity
UserInfo::validity GnuPG representation of validity http://git.gnupg.org/cgi-bin/gitweb....
Definition userinfo.h:46
QDateTime expiry
UserInfo::expiry date/time when key expires.
Definition userinfo.h:62