summaryrefslogtreecommitdiffstats
path: root/k9devices/k9haldevice.h
blob: e77adefd4e1a47b57edc4b6793763d87da05daec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
//
// C++ Interface: k9haldevice
//
// Description: 
//
//
// Author: Jean-Michel PETIT <[email protected]>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//

#ifndef K9HALDEVICE_H
#define K9HALDEVICE_H
#include "k9common.h"

#ifdef Q_MOC_RUN
#define HAVE_HAL
#endif // Q_MOC_RUN

#ifdef HAVE_HAL

#include <tqobject.h>
/**
	@author Jean-Michel PETIT <[email protected]>
*/
class k9HalConnection;
class k9HalDevice : public TQObject
{
Q_OBJECT
  TQ_OBJECT
public:   
    
    k9HalDevice(TQObject *parent = 0, const char *name = 0);

    ~k9HalDevice();

	bool getCanReadCd() const {
	    return m_canReadCd;
	}

	bool getCanReadDvd() const {
	    return m_canReadDvd;
	}

	bool getCanBurnCd() const {
	    return m_canBurnCd;
	}

	bool getCanBurnDvd() const {
	    return m_canBurnDvd;
	}

	TQString getModel() const {
	    return m_model;
	}

	int getMaxWriteSpeed() const {
	    return m_maxWriteSpeed;
	}

	TQString getDeviceName() const {
	    return m_deviceName;
	}
	void updateVolumeName();

	TQString getVolumeUdi() const {
	    return m_volumeUdi;
	}

	TQString getVolumeName() const {
	    return m_volumeName;
	}
	
	TQString mountPoint();
signals:
   void volumeChanged(const TQString &device,const TQString &volumeName);	
	
private:
    TQString m_volumeName;
    TQString m_volumeUdi;
    k9HalConnection *m_connection;
    bool m_canReadCd,m_canReadDvd,m_canBurnCd,m_canBurnDvd;
    TQString m_model;
    TQString m_deviceName;
    int m_maxWriteSpeed;
    void getDriveProperties();
    TQString volumeName();
};

#endif
#endif