Plasma5Support

soliddeviceservice.cpp
1/*
2 SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com>
3
4 SPDX-License-Identifier: LGPL-2.0-only
5*/
6
7#include "soliddeviceservice.h"
8#include "soliddeviceengine.h"
9#include "soliddevicejob.h"
10
11SolidDeviceService::SolidDeviceService(SolidDeviceEngine *parent, const QString &source)
12 : Plasma5Support::Service(parent)
13 , m_engine(parent)
14{
15 setName(QStringLiteral("soliddevice"));
16 setDestination(source);
17}
18
19Plasma5Support::ServiceJob *SolidDeviceService::createJob(const QString &operation, QMap<QString, QVariant> &parameters)
20{
21 if (operation == QLatin1String("updateFreespace")) {
22 m_engine->updateStorageSpace(destination());
23 return nullptr;
24 }
25
26 return new SolidDeviceJob(m_engine, destination(), operation, parameters);
27}
This class provides jobs for use with Plasma5Support::Service.
Definition servicejob.h:39
This class evaluates the basic expressions given in the interface.
Namespace for everything in libplasma.
Definition datamodel.cpp:15
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.