#include "services/device/geolocation/wifi_data_provider_linux.h"
#include <stddef.h>
#include <stdint.h>
#include <memory>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
#include "base/logging.h"
#include "base/memory/raw_ptr.h"
#include "base/strings/string_number_conversions.h"
#include "dbus/bus.h"
#include "dbus/message.h"
#include "dbus/object_path.h"
#include "dbus/object_proxy.h"
#include "services/device/geolocation/wifi_data_provider_handle.h"
#include "services/device/public/mojom/geolocation_internals.mojom.h"
namespace device {
namespace {
const int kDefaultPollingIntervalMilliseconds = …;
const int kNoChangePollingIntervalMilliseconds = …;
const int kTwoNoChangePollingIntervalMilliseconds = …;
const int kNoWifiPollingIntervalMilliseconds = …;
const char kNetworkManagerServiceName[] = …;
const char kNetworkManagerPath[] = …;
const char kNetworkManagerInterface[] = …;
enum { … };
class NetworkManagerWlanApi : public WifiDataProviderCommon::WlanApiInterface { … };
int frquency_in_khz_to_channel(int frequency_khz) { … }
NetworkManagerWlanApi::NetworkManagerWlanApi() { … }
NetworkManagerWlanApi::~NetworkManagerWlanApi() { … }
bool NetworkManagerWlanApi::Init() { … }
bool NetworkManagerWlanApi::InitWithBus(scoped_refptr<dbus::Bus> bus) { … }
bool NetworkManagerWlanApi::GetAccessPointData(
WifiData::AccessPointDataSet* data) { … }
bool NetworkManagerWlanApi::GetAdapterDeviceList(
std::vector<dbus::ObjectPath>* device_paths) { … }
bool NetworkManagerWlanApi::GetAccessPointsForAdapter(
const dbus::ObjectPath& adapter_path,
WifiData::AccessPointDataSet* data) { … }
std::unique_ptr<dbus::Response> NetworkManagerWlanApi::GetAccessPointProperty(
dbus::ObjectProxy* access_point_proxy,
const std::string& property_name) { … }
}
WifiDataProvider* WifiDataProviderHandle::DefaultFactoryFunction() { … }
WifiDataProviderLinux::WifiDataProviderLinux() { … }
WifiDataProviderLinux::~WifiDataProviderLinux() { … }
std::unique_ptr<WifiDataProviderCommon::WlanApiInterface>
WifiDataProviderLinux::CreateWlanApi() { … }
std::unique_ptr<WifiPollingPolicy>
WifiDataProviderLinux::CreatePollingPolicy() { … }
std::unique_ptr<WifiDataProviderCommon::WlanApiInterface>
WifiDataProviderLinux::CreateWlanApiForTesting(scoped_refptr<dbus::Bus> bus) { … }
}