QtPass  1.3.3
Multi-platform GUI for pass, the standard unix password manager.
userinfo.h
Go to the documentation of this file.
1 #ifndef DATAHELPERS_H
2 #define DATAHELPERS_H
3 
4 #include <QDateTime>
5 #include <QString>
6 
11 struct UserInfo {
12  UserInfo() : validity('-'), have_secret(false), enabled(false) {}
13 
18  bool fullyValid() { return validity == 'f' || validity == 'u'; }
23  bool marginallyValid() { return validity == 'm'; }
27  bool isValid() { return fullyValid() || marginallyValid(); }
28 
32  QString name;
36  QString key_id;
41  char validity;
50  bool enabled;
54  QDateTime expiry;
58  QDateTime created;
59 };
60 
61 #endif // DATAHELPERS_H
UserInfo::expiry
QDateTime expiry
UserInfo::expiry date/time key expires.
Definition: userinfo.h:54
UserInfo::created
QDateTime created
UserInfo::created date/time key was created.
Definition: userinfo.h:58
UserInfo::have_secret
bool have_secret
UserInfo::have_secret secret key is available (can decrypt with this key)
Definition: userinfo.h:46
UserInfo::key_id
QString key_id
UserInfo::key_id hexadecimal representation.
Definition: userinfo.h:36
UserInfo::enabled
bool enabled
UserInfo::enabled.
Definition: userinfo.h:50
UserInfo::validity
char validity
UserInfo::validity GnuPG representation of validity http://git.gnupg.org/cgi-bin/gitweb....
Definition: userinfo.h:41
UserInfo::marginallyValid
bool marginallyValid()
UserInfo::marginallyValid when validity is m. http://git.gnupg.org/cgi-bin/gitweb....
Definition: userinfo.h:23
UserInfo::isValid
bool isValid()
UserInfo::isValid when fullyValid or marginallyValid.
Definition: userinfo.h:27
UserInfo::name
QString name
UserInfo::name full name.
Definition: userinfo.h:32
UserInfo::fullyValid
bool fullyValid()
UserInfo::fullyValid when validity is f or u. http://git.gnupg.org/cgi-bin/gitweb....
Definition: userinfo.h:18
UserInfo
Stores key info lines including validity, creation date and more.
Definition: userinfo.h:11
UserInfo::UserInfo
UserInfo()
Definition: userinfo.h:12