-
-
Notifications
You must be signed in to change notification settings - Fork 163
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
79 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#ifndef IMITATEPASS_H | ||
#define IMITATEPASS_H | ||
|
||
#include "pass.h" | ||
|
||
class ImitatePass : public Pass | ||
{ | ||
|
||
bool removeDir(const QString &dirName); | ||
public: | ||
ImitatePass(); | ||
virtual ~ImitatePass() {} | ||
virtual void GitInit() override; | ||
virtual void GitPull() override; | ||
virtual void GitPush() override; | ||
virtual QProcess::ExitStatus Show(QString file, bool block=false) override; | ||
virtual void Insert(QString file, QString value, bool overwrite=false) override; | ||
virtual void Remove(QString file, bool isDir = false) override; | ||
virtual void Init(QString path, const QList<UserInfo> &list) override; | ||
|
||
void reencryptPath(QString dir); | ||
}; | ||
|
||
#endif // IMITATEPASS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#ifndef PASS_H | ||
#define PASS_H | ||
|
||
#include <QString> | ||
#include <QList> | ||
#include <QProcess> | ||
#include <QQueue> | ||
// TODO(bezet): extract UserInfo somewhere | ||
#include "usersdialog.h" | ||
#include "enums.h" | ||
|
||
|
||
class Pass | ||
{ | ||
public: | ||
Pass(); | ||
virtual ~Pass() {} | ||
virtual void GitInit() = 0; | ||
virtual void GitPull() = 0; | ||
virtual void GitPush() = 0; | ||
virtual QProcess::ExitStatus Show(QString file, bool block=false) = 0; | ||
virtual void Insert(QString file, QString value, bool force) = 0; | ||
virtual void Remove(QString file, bool isDir) = 0; | ||
virtual void Init(QString path, const QList<UserInfo> &users) = 0; | ||
virtual QString Generate(int length, const QString& charset); | ||
|
||
}; | ||
|
||
#endif // PASS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#ifndef REALPASS_H | ||
#define REALPASS_H | ||
|
||
#include "pass.h" | ||
|
||
class RealPass : public Pass | ||
{ | ||
private: | ||
void executePass(QString args, QString input=QString()); | ||
public: | ||
RealPass(); | ||
virtual ~RealPass() {} | ||
virtual void GitInit() override; | ||
virtual void GitPull() override; | ||
virtual void GitPush() override; | ||
virtual QProcess::ExitStatus Show(QString file, bool block=false) override; | ||
virtual void Insert(QString file, QString value, bool overwrite=false) override; | ||
virtual void Remove(QString file, bool isDir = false) override; | ||
virtual void Init(QString path, const QList<UserInfo> &users) override; | ||
}; | ||
|
||
#endif // REALPASS_H |