summaryrefslogtreecommitdiff
path: root/gatocentralmanager_p.h
blob: 62ef9545c970c3e434949e602ebb2cfef9e9346c (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
#ifndef GATOCENTRALMANAGER_P_H
#define GATOCENTRALMANAGER_P_H

#include <QtCore/QSocketNotifier>

#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>

#include "gatocentralmanager.h"
#include "gatoaddress.h"

class GatoCentralManagerPrivate
{
	Q_DECLARE_PUBLIC(GatoCentralManager)

	GatoCentralManager *q_ptr;
	int dev_id;
	int timeout;
	int hci;
	QSocketNotifier *notifier;
	QList<GatoUUID> filter_uuids;
	hci_filter hci_nf, hci_of;
	QHash<GatoAddress, GatoPeripheral*> peripherals;

	bool scanning();
	bool openDevice();
	void closeDevice();

	void handleAdvertising(le_advertising_info *info, int rssi);
};

#endif // GATOCENTRALMANAGER_P_H