1 /*
2     SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
3     SPDX-FileCopyrightText: 2021 Harald Sitter <sitter@kde.org>
4 */
5 
6 #pragma once
7 
8 #include "DumpTruckInterface.h"
9 
10 #include <QObject>
11 
12 // Plugin for coredump helper daemon. It issues KNotifications with
13 // the option of opening konsole with gdb.
14 // This is separated as a plugin so the core always-on daemon does not
15 // need anything besides QtCore and lower level libraries, slightly
16 // reducing the footprint.
17 // It also sports no i18n because it must be opted into and is only intended
18 // for developers.
19 class NotifyTruck : public QObject, public DumpTruckInterface
20 {
21     Q_OBJECT
22     Q_PLUGIN_METADATA(IID DumpTruckInterface_IID)
23     Q_INTERFACES(DumpTruckInterface)
24 public:
25     NotifyTruck() = default;
26     ~NotifyTruck() override = default;
27 
28     bool handle(const Coredump &dump) override;
29 
30 private:
31     Q_DISABLE_COPY_MOVE(NotifyTruck)
32 };
33