QtPass 1.4.0
Multi-platform GUI for pass, the standard unix password manager.
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
FileContent Class Reference

#include <filecontent.h>

Public Member Functions

QString getPassword () const
 
NamedValues getNamedValues () const
 
QString getRemainingData () const
 
QString getRemainingDataForDisplay () const
 

Static Public Member Functions

static FileContent parse (const QString &fileContent, const QStringList &templateFields, bool allFields)
 parse parses the given fileContent in a FileContent object. The password is accessible through getPassword. The named value pairs (name: value) are parsed and depeding on the templateFields and allFields parameters accessible through getNamedValues, getRemainingData or getRemainingDataForDisplay.
 

Detailed Description

Definition at line 25 of file filecontent.h.

Member Function Documentation

◆ getNamedValues()

NamedValues FileContent::getNamedValues ( ) const
Returns
the named values in the file in the order of appearence, with template values first.

Definition at line 38 of file filecontent.cpp.

+ Here is the caller graph for this function:

◆ getPassword()

QString FileContent::getPassword ( ) const
Returns
the password from the parsed file.

Definition at line 36 of file filecontent.cpp.

+ Here is the caller graph for this function:

◆ getRemainingData()

QString FileContent::getRemainingData ( ) const
Returns
the data that is not the password and not in getNamedValues.

Definition at line 40 of file filecontent.cpp.

+ Here is the caller graph for this function:

◆ getRemainingDataForDisplay()

QString FileContent::getRemainingDataForDisplay ( ) const

@like getRemainingData but without data that should not be displayed (like a TOTP secret).

Definition at line 42 of file filecontent.cpp.

+ Here is the caller graph for this function:

◆ parse()

FileContent FileContent::parse ( const QString &  fileContent,
const QStringList &  templateFields,
bool  allFields 
)
static

parse parses the given fileContent in a FileContent object. The password is accessible through getPassword. The named value pairs (name: value) are parsed and depeding on the templateFields and allFields parameters accessible through getNamedValues, getRemainingData or getRemainingDataForDisplay.

Parameters
fileContentthe file content to parse.
templateFieldsthe fields in the template. Fields in the template will always be in getNamedValues() at the beginning of the list in the same order.
allFieldswhether all fields should be considered as named values. If set to false only templateFields are returned in getNamedValues().
Returns

Definition at line 7 of file filecontent.cpp.

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: