File indexing completed on 2024-05-12 04:51:06
0001 /* 0002 SPDX-FileCopyrightText: 1998-2009 Sebastian Trueg <trueg@k3b.org> 0003 SPDX-License-Identifier: GPL-2.0-or-later 0004 */ 0005 #ifndef K3B_MSINFO_FETCHER_H 0006 #define K3B_MSINFO_FETCHER_H 0007 0008 #include "k3bjob.h" 0009 0010 namespace K3b { 0011 0012 class Process; 0013 namespace Device { 0014 class Device; 0015 class DeviceHandler; 0016 } 0017 0018 class MsInfoFetcher : public Job 0019 { 0020 Q_OBJECT 0021 0022 public: 0023 explicit MsInfoFetcher( JobHandler*, QObject* parent = 0 ); 0024 ~MsInfoFetcher() override; 0025 0026 QString msInfo() const { return m_msInfo; } 0027 int lastSessionStart() const { return m_lastSessionStart; } 0028 int nextSessionStart() const { return m_nextSessionStart; } 0029 0030 public Q_SLOTS: 0031 void start() override; 0032 void cancel() override; 0033 0034 void setDevice( K3b::Device::Device* dev ) { m_device = dev; } 0035 0036 private Q_SLOTS: 0037 void slotProcessExited(); 0038 void slotMediaDetectionFinished( K3b::Device::DeviceHandler* ); 0039 void getMsInfo(); 0040 0041 private: 0042 QString m_msInfo; 0043 int m_lastSessionStart; 0044 int m_nextSessionStart; 0045 QString m_collectedOutput; 0046 0047 Process* m_process; 0048 Device::Device* m_device; 0049 0050 bool m_canceled; 0051 bool m_dvd; 0052 }; 0053 } 0054 0055 #endif