mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-02-06 12:22:00 -05:00
Added button on AllDevices window, and handling for it. Added needed messages for communication with service bluetooth. Feature is now complete on application settings side. Further integration in service bluetooth is needed.
34 lines
897 B
C++
34 lines
897 B
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#pragma once
|
|
|
|
#include "Application.hpp"
|
|
|
|
extern "C"
|
|
{
|
|
#include <module-bluetooth/lib/btstack/src/btstack_util.h>
|
|
}
|
|
|
|
class BluetoothSettingsModel
|
|
{
|
|
public:
|
|
explicit BluetoothSettingsModel(app::Application *application);
|
|
|
|
void requestStatus();
|
|
void setStatus(bool desiredBluetoothState, bool desiredVisibility);
|
|
void requestDeviceName();
|
|
void setDeviceName(const UTF8 &deviceName);
|
|
void requestBondedDevices();
|
|
void requestScan();
|
|
void stopScan();
|
|
void requestDevicePair(std::string addr);
|
|
void requestDeviceUnpair(std::string addr);
|
|
void responsePasskey(std::string passkey);
|
|
void requestConnection(std::string addr);
|
|
void requestDisconnection();
|
|
|
|
private:
|
|
app::Application *application = nullptr;
|
|
};
|