8#ifndef SRC_PROFILEINIT_H_
9#define SRC_PROFILEINIT_H_
11#include <QCoreApplication>
13#include <QProcessEnvironment>
31 Q_DECLARE_TR_FUNCTIONS(ProfileInit)
47 static auto needsInit(
const QString &path) -> bool;
66 static auto initialise(
const QString &dir,
const QList<UserInfo> &users,
94 ProfileInit() =
default;
106 static auto writeGpgId(
const QString &gpgIdFile,
const QList<UserInfo> &users,
107 bool signed_, QString *note,
108 QByteArray *written =
nullptr) -> bool;
118 static auto signGpgId(
const QString &gpgIdFile,
const QByteArray &contents,
131 static auto commitGpgId(
const QString &dir,
const QString &gpgIdFile,
133 QString *note) -> bool;
static auto needsInit(const QString &path) -> bool
Check if a profile path needs initialization.
static auto initGit(const QString &dir, const AppSettings &s, QString *note) -> bool
Put an existing store under Git: git init, stage the .gpg entries and the .gpg-id files (nothing else...
static auto commitGpgId(const QString &dir, const QString &gpgIdFile, const QString &sigFile, const AppSettings &s, QString *note) -> bool
git init in dir, stage the .gpg-id and its signature, and commit them (signed when pass....
static auto gpgEnvironment(const AppSettings &s) -> QProcessEnvironment
The environment QtPass runs gpg in outside the active store's backend: the system's,...
static auto gitIdentityConfigured(const QString &dir, const AppSettings &s) -> bool
Whether git has a name and e-mail to commit with, i.e. user.name and user.email resolve (globally or ...
static auto initialise(const QString &dir, const QList< UserInfo > &users, const AppSettings &s, bool useGit, QString *note) -> bool
Write the recipients and, if wanted, put the folder under git.
static auto writeGpgId(const QString &gpgIdFile, const QList< UserInfo > &users, bool signed_, QString *note, QByteArray *written=nullptr) -> bool
Write the enabled recipients to gpgIdFile, whole or not at all; with signed_ the list carries the gen...
static auto signGpgId(const QString &gpgIdFile, const QByteArray &contents, const AppSettings &s, QString *note) -> bool
Sign the list just written as gpgIdFile, over the bytes contents that were written.
Plain value-object holding all flat QtPass configuration.
Stores GPG key info including validity, creation date, and more.