summaryrefslogtreecommitdiffstats
path: root/src/imitatepass.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/imitatepass.h')
-rw-r--r--src/imitatepass.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/src/imitatepass.h b/src/imitatepass.h
new file mode 100644
index 00000000..88289f5b
--- /dev/null
+++ b/src/imitatepass.h
@@ -0,0 +1,45 @@
+#ifndef IMITATEPASS_H
+#define IMITATEPASS_H
+
+#include "pass.h"
+
+/*!
+ \class ImitatePass
+ \brief Imitates pass features when pass is not enabled or available
+*/
+class ImitatePass : public Pass {
+ Q_OBJECT
+
+ bool removeDir(const QString &dirName);
+
+ void executeWrapper(int id, const QString &app, const QStringList &args,
+ bool readStdout = true, bool readStderr = true);
+
+ void executeWrapper(int id, const QString &app, const QStringList &args,
+ QString input, bool readStdout = true,
+ bool readStderr = true);
+
+ void GitCommit(const QString &file, const QString &msg);
+
+public:
+ ImitatePass();
+ virtual ~ImitatePass() {}
+ virtual void GitInit() Q_DECL_OVERRIDE;
+ virtual void GitPull() Q_DECL_OVERRIDE;
+ virtual void GitPull_b() Q_DECL_OVERRIDE;
+ virtual void GitPush() Q_DECL_OVERRIDE;
+ virtual void Show(QString file) Q_DECL_OVERRIDE;
+ virtual int Show_b(QString file) Q_DECL_OVERRIDE;
+ virtual void Insert(QString file, QString value,
+ bool overwrite = false) Q_DECL_OVERRIDE;
+ virtual void Remove(QString file, bool isDir = false) Q_DECL_OVERRIDE;
+ virtual void Init(QString path, const QList<UserInfo> &list) Q_DECL_OVERRIDE;
+
+ void reencryptPath(QString dir);
+signals:
+ void startReencryptPath();
+ void endReencryptPath();
+ void lastDecrypt(QString);
+};
+
+#endif // IMITATEPASS_H