// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef PLATFORM_IMPL_WINDOWS_WIFI_H_ #define PLATFORM_IMPL_WINDOWS_WIFI_H_ #include "internal/platform/implementation/wifi.h" namespace nearby::windows { // Container of operations that can be performed over the WiFi medium. class WifiMedium : public api::WifiMedium { public: WifiMedium(); ~WifiMedium() override = default; bool IsInterfaceValid() const override; api::WifiCapability& GetCapability() override { return wifi_capability_; } api::WifiInformation& GetInformation() override { return wifi_information_; } private: // Since the WiFi interface capability won't change in the connection session, // we only need to query it once at the beginning void InitCapability(); api::WifiInformation wifi_information_ { .is_connected = false, .ap_frequency = -1, }; api::WifiCapability wifi_capability_; bool wifi_interface_valid_ = false; }; } // namespace nearby::windows #endif // PLATFORM_IMPL_WINDOWS_WIFI_H_