geolocation.mojom 1.0 KB

123456789101112131415161718192021222324252627282930
  1. // Copyright 2021 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. module crosapi.mojom;
  5. import "mojo/public/mojom/base/string16.mojom";
  6. import "mojo/public/mojom/base/time.mojom";
  7. // Wifi data relating to a single access point.
  8. [Stable]
  9. struct AccessPointData {
  10. // MAC address, formatted as per MacAddressAsString16.
  11. mojo_base.mojom.String16 mac_address;
  12. int64 radio_signal_strength; // Measured in dBm
  13. int64 channel;
  14. int64 signal_to_noise; // Ratio in dB
  15. mojo_base.mojom.String16 ssid; // Network identifier
  16. };
  17. // Interface to enable communication with ash-chrome's GeolocationHandler.
  18. [Stable, Uuid="369e690a-a366-41d9-a359-334ec8532746"]
  19. interface GeolocationService {
  20. // Gets the wifi access point data from the GeolocationHandler.
  21. GetWifiAccessPoints@0() => (
  22. bool service_initialized,
  23. bool data_available,
  24. mojo_base.mojom.TimeDelta time_since_last_updated,
  25. array<AccessPointData> ap_data);
  26. };