-
Notifications
You must be signed in to change notification settings - Fork 158
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
[Feature] Linux wifi-lan medium implementation #2983
Open
kidfromjupiter
wants to merge
148
commits into
google:main
Choose a base branch
from
kidfromjupiter:feature-wifilan-medium-linux
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
[Feature] Linux wifi-lan medium implementation #2983
kidfromjupiter
wants to merge
148
commits into
google:main
from
kidfromjupiter:feature-wifilan-medium-linux
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The build directories should not be commited and definitly not pushed to remote. This will prevent that from accidentally happening, and will declutter `git status`
This is the start of the implementing for the Linux platform. I aim to make this as similar to the Windows platform as possible, although due to the fundamental difference in the two OS's, there will be things that need to be different. As such, I will be using the Windows platform files as a base, and reimplementing the functions with Linux equivalents. I am sure this will have bugs, which by my best attempt will be fixed when found.
There was no free after we were finished with the interface pointer
There are a couple of places where apps can store data in Linux, one is in the HOME directory, which is being phased out, the second, is in HOME/.config, and the other is HOME/.local/share. This uses HOME/.local/share, and since there isn't a common appdata path on Linux that function will just return the local appdata path.
This adds a Linux equivalent to file path operations done in the Windows headers and source files. Some differences that will occur are the invalid path names and contents, as there are no invalid path names, and only one invalid path content (excluding non-printable characters) on Linux.
The `http_loader` class takes a `WebRequest` with information to send a web request, and sends it. This uses `libcurl`, which is present from installation on most major Linux distrobutions (e.g. Fedora, Ubuntu, PopOS...). If libcurl is not present on the target system, it will need to be installed.
A file was named wrong. It was changed.
The Windows implementation of the Timer class (in timer.h) used Timer Queues. This brings in implementation for a mostly Windows complient TimerQueue class to work with the Timer class.
This are unimplemented currently, but will be in the future.
I missed some implementation when I was looking over them. These are them.
Amazing work. I am happy to see that this project is still being worked on in the Linux/UNIX space. I'm excited to test out the progress that has been achieved. |
kidfromjupiter
changed the title
Feature wifilan medium linux
[Feature] Linux wifi-lan medium implementation
Oct 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds desktop linux implementations for the
wifi_lan
medium usingavahi
. The real heroes behind this PR are @vibhavp and @proatgram who have already submitted a PR before. I do not claim credit for most of this code, but I will do my best to fix any bugs and maintain the linux implementation. I decided to make a seperate PR withwifi-lan
medium only due to their PR being inactive for the past year. Another reason was that their initial PR was very large with a lot of components added, which might have made it hard to review. All I did was removewifi_hotspot, wifi_direct, bluetooth_classic and ble
. My plan is to create seperate PRs with all those mediums included.As far as I can tell, all utility classes were referenced directly from the
windows
implementation. Some files were directly copied and some altered to fit the linux environment. So the bulk of this PR is either the same code in the windows implementation, or slightly altered versions of itThe following is extracted from the original PR
How did you test this change?
Wifi lan medium was tested using the walkietalkie example app that was in @vibhavp's walkietalkie branch. This app broke when the repo was updated to match upstream. It was already broken due to the original creator's own
ble
updates. I have since cherry picked working versions and it is available on my own walkietalkie branchSidenote
I'm learning cpp and bazel as I go so forgive me if I seem a little dense at times