#ifndef PROCESSLSOF_H
#define PROCESSLSOF_H

#include <QObject>
class DataCDROM;

class ProcessLsof : public QObject
{
    Q_OBJECT
public:
    ProcessLsof(QObject *parent=nullptr);
    ~ProcessLsof();

    bool checkDevice(DataCDROM *cdrom);

    struct Process {
        QString name;
        int pid;
    };
    const QList<Process>& usingApplications() const;
    QString joinProcessNames( const QList<ProcessLsof::Process>& );

private:
    bool findLsofExecutable();

    class Private;
    Private* d;
};

#endif // PROCESSLSOF_H
