Skip to content

Commit

Permalink
Remove duplicated way to set flag kFlagResponseExpected (#6245)
Browse files Browse the repository at this point in the history
* Remove duplicated way to set flag kFlagResponseExpected

* Add documentation for the APIs moved to private

* Update src/messaging/ExchangeContext.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/messaging/ExchangeContext.h

Co-authored-by: Boris Zbarsky <[email protected]>

* Update src/messaging/ExchangeContext.h

Co-authored-by: Boris Zbarsky <[email protected]>

Co-authored-by: Boris Zbarsky <[email protected]>
  • Loading branch information
2 people authored and pull[bot] committed Sep 1, 2021
1 parent 79c7fb0 commit 7004108
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions src/messaging/ExchangeContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,23 +71,6 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext,
*/
bool IsInitiator() const;

/**
* Determine whether a response is expected for messages sent over
* this exchange.
*
* @return Returns 'true' if response expected, else 'false'.
*/
bool IsResponseExpected() const;

/**
* Set whether a response is expected on this exchange.
*
* @param[in] inResponseExpected A Boolean indicating whether (true) or not
* (false) a response is expected on this
* exchange.
*/
void SetResponseExpected(bool inResponseExpected);

/**
* Send a CHIP message on this exchange.
*
Expand Down Expand Up @@ -199,6 +182,25 @@ class DLL_EXPORT ExchangeContext : public ReliableMessageContext,
void Free();
void Reset();

/**
* Determine whether a response is currently expected for a message that was sent over
* this exchange. While this is true, attempts to send other messages that expect a response
* will fail.
*
* @return Returns 'true' if response expected, else 'false'.
*/
bool IsResponseExpected() const;

/**
* Track whether we are now expecting a response to a message sent via this exchange (because that
* message had the kExpectResponse flag set in its sendFlags).
*
* @param[in] inResponseExpected A Boolean indicating whether (true) or not
* (false) a response is currently expected on this
* exchange.
*/
void SetResponseExpected(bool inResponseExpected);

/**
* Search for an existing exchange that the message applies to.
*
Expand Down

0 comments on commit 7004108

Please sign in to comment.