-
Notifications
You must be signed in to change notification settings - Fork 1
/
CBlueTooth.h
45 lines (35 loc) · 972 Bytes
/
CBlueTooth.h
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
/*
* Copyright (c) 2012 Alexandros Nikolopoulos <[email protected]>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*/
#ifndef CBLUETOOTH_H_
#define CBLUETOOTH_H_
#include "fpd.h"
#include <bluetooth/bluetooth.h>
#include <bluetooth/hci.h>
#include <bluetooth/hci_lib.h>
#include <bluetooth/rfcomm.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <sys/socket.h>
class CBlueTooth {
public:
CBlueTooth(string device, string host);
virtual ~CBlueTooth();
int Connect(void);
int Disconnect(void);
int Send(uint8_t *message, int length);
int Receive(uint8_t *message, int length);
private:
string m_device;
string m_host;
bool m_IsConnected;
int m_Socket;
};
#endif /* CBLUETOOTH_H_ */