#ifndef K9CDDRIVES_H
#define K9CDDRIVES_H

#include "k9common.h"
#include "halobject.h"

#include <QObject>

class k9CdDrives;

class k9CdDrive : public QObject
{
    Q_OBJECT
public:
    k9CdDrive();
    ~k9CdDrive();
    int num;
    QString name;
    QString device;
    bool canWriteCDR;
    bool canReadDVD;
    bool canWriteDVD;
    void setWriteSpeeds(const QStringList & _value);
    QList< int > getWriteSpeeds() const;
private:
   QList <int> writeSpeeds;
private slots:
   void _volumeChanged (const QString &device,const QString &volumName);
signals:
   void volumeChanged(const QString &device, const QString &volumeName);
};


class k9CdDrives : public QObject
{
    Q_OBJECT
public:
    k9CdDrives();
    k9CdDrives(QObject *parent);
    ~k9CdDrives();
    /** No descriptions */
    int count();
    /** No descriptions */
    k9CdDrive * getDrive(int num);
    static void eject(const QString & device);
    void scanDrives();
    void clearDrives();
public slots:
   void	_deviceAdded (const QString &device,const QString &label,bool burnDevice,const QStringList &writeSpeeds);
   void _deviceRemoved (const QString &device,const QString &label,bool burnDevice){}
signals:
    void deviceAdded(k9CdDrive *drive);
    void deviceRemoved(k9CdDrive *drive);
private: // Private methods
    void readConfig();
    halObject *m_halObject;
    QList <k9CdDrive*> drives;
};

#endif // K9CDDRIVES_H
