deviceEventRx method

Stream<DeviceEvent>? deviceEventRx()

Return the event handler that new device was found or existing device was changed

Implementation

Stream<DeviceEvent>? deviceEventRx() {
  var tmp0 = 0;
  tmp0 = _box.borrow();
  final tmp1 = _api._clientDeviceEventRx(
    tmp0,
  );
  final tmp3 = tmp1.arg0;
  final tmp4 = tmp1.arg1;
  if (tmp3 == 0) {
    return null;
  }
  final ffi.Pointer<ffi.Void> tmp4_0 = ffi.Pointer.fromAddress(tmp4);
  final tmp4_1 = _Box(_api, tmp4_0, "__Client_device_event_rx_stream_drop");
  tmp4_1._finalizer = _api._registerFinalizer(tmp4_1);
  final tmp2 = _nativeStream(tmp4_1, _api.__clientDeviceEventRxStreamPoll);
  return tmp2;
}