26 #include "BluetoothObject.hpp" 32 typedef struct _Object Object;
33 struct _GattDescriptor1;
34 typedef struct _GattDescriptor1 GattDescriptor1;
45 friend class tinyb::BluetoothEventManager;
46 friend class tinyb::BluetoothNotificationHandler;
49 GattDescriptor1 *object;
55 static std::unique_ptr<BluetoothGattDescriptor> make(Object *
object,
56 BluetoothType type = BluetoothType::GATT_DESCRIPTOR,
57 std::string *name =
nullptr,
58 std::string *identifier =
nullptr,
61 std::function<void(std::vector<unsigned char> &)> value_changed_callback;
65 static std::string java_class() {
66 return std::string(JAVA_PACKAGE
"/BluetoothGattDescriptor");
68 static BluetoothType class_type() {
return BluetoothType::GATT_DESCRIPTOR; }
93 const std::vector<unsigned char> &arg_value,
110 std::function<
void(
BluetoothGattDescriptor &descriptor, std::vector<unsigned char> &value,
void *userdata)> callback,
121 std::function<
void(std::vector<unsigned char> &value)> callback);
122 bool disable_value_notifications();
virtual BluetoothGattDescriptor * clone() const
Definition: BluetoothObject.hpp:63
virtual std::string get_object_path() const
std::vector< unsigned char > read_value(uint16_t offset=0)
bool write_value(const std::vector< unsigned char > &arg_value, uint16_t offset=0)
Definition: BluetoothManager.hpp:31
virtual std::string get_java_class() const
bool enable_value_notifications(std::function< void(BluetoothGattDescriptor &descriptor, std::vector< unsigned char > &value, void *userdata)> callback, void *user_data)
virtual std::string get_class_name() const
std::vector< unsigned char > get_value()
Definition: BluetoothGattCharacteristic.hpp:44
virtual BluetoothType get_bluetooth_type() const
Definition: BluetoothGattDescriptor.hpp:40
BluetoothGattCharacteristic get_characteristic()