Commit 40d0a5ad authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add class to check url from local database

parent 51419121
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "checkphishingurlfromlocaldatabasejobtest.h"
#include <QTest>
CheckPhishingUrlFromLocalDataBaseJobTest::CheckPhishingUrlFromLocalDataBaseJobTest(QObject *parent)
: QObject(parent)
{
}
CheckPhishingUrlFromLocalDataBaseJobTest::~CheckPhishingUrlFromLocalDataBaseJobTest()
{
}
QTEST_MAIN(CheckPhishingUrlFromLocalDataBaseJobTest)
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
#define CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
#include <QObject>
class CheckPhishingUrlFromLocalDataBaseJobTest : public QObject
{
Q_OBJECT
public:
explicit CheckPhishingUrlFromLocalDataBaseJobTest(QObject *parent = Q_NULLPTR);
~CheckPhishingUrlFromLocalDataBaseJobTest();
};
#endif // CHECKPHISHINGURLFROMLOCALDATABASEJOB_H
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#include "checkphishingurlfromlocaldatabasejob.h"
using namespace WebEngineViewer;
CheckPhishingUrlFromLocalDataBaseJob::CheckPhishingUrlFromLocalDataBaseJob(QObject *parent)
: QObject(parent)
{
}
WebEngineViewer::CheckPhishingUrlFromLocalDataBaseJob::~CheckPhishingUrlFromLocalDataBaseJob()
{
}
void CheckPhishingUrlFromLocalDataBaseJob::setCheckPhisingUrl(const QUrl &url)
{
mUrl = url;
}
void CheckPhishingUrlFromLocalDataBaseJob::start()
{
if (mUrl.isValid()) {
//TODO
deleteLater();
} else {
//TODO
}
}
bool CheckPhishingUrlFromLocalDataBaseJob::canStart() const
{
return mUrl.isValid();
}
QString CheckPhishingUrlFromLocalDataBaseJob::createHash()
{
//TODO
return {};
}
/*
Copyright (C) 2016 Laurent Montel <montel@kde.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Boston, MA 02110-1301, USA.
*/
#ifndef CHECKPHISHINGURLFROMLOCALDATABASE_H
#define CHECKPHISHINGURLFROMLOCALDATABASE_H
#include <QObject>
#include "webengineviewer_export.h"
#include <QUrl>
namespace WebEngineViewer
{
class WEBENGINEVIEWER_EXPORT CheckPhishingUrlFromLocalDataBaseJob : public QObject
{
Q_OBJECT
public:
explicit CheckPhishingUrlFromLocalDataBaseJob(QObject *parent = Q_NULLPTR);
~CheckPhishingUrlFromLocalDataBaseJob();
void setCheckPhisingUrl(const QUrl &url);
void start();
bool canStart() const;
QString createHash();
Q_SIGNALS:
void finished();
private:
QUrl mUrl;
};
}
#endif // CHECKPHISHINGURLFROMLOCALDATABASE_H
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment