blob: dcae02b3b9ef40a436d3f733c76447f532895cd1 (
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
|
#ifndef OpieToothManager_H
#define OpieToothManager_H
#include <qobject.h>
#include <qstring.h>
#include <qvaluelist.h>
namespace OpieTooth {
class Device;
class Manager : public QObject {
Q_OBJECT
public:
// Manage MAC device or by name (hci0)
Manager( const QString &device );
// Manage a with Device attached device
Manager( Device* dev );
// manage nothing ;)
Manager();
~Manager();
// setDevice either MAC or hci0
// ups it
void setDevice( const QString& device );
void setDevice( Device *dev );
// asynchron connect to signal
void isConnected(const QString& device );
void isConnected(Device *dev );
// if c'tor with device or setDevice everythning is ok
void searchDevices();
// use an alternate device
void searchDevices(const QString& device);
void searchDevices(Device *d );
void addService(const QString &name );
void addServices( const QStringList& names );
void removeService(const QString &name );
void removeServices(const QStringList& );
void searchServices( const QString& remDevice );
/*static*/ QString toDevice( const QString& mac );
/*static*/ QString toMac( const QString &device );
signals:
// device either mac or dev name
// the first device is the device which you access
void connected( const QString& device, bool connected );
void addedService( const QString& device, const QString& service, bool added );
void removedService( const QString& device, const QString& service, bool removed );
void foundServices( const QString& device, Services::ValueList );
void foundDevices( const QString& device, RemoteDevices::ValueList );
};
};
#endif
|