Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 28220bde authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "L2CAP DynamicChannel API: Expose AddressWithType"

parents 8150918d a3998cad
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -154,7 +154,7 @@ class L2capClassicModuleFacadeService : public L2capClassicModuleFacade::Service
    // invoked from Facade Handler
    void on_connection_open(std::unique_ptr<DynamicChannel> channel) {
      ConnectionCompleteEvent event;
      event.mutable_remote()->set_address(channel->GetDevice().ToString());
      event.mutable_remote()->set_address(channel->GetDevice().GetAddress().ToString());
      facade_service_->pending_connection_complete_.OnIncomingEvent(event);
      {
        std::unique_lock<std::mutex> lock(channel_open_cv_mutex_);
@@ -175,7 +175,7 @@ class L2capClassicModuleFacadeService : public L2capClassicModuleFacade::Service
        channel_->GetQueueUpEnd()->UnregisterDequeue();
      }
      classic::ConnectionCloseEvent event;
      event.mutable_remote()->set_address(channel_->GetDevice().ToString());
      event.mutable_remote()->set_address(channel_->GetDevice().GetAddress().ToString());
      event.set_reason(static_cast<uint32_t>(error_code));
      facade_service_->pending_connection_close_.OnIncomingEvent(event);
      channel_ = nullptr;
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@
namespace bluetooth {
namespace l2cap {

hci::Address DynamicChannel::GetDevice() const {
hci::AddressWithType DynamicChannel::GetDevice() const {
  return impl_->GetDevice();
}

+1 −1
Original line number Diff line number Diff line
@@ -42,7 +42,7 @@ class DynamicChannel {
    ASSERT(l2cap_handler_ != nullptr);
  }

  hci::Address GetDevice() const;
  hci::AddressWithType GetDevice() const;

  /**
   * Register close callback. If close callback is registered, when a channel is closed, the channel's resource will
+2 −2
Original line number Diff line number Diff line
@@ -40,8 +40,8 @@ DynamicChannelImpl::DynamicChannelImpl(Psm psm, Cid cid, Cid remote_cid, l2cap::
  ASSERT(l2cap_handler_ != nullptr);
}

hci::Address DynamicChannelImpl::GetDevice() const {
  return device_.GetAddress();
hci::AddressWithType DynamicChannelImpl::GetDevice() const {
  return device_;
}

void DynamicChannelImpl::RegisterOnCloseCallback(os::Handler* user_handler,
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ class DynamicChannelImpl : public l2cap::internal::ChannelImpl {

  virtual ~DynamicChannelImpl() = default;

  hci::Address GetDevice() const;
  hci::AddressWithType GetDevice() const;

  virtual void RegisterOnCloseCallback(os::Handler* user_handler, DynamicChannel::OnCloseCallback on_close_callback);

Loading