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 * \class Purpose::PluginBase
19 * \inheaderfile Purpose/PluginBase
20 * \inmodule Purpose
21 *
22 * \brief Base class to implement by plugins.
23 *
24 * Class for Qt native plugins to extend. Plugins will just be issuing jobs
25 * that will be configured then started.
26 *
27 * See README.md on how to create plugins on technologies different
28 * to Qt.
29 *
30 * \note This file shouldn't be included by any application.
31 */
32class PURPOSE_EXPORT PluginBase : public QObject
33{
34 Q_OBJECT
35public:
36 explicit PluginBase(QObject *parent = nullptr);
37 ~PluginBase() override;
38
39 /*! Returns the job that will perform the plugin's action. */
40 virtual Job *createJob() const = 0;
41};
42
43}
44
45Q_DECLARE_INTERFACE(Purpose::PluginBase, "org.kde.purpose")
46
47#endif
48

source code of purpose/src/pluginbase.h