File indexing completed on 2024-04-28 05:45:54
0001 /* 0002 SPDX-FileCopyrightText: 2020 Gaël PORTAY <gael.portay@collabora.com> 0003 0004 SPDX-License-Identifier: GPL-3.0-or-later 0005 */ 0006 0007 #ifndef KPMCORE_SETPARTITIONATTRIBUTESJOB_H 0008 #define KPMCORE_SETPARTITIONATTRIBUTESJOB_H 0009 0010 #include "jobs/job.h" 0011 0012 class Partition; 0013 class Device; 0014 class Report; 0015 0016 /** Set a Partition attributes (GPT only). 0017 @author Gaël PORTAY <gael.portay@collabora.com> 0018 */ 0019 class SetPartitionAttributesJob : public Job 0020 { 0021 public: 0022 SetPartitionAttributesJob(Device& d, Partition& p, quint64 newAttrs); 0023 0024 public: 0025 bool run(Report& parent) override; 0026 QString description() const override; 0027 0028 protected: 0029 Partition& partition() { 0030 return m_Partition; 0031 } 0032 const Partition& partition() const { 0033 return m_Partition; 0034 } 0035 0036 Device& device() { 0037 return m_Device; 0038 } 0039 const Device& device() const { 0040 return m_Device; 0041 } 0042 0043 quint64 attributes() const { 0044 return m_Attributes; 0045 } 0046 void setAttributes(quint64 f) { 0047 m_Attributes = f; 0048 } 0049 0050 private: 0051 Device& m_Device; 0052 Partition& m_Partition; 0053 quint64 m_Attributes; 0054 }; 0055 0056 #endif