blob: ac44db4259a3b249d6e73b970afbb34a41f38c16 (
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
|
//
// C++ Interface: k9halconnection
//
// Description:
//
//
// Author: Jean-Michel PETIT <k9copy@free.fr>, (C) 2007
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "k9common.h"
#ifdef Q_MOC_RUN
#define HAVE_HAL
#endif // Q_MOC_RUN
#ifdef HAVE_HAL
#ifndef K9HALCONNECTION_H
#define K9HALCONNECTION_H
#include <tqobject.h>
#include <tqptrlist.h>
#include "k9dbusdispatch.h"
/**
@author Jean-Michel PETIT <k9copy@free.fr>
*/
class k9HalDevice;
class DBusConnection;
#ifdef DBUS_QT3
class TQDBusConnection;
#else
namespace DBusTQt {
class Connection;
};
#endif
class k9HalConnection : public TQObject
{
Q_OBJECT
TQ_OBJECT
friend class k9HalDevice;
public:
static k9HalConnection* getInstance();
static void end();
TQPtrList< k9HalDevice > getDevices() const { return m_devices;}
void addDevice( const char* udi );
void removeDevice( const char* udi );
void testVolumeChanged( const char * udi);
k9HalDevice *findDevice (const char* udi);
k9HalDevice *findDeviceByVolume (const char* udi);
signals:
void deviceAdded(k9HalDevice *);
void deviceRemoved(k9HalDevice*);
private:
TQPtrList <k9HalDevice> m_devices;
void *m_context;
DBusConnection * m_dbusConnect;
K9DBusDispatch *m_dbusDispatch;
private:
k9HalConnection(TQObject *tqparent = 0, const char *name = 0);
~k9HalConnection();
};
#endif
#endif
|