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

Commit 2a531a74 authored by Chris Manton's avatar Chris Manton Committed by Automerger Merge Worker
Browse files

contextual_callback: Remove unused apis am: 9857069d

parents 85d1958f 9857069d
Loading
Loading
Loading
Loading
+0 −16
Original line number Diff line number Diff line
@@ -48,14 +48,6 @@ class ContextualOnceCallback<R(Args...)> {
    return context_ && callback_;
  }

  void Invoke(Args... args) {
    context_->Post(common::BindOnce(std::move(callback_), std::forward<Args>(args)...));
  }

  bool IsEmpty() {
    return context_ == nullptr;
  }

 private:
  common::OnceCallback<R(Args...)> callback_;
  IPostableContext* context_;
@@ -90,14 +82,6 @@ class ContextualCallback<R(Args...)> {
    return context_ && callback_;
  }

  void Invoke(Args... args) {
    context_->Post(common::BindOnce(callback_, std::forward<Args>(args)...));
  }

  bool IsEmpty() {
    return context_ == nullptr;
  }

 private:
  common::Callback<R(Args...)> callback_;
  IPostableContext* context_;
+1 −1
Original line number Diff line number Diff line
@@ -228,7 +228,7 @@ struct HciLayer::impl {
          CommandCompleteView::Create(EventView::Create(PacketView<kLittleEndian>(complete)));
      log::assert_that(
          command_complete_view.IsValid(), "assert failed: command_complete_view.IsValid()");
      command_queue_.front().GetCallback<CommandCompleteView>()->Invoke(command_complete_view);
      (*command_queue_.front().GetCallback<CommandCompleteView>())(command_complete_view);
    } else {
      log::assert_that(
          command_queue_.front().waiting_for_status_ == is_status,
+1 −1
Original line number Diff line number Diff line
@@ -177,7 +177,7 @@ struct RemoteNameRequestModule::impl {
  void on_remote_host_supported_features_notification(EventView view) {
    auto packet = RemoteHostSupportedFeaturesNotificationView::Create(view);
    log::assert_that(packet.IsValid(), "assert failed: packet.IsValid()");
    if (pending_ && !on_remote_host_supported_features_notification_.IsEmpty()) {
    if (pending_ && on_remote_host_supported_features_notification_) {
      log::info(
          "Received REMOTE_HOST_SUPPORTED_FEATURES_NOTIFICATION from {}",
          packet.GetBdAddr().ToRedactedStringForLogging());
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ hci::AddressWithType DynamicChannelImpl::GetDevice() const {
}

void DynamicChannelImpl::RegisterOnCloseCallback(DynamicChannel::OnCloseCallback on_close_callback) {
  log::assert_that(on_close_callback_.IsEmpty(), "OnCloseCallback can only be registered once");
  log::assert_that(!on_close_callback_, "OnCloseCallback can only be registered once");
  // If channel is already closed, call the callback immediately without saving it
  if (closed_) {
    on_close_callback(close_reason_);