aboutsummaryrefslogtreecommitdiffstats
path: root/Plugins/DbSqliteCipher/dbsqlitecipher.h
blob: 97ddddd1542e7e35a3435073055394dad68cde18 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#ifndef DBSQLITECIPHER_H
#define DBSQLITECIPHER_H

#include "dbsqlitecipher_global.h"
#include "plugins/dbpluginstdfilebase.h"
#include "plugins/genericplugin.h"

class DBSQLITECIPHERSHARED_EXPORT DbSqliteCipher : public GenericPlugin, public DbPluginStdFileBase
{
    Q_OBJECT
    SQLITESTUDIO_PLUGIN("dbsqlitecipher.json")

    public:
        DbSqliteCipher();

        QString getLabel() const;
        bool checkIfDbServedByPlugin(Db* db) const;
        QList<DbPluginOption> getOptionsList() const;
        bool init();
        void deinit();

        static_char* PASSWORD_OPT = "password";
        static_char* PRAGMAS_OPT = "pragmas";

    protected:
        Db *newInstance(const QString &name, const QString &path, const QHash<QString, QVariant> &options);

    private:
        bool initValid = false;

        static_char* LICENSE_TITLE = "SQLCipher (BSD) in DbSqliteCipher plugin";
        static_char* OPENSSL_TITLE = "OpenSSL (used by DbSqliteCipher plugin) license";
};

#endif // DBSQLITECIPHER_H