Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/keepassxreboot/keepassxc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJanek Bevendorff <janek@jbev.net>2018-01-07 06:08:32 +0300
committerJonathan White <support@dmapps.us>2018-01-13 22:24:58 +0300
commita6ddc22fb8f2bd760dfd8ce3a3d1bf0502d94d0d (patch)
treecc6f4a32cc059dfd8d16371694134f4fb2fbdacd /src/format/Kdbx4Writer.h
parent72a1c65d003789fa9ad6330b8c6e6fe3ccb5eb42 (diff)
Refactor database readers/writers and XML handling
* Refactor Kdbx*Reader * Refactor KdbxWriter * Refactor KdbxXmlReader * Refactor KdbxXmlWriter
Diffstat (limited to 'src/format/Kdbx4Writer.h')
-rw-r--r--src/format/Kdbx4Writer.h33
1 files changed, 9 insertions, 24 deletions
diff --git a/src/format/Kdbx4Writer.h b/src/format/Kdbx4Writer.h
index 7bb20e0f1..097a7864a 100644
--- a/src/format/Kdbx4Writer.h
+++ b/src/format/Kdbx4Writer.h
@@ -18,35 +18,20 @@
#ifndef KEEPASSX_KDBX4WRITER_H
#define KEEPASSX_KDBX4WRITER_H
-#include <QCoreApplication>
+#include "KdbxWriter.h"
-#include "format/KeePass2.h"
-#include "format/KeePass2Writer.h"
-#include "keys/CompositeKey.h"
-
-class Database;
-class QIODevice;
-
-class Kdbx4Writer : public BaseKeePass2Writer
+/**
+ * KDBX4 writer implementation.
+ */
+class Kdbx4Writer : public KdbxWriter
{
- Q_DECLARE_TR_FUNCTIONS(Kdbx4Writer)
-
public:
- Kdbx4Writer();
-
- using BaseKeePass2Writer::writeDatabase;
- bool writeDatabase(QIODevice* device, Database* db);
+ bool writeDatabase(QIODevice* device, Database* db) override;
private:
- bool writeData(const QByteArray& data);
- bool writeHeaderField(KeePass2::HeaderFieldID fieldId, const QByteArray& data);
- bool writeInnerHeaderField(KeePass2::InnerHeaderFieldID fieldId, const QByteArray& data);
-
- QIODevice* m_device;
-
- bool writeBinary(const QByteArray& data);
-
- static bool serializeVariantMap(const QVariantMap& p, QByteArray& o);
+ bool writeInnerHeaderField(QIODevice* device, KeePass2::InnerHeaderFieldID fieldId, const QByteArray& data);
+ bool writeBinary(QIODevice* device, const QByteArray& data);
+ static bool serializeVariantMap(const QVariantMap& map, QByteArray& outputBytes);
};
#endif // KEEPASSX_KDBX4WRITER_H