You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
772 B
27 lines
772 B
/* |
|
SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com> |
|
|
|
SPDX-License-Identifier: LGPL-2.0-only |
|
*/ |
|
|
|
#include "soliddeviceservice.h" |
|
#include "soliddeviceengine.h" |
|
#include "soliddevicejob.h" |
|
|
|
SolidDeviceService::SolidDeviceService(SolidDeviceEngine *parent, const QString &source) |
|
: Plasma::Service(parent) |
|
, m_engine(parent) |
|
{ |
|
setName(QStringLiteral("soliddevice")); |
|
setDestination(source); |
|
} |
|
|
|
Plasma::ServiceJob *SolidDeviceService::createJob(const QString &operation, QMap<QString, QVariant> ¶meters) |
|
{ |
|
if (operation == QLatin1String("updateFreespace")) { |
|
m_engine->updateStorageSpace(destination()); |
|
return nullptr; |
|
} |
|
|
|
return new SolidDeviceJob(m_engine, destination(), operation, parameters); |
|
}
|
|
|