1/*
2 SPDX-FileCopyrightText: 2014 Aleix Pol Gonzalez <aleixpol@blue-systems.com>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#ifndef PURPOSE_PLUGINBASE_H
8#define PURPOSE_PLUGINBASE_H
9
10#include "job.h"
11#include <kcoreaddons_export.h>
12
13#include <QObject>
14
15namespace Purpose
16{
17/**
18 * @brief Base class to implement by plugins
19 *
20 * Class for Qt native plugins to extend. Plugins will just be issuing jobs
21 * that will be configured then started.
22 *
23 * See README.md on how to create plugins on technologies different
24 * to Qt.
25 *
26 * @note This file shouldn't be included by any application.
27 */
28class PURPOSE_EXPORT PluginBase : public QObject
29{
30 Q_OBJECT
31public:
32 explicit PluginBase(QObject *parent = nullptr);
33 ~PluginBase() override;
34
35 /** @returns the job that will perform the plugin's action. */
36 virtual Job *createJob() const = 0;
37};
38
39}
40
41Q_DECLARE_INTERFACE(Purpose::PluginBase, "org.kde.purpose")
42
43#endif
44

source code of purpose/src/pluginbase.h