Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / netwerk / wifi / dbus / DbusWifiScanner.h
blob70fccb0106d541838003d0bf9bf81f0381d0b108
1 /* This Source Code Form is subject to the terms of the Mozilla Public
2 * License, v. 2.0. If a copy of the MPL was not distributed with this
3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5 #ifndef NSWIFIAPSCANNERDBUS_H_
6 #define NSWIFIAPSCANNERDBUS_H_
8 #include "WifiScanner.h"
10 class nsIWifiAccessPoint;
11 class nsWifiAccessPoint;
13 namespace mozilla {
15 using AccessPointArray = nsTArray<RefPtr<nsIWifiAccessPoint>>;
17 class WifiScannerImpl final : public WifiScanner {
18 public:
19 explicit WifiScannerImpl();
20 ~WifiScannerImpl();
22 /**
23 * GetAccessPointsFromWLAN
25 * Scans the available wireless interfaces for nearby access points and
26 * populates the supplied collection with them
28 * @param accessPoints The collection to populate with available APs
29 * @return NS_OK on success, failure codes on failure
31 nsresult GetAccessPointsFromWLAN(AccessPointArray& accessPoints);
33 private:
34 bool AddDevice(const char* aDevicePath, AccessPointArray& aAccessPoints);
35 bool AddAPProperties(const char* aApPath, AccessPointArray& aAccessPoints);
36 bool SetMac(char* aHwAddress, nsWifiAccessPoint* aAp);
39 } // namespace mozilla
41 #endif // NSWIFIAPSCANNERDBUS_H_