2
* Copyright 2014 Canonical Ltd.
4
* This file is part of webbrowser-app.
6
* webbrowser-app is free software; you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation; version 3.
10
* webbrowser-app is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program. If not, see <http://www.gnu.org/licenses/>.
19
#include <QCoreApplication>
23
#include <QStandardPaths>
26
#include "hook-utils.h"
29
int main(int argc, char ** argv)
31
QCoreApplication app(argc, argv);
33
if (app.arguments().count() != 1)
35
qWarning() << "Invalid hook argument count";
39
HookUtils::WebappClickHookInstallDescription alreadyProcessedClickHooks =
40
HookUtils::listWebappClickHookFilesIn(
41
HookUtils::getProcessedClickHooksFolder());
43
HookUtils::WebappClickHookInstallDescription installedClickHooks =
44
HookUtils::listWebappClickHookFilesIn(
45
HookUtils::getClickHooksInstallFolder());
47
HookUtils::handleInstalls(
48
alreadyProcessedClickHooks,
51
HookUtils::handleUpdates(
52
alreadyProcessedClickHooks,
55
HookUtils::handleUninstall(
56
alreadyProcessedClickHooks,