Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
nivi-apple and bzbarsky-apple authored Aug 22, 2024
1 parent bfba54f commit a070655
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion src/protocols/bdx/AsyncTransferFacilitator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ void AsyncTransferFacilitator::Reset()

CHIP_ERROR AsyncTransferFacilitator::SendMessage(TransferSession::OutputEvent & event)
{

VerifyOrReturnError(mExchange, CHIP_ERROR_INCORRECT_STATE);

Messaging::SendFlags sendFlags;
Expand Down
14 changes: 5 additions & 9 deletions src/protocols/bdx/AsyncTransferFacilitator.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,9 @@ class AsyncTransferFacilitator : public Messaging::ExchangeDelegate
virtual void HandleTransferSessionOutput(TransferSession::OutputEvent & event) = 0;

/**
* This method should be implemented to clean up and destroy the instance of the sub class
* implemeting it and the base class.
*
* Note: After this method has been called, we can't use the instance of the subclass that
* implements this.
* This method should be implemented to destroy the object subclassing AsyncTransferFacilitator.
*/
virtual void CleanUp() = 0;
virtual void DestroySelf() = 0;

protected:
CHIP_ERROR OnMessageReceived(Messaging::ExchangeContext * ec, const PayloadHeader & payloadHeader,
Expand All @@ -67,7 +63,7 @@ class AsyncTransferFacilitator : public Messaging::ExchangeDelegate

CHIP_ERROR SendMessage(TransferSession::OutputEvent & event);

// The transfer session coresponding to this AsynTransferFacilitator object.
// The transfer session coresponding to this AsyncTransferFacilitator object.
TransferSession mTransfer;

// The Exchange holder that holds the exchange context used for BDX messages.
Expand All @@ -84,10 +80,10 @@ class AsyncTransferFacilitator : public Messaging::ExchangeDelegate
/**
* An AsyncTransferFacilitator that is initialized to respond to an incoming BDX transfer request.
*
* Provides a method for initializing the TransferSession member but still needs to be extended to implement
* Provides a method for initializing the TransferSession members but still needs to be extended to implement
* HandleTransferSessionOutput.
*
* This class, or a subclass of it, should be used as the exchange delegate for a BDX transfer.
* An instance of some subclass of this class, should be used as the exchange delegate for a BDX transfer.
*/
class AsyncResponder : public AsyncTransferFacilitator
{
Expand Down

0 comments on commit a070655

Please sign in to comment.