Loading system/gd/l2cap/classic/internal/dynamic_channel_impl.cc +2 −2 Original line number Diff line number Diff line Loading @@ -105,11 +105,11 @@ void DynamicChannelImpl::SetIncomingMtu(Mtu mtu) { incoming_mtu_ = mtu; } RetransmissionAndFlowControlModeOption DynamicChannelImpl::GetMode() const { RetransmissionAndFlowControlModeOption DynamicChannelImpl::GetChannelMode() const { return mode_; } void DynamicChannelImpl::SetMode(RetransmissionAndFlowControlModeOption mode) { void DynamicChannelImpl::SetChannelMode(RetransmissionAndFlowControlModeOption mode) { mode_ = mode; } Loading system/gd/l2cap/classic/internal/dynamic_channel_impl.h +4 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "hci/address.h" #include "l2cap/cid.h" #include "l2cap/classic/dynamic_channel.h" #include "l2cap/internal/channel_impl.h" #include "l2cap/l2cap_packets.h" #include "l2cap/mtu.h" #include "l2cap/psm.h" Loading @@ -33,7 +34,7 @@ namespace internal { class Link; class DynamicChannelImpl { class DynamicChannelImpl : public l2cap::internal::ChannelImpl { public: DynamicChannelImpl(Psm psm, Cid cid, Cid remote_cid, Link* link, os::Handler* l2cap_handler); Loading Loading @@ -78,8 +79,8 @@ class DynamicChannelImpl { virtual Mtu GetIncomingMtu() const; virtual void SetIncomingMtu(Mtu mtu); virtual RetransmissionAndFlowControlModeOption GetMode() const; virtual void SetMode(RetransmissionAndFlowControlModeOption mode); virtual RetransmissionAndFlowControlModeOption GetChannelMode() const; virtual void SetChannelMode(RetransmissionAndFlowControlModeOption mode); virtual FcsType GetFcsType() const; virtual void SetFcsType(FcsType fcs_type); Loading system/gd/l2cap/classic/internal/fixed_channel_impl.h +19 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include "common/bidi_queue.h" #include "l2cap/cid.h" #include "l2cap/classic/fixed_channel.h" #include "l2cap/internal/channel_impl.h" #include "l2cap/l2cap_packets.h" #include "os/handler.h" #include "os/log.h" Loading @@ -29,7 +31,7 @@ namespace internal { class Link; class FixedChannelImpl { class FixedChannelImpl : public l2cap::internal::ChannelImpl { public: FixedChannelImpl(Cid cid, Link* link, os::Handler* l2cap_handler); Loading Loading @@ -65,6 +67,22 @@ class FixedChannelImpl { return channel_queue_.GetDownEnd(); } Cid GetCid() const { return cid_; } Cid GetRemoteCid() const { return cid_; } RetransmissionAndFlowControlModeOption GetChannelMode() const { return RetransmissionAndFlowControlModeOption::L2CAP_BASIC; } void SetChannelMode(RetransmissionAndFlowControlModeOption) { LOG_ERROR("Setting channel mode on a fixed channel cid 0x%02hx", cid_); } private: // Constructor states // For logging purpose only Loading system/gd/l2cap/classic/internal/link.cc +6 −6 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ void Link::Disconnect() { std::shared_ptr<FixedChannelImpl> Link::AllocateFixedChannel(Cid cid, SecurityPolicy security_policy) { auto channel = fixed_channel_allocator_.AllocateChannel(cid, security_policy); scheduler_->AttachChannel(cid, channel->GetQueueDownEnd(), cid); reassembler_.AttachChannel(cid, channel->GetQueueDownEnd(), nullptr); scheduler_->AttachChannel(cid, channel); reassembler_.AttachChannel(cid, channel); return channel; } Loading Loading @@ -95,8 +95,8 @@ std::shared_ptr<DynamicChannelImpl> Link::AllocateDynamicChannel(Psm psm, Cid re SecurityPolicy security_policy) { auto channel = dynamic_channel_allocator_.AllocateChannel(psm, remote_cid, security_policy); if (channel != nullptr) { scheduler_->AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel->GetRemoteCid()); reassembler_.AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel); scheduler_->AttachChannel(channel->GetCid(), channel); reassembler_.AttachChannel(channel->GetCid(), channel); } channel->local_initiated_ = false; return channel; Loading @@ -106,8 +106,8 @@ std::shared_ptr<DynamicChannelImpl> Link::AllocateReservedDynamicChannel(Cid res SecurityPolicy security_policy) { auto channel = dynamic_channel_allocator_.AllocateReservedChannel(reserved_cid, psm, remote_cid, security_policy); if (channel != nullptr) { scheduler_->AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel->GetRemoteCid()); reassembler_.AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel); scheduler_->AttachChannel(channel->GetCid(), channel); reassembler_.AttachChannel(channel->GetCid(), channel); } channel->local_initiated_ = true; return channel; Loading system/gd/l2cap/classic/internal/link.h +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class Link { // FixedChannel methods virtual std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); virtual bool IsFixedChannelAllocated(Cid cid); Loading Loading
system/gd/l2cap/classic/internal/dynamic_channel_impl.cc +2 −2 Original line number Diff line number Diff line Loading @@ -105,11 +105,11 @@ void DynamicChannelImpl::SetIncomingMtu(Mtu mtu) { incoming_mtu_ = mtu; } RetransmissionAndFlowControlModeOption DynamicChannelImpl::GetMode() const { RetransmissionAndFlowControlModeOption DynamicChannelImpl::GetChannelMode() const { return mode_; } void DynamicChannelImpl::SetMode(RetransmissionAndFlowControlModeOption mode) { void DynamicChannelImpl::SetChannelMode(RetransmissionAndFlowControlModeOption mode) { mode_ = mode; } Loading
system/gd/l2cap/classic/internal/dynamic_channel_impl.h +4 −3 Original line number Diff line number Diff line Loading @@ -20,6 +20,7 @@ #include "hci/address.h" #include "l2cap/cid.h" #include "l2cap/classic/dynamic_channel.h" #include "l2cap/internal/channel_impl.h" #include "l2cap/l2cap_packets.h" #include "l2cap/mtu.h" #include "l2cap/psm.h" Loading @@ -33,7 +34,7 @@ namespace internal { class Link; class DynamicChannelImpl { class DynamicChannelImpl : public l2cap::internal::ChannelImpl { public: DynamicChannelImpl(Psm psm, Cid cid, Cid remote_cid, Link* link, os::Handler* l2cap_handler); Loading Loading @@ -78,8 +79,8 @@ class DynamicChannelImpl { virtual Mtu GetIncomingMtu() const; virtual void SetIncomingMtu(Mtu mtu); virtual RetransmissionAndFlowControlModeOption GetMode() const; virtual void SetMode(RetransmissionAndFlowControlModeOption mode); virtual RetransmissionAndFlowControlModeOption GetChannelMode() const; virtual void SetChannelMode(RetransmissionAndFlowControlModeOption mode); virtual FcsType GetFcsType() const; virtual void SetFcsType(FcsType fcs_type); Loading
system/gd/l2cap/classic/internal/fixed_channel_impl.h +19 −1 Original line number Diff line number Diff line Loading @@ -19,6 +19,8 @@ #include "common/bidi_queue.h" #include "l2cap/cid.h" #include "l2cap/classic/fixed_channel.h" #include "l2cap/internal/channel_impl.h" #include "l2cap/l2cap_packets.h" #include "os/handler.h" #include "os/log.h" Loading @@ -29,7 +31,7 @@ namespace internal { class Link; class FixedChannelImpl { class FixedChannelImpl : public l2cap::internal::ChannelImpl { public: FixedChannelImpl(Cid cid, Link* link, os::Handler* l2cap_handler); Loading Loading @@ -65,6 +67,22 @@ class FixedChannelImpl { return channel_queue_.GetDownEnd(); } Cid GetCid() const { return cid_; } Cid GetRemoteCid() const { return cid_; } RetransmissionAndFlowControlModeOption GetChannelMode() const { return RetransmissionAndFlowControlModeOption::L2CAP_BASIC; } void SetChannelMode(RetransmissionAndFlowControlModeOption) { LOG_ERROR("Setting channel mode on a fixed channel cid 0x%02hx", cid_); } private: // Constructor states // For logging purpose only Loading
system/gd/l2cap/classic/internal/link.cc +6 −6 Original line number Diff line number Diff line Loading @@ -60,8 +60,8 @@ void Link::Disconnect() { std::shared_ptr<FixedChannelImpl> Link::AllocateFixedChannel(Cid cid, SecurityPolicy security_policy) { auto channel = fixed_channel_allocator_.AllocateChannel(cid, security_policy); scheduler_->AttachChannel(cid, channel->GetQueueDownEnd(), cid); reassembler_.AttachChannel(cid, channel->GetQueueDownEnd(), nullptr); scheduler_->AttachChannel(cid, channel); reassembler_.AttachChannel(cid, channel); return channel; } Loading Loading @@ -95,8 +95,8 @@ std::shared_ptr<DynamicChannelImpl> Link::AllocateDynamicChannel(Psm psm, Cid re SecurityPolicy security_policy) { auto channel = dynamic_channel_allocator_.AllocateChannel(psm, remote_cid, security_policy); if (channel != nullptr) { scheduler_->AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel->GetRemoteCid()); reassembler_.AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel); scheduler_->AttachChannel(channel->GetCid(), channel); reassembler_.AttachChannel(channel->GetCid(), channel); } channel->local_initiated_ = false; return channel; Loading @@ -106,8 +106,8 @@ std::shared_ptr<DynamicChannelImpl> Link::AllocateReservedDynamicChannel(Cid res SecurityPolicy security_policy) { auto channel = dynamic_channel_allocator_.AllocateReservedChannel(reserved_cid, psm, remote_cid, security_policy); if (channel != nullptr) { scheduler_->AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel->GetRemoteCid()); reassembler_.AttachChannel(channel->GetCid(), channel->GetQueueDownEnd(), channel); scheduler_->AttachChannel(channel->GetCid(), channel); reassembler_.AttachChannel(channel->GetCid(), channel); } channel->local_initiated_ = true; return channel; Loading
system/gd/l2cap/classic/internal/link.h +1 −1 Original line number Diff line number Diff line Loading @@ -65,7 +65,7 @@ class Link { // FixedChannel methods virtual std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); std::shared_ptr<FixedChannelImpl> AllocateFixedChannel(Cid cid, SecurityPolicy security_policy); virtual bool IsFixedChannelAllocated(Cid cid); Loading