26 #include "BluetoothObject.hpp" 27 #include "BluetoothManager.hpp" 28 #include "BluetoothUUID.hpp" 33 typedef struct _Object Object;
35 typedef struct _Adapter1 Adapter1;
45 friend class tinyb::BluetoothEventManager;
47 friend class tinyb::BluetoothNotificationHandler;
55 static std::unique_ptr<BluetoothAdapter> make(Object *
object,
56 BluetoothType type = BluetoothType::ADAPTER,
57 std::string *name =
nullptr,
58 std::string *identifier =
nullptr,
61 std::function<void(bool)> powered_callback;
62 std::function<void(bool)> discoverable_callback;
63 std::function<void(bool)> pairable_callback;
64 std::function<void(bool)> discovering_callback;
68 static std::string java_class() {
69 return std::string(JAVA_PACKAGE
"/BluetoothAdapter");
71 static BluetoothType class_type() {
return BluetoothType::ADAPTER; }
82 std::unique_ptr<BluetoothDevice> find(std::string *name,
83 std::string *identifier,
84 std::chrono::milliseconds timeout = std::chrono::milliseconds::zero())
98 const std::string &arg_device
121 int16_t rssi, uint16_t pathloss,
const TransportType &transport);
127 std::vector<std::unique_ptr<BluetoothDevice>>
get_devices (
148 void set_alias (
const std::string &value);
175 std::function<
void(
BluetoothAdapter &adapter,
bool powered,
void *userdata)> callback,
211 std::function<
void(
BluetoothAdapter &adapter,
bool discoverable,
void *userdata)> callback,
257 std::function<
void(
BluetoothAdapter &adapter,
bool pairable,
void *userdata)> callback,
299 std::function<
void(
BluetoothAdapter &adapter,
bool discovering,
void *userdata)> callback,
Definition: BluetoothObject.hpp:63
void set_pairable(bool value)
virtual BluetoothAdapter * clone() const
void enable_discoverable_notifications(std::function< void(BluetoothAdapter &adapter, bool discoverable, void *userdata)> callback, void *userdata)
virtual std::string get_object_path() const
void disable_pairable_notifications()
void disable_discoverable_notifications()
Definition: BluetoothAdapter.hpp:41
unsigned int get_discoverable_timeout()
unsigned int get_pairable_timeout()
static BluetoothManager * get_bluetooth_manager()
std::unique_ptr< T > find(std::string *name, std::string *identifier, BluetoothObject *parent, std::chrono::milliseconds timeout=std::chrono::milliseconds::zero())
Definition: BluetoothManager.hpp:113
void set_discoverable(bool value)
void set_powered(bool value)
bool set_discovery_filter(std::vector< BluetoothUUID > uuids, int16_t rssi, uint16_t pathloss, const TransportType &transport)
void disable_discovering_notifications()
Definition: BluetoothManager.hpp:31
std::unique_ptr< std::string > get_modalias()
virtual std::string get_java_class() const
std::string get_address()
virtual std::string get_class_name() const
virtual BluetoothType get_bluetooth_type() const
bool remove_device(const std::string &arg_device)
void enable_pairable_notifications(std::function< void(BluetoothAdapter &adapter, bool pairable, void *userdata)> callback, void *userdata)
std::vector< std::unique_ptr< BluetoothDevice > > get_devices()
void enable_discovering_notifications(std::function< void(BluetoothAdapter &adapter, bool discovering, void *userdata)> callback, void *userdata)
void disable_powered_notifications()
Definition: BluetoothDevice.hpp:45
void enable_powered_notifications(std::function< void(BluetoothAdapter &adapter, bool powered, void *userdata)> callback, void *userdata)
void set_discoverable_timeout(unsigned int value)
void set_pairable_timeout(unsigned int value)
std::vector< std::string > get_uuids()
void set_alias(const std::string &value)