File indexing completed on 2025-02-02 05:25:16
0001 /* 0002 SPDX-FileCopyrightText: 2011 Viranch Mehta <viranch.mehta@gmail.com> 0003 0004 SPDX-License-Identifier: LGPL-2.0-only 0005 */ 0006 0007 #include "soliddeviceservice.h" 0008 #include "soliddeviceengine.h" 0009 #include "soliddevicejob.h" 0010 0011 SolidDeviceService::SolidDeviceService(SolidDeviceEngine *parent, const QString &source) 0012 : Plasma5Support::Service(parent) 0013 , m_engine(parent) 0014 { 0015 setName(QStringLiteral("soliddevice")); 0016 setDestination(source); 0017 } 0018 0019 Plasma5Support::ServiceJob *SolidDeviceService::createJob(const QString &operation, QMap<QString, QVariant> ¶meters) 0020 { 0021 if (operation == QLatin1String("updateFreespace")) { 0022 m_engine->updateStorageSpace(destination()); 0023 return nullptr; 0024 } 0025 0026 return new SolidDeviceJob(m_engine, destination(), operation, parameters); 0027 }