Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use enum class to define protocols message type for strong typing #4593

Merged
merged 2 commits into from
Feb 2, 2021
Merged

Use enum class to define protocols message type for strong typing #4593

merged 2 commits into from
Feb 2, 2021

Conversation

yufengwangca
Copy link
Contributor

Problem

This is follow-up of #4429 which defined a set of APIs that allow us to just pass in a strongly typed (enum class) message type and derive the protocol from the type of the message type. Currently, only SecureChannel protocol has been updated to use strongly typed (enum class) message type.

Summary of Changes

update all protocol message type to use strongly typed (enum class) message type.

Fixes #4592

Copy link
Contributor

@yunhanw-google yunhanw-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Copy link
Contributor

@bzbarsky-apple bzbarsky-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

src/messaging/ExchangeMgr.h Outdated Show resolved Hide resolved
src/messaging/ExchangeMgr.cpp Outdated Show resolved Hide resolved
src/messaging/ExchangeMgr.h Outdated Show resolved Hide resolved
src/messaging/tests/TestExchangeMgr.cpp Outdated Show resolved Hide resolved
src/messaging/tests/TestExchangeMgr.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@woody-apple woody-apple left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving given @pan-apple 's approval

@woody-apple woody-apple dismissed bzbarsky-apple’s stale review February 2, 2021 18:01

Review comments addressed

@woody-apple woody-apple merged commit fda8e09 into project-chip:master Feb 2, 2021
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 3, 2021
…oject-chip#4593)

* Use enum class to define protocols message type for strong typing

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 3, 2021
…oject-chip#4593)

* Use enum class to define protocols message type for strong typing

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
austinh0 pushed a commit to austinh0/connectedhomeip that referenced this pull request Feb 4, 2021
…oject-chip#4593)

* Use enum class to define protocols message type for strong typing

* Apply suggestions from code review

Co-authored-by: Boris Zbarsky <bzbarsky@apple.com>
@yufengwangca yufengwangca deleted the pr/protocols/echo branch February 9, 2021 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use enum class to define protocols message type for type safty
7 participants