Warning, file /system/kup/dataengine/kupservice.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // SPDX-FileCopyrightText: 2020 Simon Persson <simon.persson@mykolab.com>
0002 //
0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
0004 
0005 #ifndef KUPSERVICE_H
0006 #define KUPSERVICE_H
0007 
0008 #include <QtGlobal>
0009 
0010 #if QT_VERSION_MAJOR == 5
0011 #include <Plasma/Service>
0012 #include <Plasma/ServiceJob>
0013 #else
0014 #include <Plasma5Support/Service>
0015 #include <Plasma5Support/ServiceJob>
0016 namespace Plasma = Plasma5Support;
0017 #endif
0018 
0019 class QLocalSocket;
0020 
0021 class KupService : public Plasma::Service
0022 {
0023     Q_OBJECT
0024 
0025 public:
0026      KupService(int pPlanNumber, QLocalSocket *pSocket, QObject *pParent = nullptr);
0027      Plasma::ServiceJob *createJob(const QString &pOperation, QMap<QString, QVariant> &pParameters) override;
0028 
0029 protected:
0030      QLocalSocket *mSocket;
0031      int mPlanNumber;
0032 };
0033 
0034 class KupDaemonService : public Plasma::Service
0035 {
0036     Q_OBJECT
0037 
0038 public:
0039      explicit KupDaemonService(QLocalSocket *pSocket, QObject *pParent = nullptr);
0040      Plasma::ServiceJob *createJob(const QString &pOperation, QMap<QString, QVariant> &pParameters) override;
0041 
0042 protected:
0043      QLocalSocket *mSocket;
0044 };
0045 
0046 #endif // KUPSERVICE_H