openauto/include/btservice/btservice.hpp
Cole Brinsfield 94ee66acd7
try connect to last bluetooth device (#20)
* Working on cleaning wifi

* Reworked bluetooth handshake based around @presslab-us's work

* Forgot to remove a line

* QOL: try to reconnect to last phone BT on openauto start

* bt autoconnect raspberry pi workaround

* Try to connect to last successful bluetooth device

* Bad merge fix

* pointers

* typo

* Update SocketInfoResponse.proto

* Added a config option to autoconnect to last bt device (defaults off)
2021-02-01 21:10:38 -06:00

30 lines
708 B
C++

#pragma once
#include <QProcess>
#include <QBluetoothAddress>
#include "OpenautoLog.hpp"
#include "btservice/AndroidBluetoothService.hpp"
#include "btservice/AndroidBluetoothServer.hpp"
#include "openauto/Configuration/Configuration.hpp"
namespace openauto
{
namespace btservice
{
class btservice
{
public:
btservice(openauto::configuration::IConfiguration::Pointer config);
private:
const uint16_t cServicePortNumber = 22;
void connectToBluetooth(QBluetoothAddress addr, QBluetoothAddress controller);
openauto::btservice::AndroidBluetoothService androidBluetoothService_;
openauto::btservice::AndroidBluetoothServer androidBluetoothServer_;
QProcess *btConnectProcess;
};
}
}