Browser Integration code cleanup (#8489)

Co-authored-by: varjolintu <sami.vanttinen@protonmail.com>
This commit is contained in:
Sami Vänttinen 2023-02-18 22:52:31 +02:00 committed by GitHub
parent ba15981700
commit 4a30417f76
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 321 additions and 336 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2022 KeePassXC Team <team@keepassxc.org>
* Copyright (C) 2023 KeePassXC Team <team@keepassxc.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -20,9 +20,12 @@
#include <QPair>
#include <QString>
#include <QVariant>
class QJsonObject;
typedef QMap<QString, QVariant> Parameters;
namespace
{
enum
@ -55,11 +58,10 @@ public:
static BrowserMessageBuilder* instance();
QPair<QString, QString> getKeyPair();
QJsonObject buildMessage(const QString& nonce) const;
QJsonObject buildResponse(const QString& action,
const QJsonObject& message,
const QString& nonce,
const Parameters& params,
const QString& publicKey,
const QString& secretKey);
QJsonObject getErrorReply(const QString& action, const int errorCode) const;