QtPass  1.2.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()
Definition: userinfo.h:12
QDateTime expiry
UserInfo::expiry date/time key expires.
Definition: userinfo.h:54
QDateTime created
UserInfo::created date/time key was created.
Definition: userinfo.h:58
bool enabled
UserInfo::enabled.
Definition: userinfo.h:50
QString key_id
UserInfo::key_id hexadecimal representation.
Definition: userinfo.h:36
bool have_secret
UserInfo::have_secret secret key is available (can decrypt with this key)
Definition: userinfo.h:46
char validity
UserInfo::validity GnuPG representation of validity http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS.
Definition: userinfo.h:41
bool marginallyValid()
UserInfo::marginallyValid when validity is m. http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS.
Definition: userinfo.h:23
bool isValid()
UserInfo::isValid when fullyValid or marginallyValid.
Definition: userinfo.h:27
QString name
UserInfo::name full name.
Definition: userinfo.h:32
Stores key info lines including validity, creation date and more.
Definition: userinfo.h:11
bool fullyValid()
UserInfo::fullyValid when validity is f or u. http://git.gnupg.org/cgi-bin/gitweb.cgi?p=gnupg.git;a=blob_plain;f=doc/DETAILS.
Definition: userinfo.h:18