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

Incorporate use of access point factories #115

Merged
merged 20 commits into from
Jan 19, 2024
Merged

Incorporate use of access point factories #115

merged 20 commits into from
Jan 19, 2024

Conversation

abeltrano
Copy link
Contributor

@abeltrano abeltrano commented Jan 19, 2024

Type

  • Bug fix
  • Feature addition
  • Feature update
  • Documentation
  • Build Infrastructure

Side Effects

  • Breaking change
  • Non-functional change

Goals

  • Use factories to create objects to allow flexibility in how to create IAccessPoint instances.

Technical Details

  • Update AccessPointManager to use provided factory to create IAccessPoint instances instead of creating base class AccessPoint instances.
  • Change IAccessPoint::GetInterface() to GetInterfaceName.
  • Require AccessPointManager instance to create a NetRemoteService instance, thus remove parameter-less NetRemoteService constructor.
  • Require an IAccessPointFactory instance to create an AccessPointManager, thus remove parameter-less AccessPointManager::Create() static factory function.
  • Use IAccessPointControllerFactory to create IAccessPointController instances from base class AccessPoint, thus require an IAccessPointControllerFactory to create an AccessPoint.
  • Add AccessPointControllerException as intended way to signal errors from IAccessPointController operations.
  • Combine factory declaration and definitions with the objects they create (eg. IAccessPointFactory -> IAccessPoint.[h|c]xx, IAccessPointControllerFactory -> IAccessPointController.[h|c]xx.
  • Add ability to supply creation arguments (IAccessPointCreateArgs) to IAccessPointFactory when creating instances.
  • Introduce access point capabilities object AccessPointCapabilities2 (will be renamed to avoid protobuf API structure name clash).
  • Add test implementations of IAccessPoint, IAccessPointController and their respective factories.
  • Add IAccessPoint implementation AccessPointLinux and respective factory for Linux.
  • Add IAccessPointController implementation AccessPointControllerHostapd and respective factory for Linux, using WpaController to interact with access points.
  • Add associated tests.
  • Update existing tests with changes to prototypes.
      

Test Results

  • All unit tests pass.
  • Ran some manual tests with remote machines:
shadowfax@foxmulder:~/src/microsoft/netremote-cmake/out/install/dev-linux/bin$ ./netremote-cli -s 192.168.50.93 wifi enumaps
Executing command WifiEnumerateAccessPoints
3 access points discovered
 - [wlan0]
 - [wlx08beac0696fe]
 - [wls1]

Reviewer Focus

  • Consider whether the IAccessPoint* interfaces and their interactions make sense or could be improved.

Future Work

  • The AccessPointCapabilities2 structure needs to be renamed (it currently clashes with a protobuf structure of the same name.

Checklist

  • Build target all compiles cleanly.
  • clang-format and clang-tidy deltas produced no new output.
  • Newly added functions include doxygen-style comment block.

@abeltrano abeltrano changed the title Incorporate access point factories Incorporate use of access point factories Jan 19, 2024
@abeltrano abeltrano marked this pull request as ready for review January 19, 2024 19:09
@abeltrano abeltrano requested a review from a team as a code owner January 19, 2024 19:09
@abeltrano abeltrano merged commit 995d01b into develop Jan 19, 2024
5 checks passed
@abeltrano abeltrano deleted the apfactorylinux branch January 19, 2024 21:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant