bluetooth_discovery_session_outcome.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright 2015 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. #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_OUTCOME_H_
  5. #define DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_OUTCOME_H_
  6. namespace device {
  7. // This enum is returned by various internal discovery session methods in
  8. // BluetoothAdapter in order to histogram the causes of discovery failures.
  9. enum class UMABluetoothDiscoverySessionOutcome {
  10. SUCCESS = 0,
  11. UNKNOWN = 1, // Used when the platform has more information that isn't
  12. // reflected in any of these enum values or hasn't been wired
  13. // through.
  14. NOT_IMPLEMENTED = 2,
  15. ADAPTER_NOT_PRESENT = 3,
  16. ADAPTER_REMOVED = 4, // Returned if the adapter disappeared during a callback
  17. // chain.
  18. NOT_ACTIVE = 5,
  19. REMOVE_WITH_PENDING_REQUEST = 6,
  20. ACTIVE_SESSION_NOT_IN_ADAPTER = 7,
  21. FAILED = 8,
  22. // BlueZ-specific failures:
  23. BLUEZ_DBUS_UNKNOWN_ADAPTER = 9,
  24. BLUEZ_DBUS_NO_RESPONSE = 10,
  25. BLUEZ_DBUS_IN_PROGRESS = 11,
  26. BLUEZ_DBUS_NOT_READY = 12,
  27. BLUEZ_DBUS_FAILED_MAYBE_UNSUPPORTED_TRANSPORT = 13,
  28. BLUEZ_DBUS_UNSUPPORTED_DEVICE = 14,
  29. STOP_IN_PROGRESS = 15,
  30. // NOTE: Add new outcomes immediately above this line. Make sure to update the
  31. // enum list in tools/metrics/histograms/histograms.xml accordingly.
  32. COUNT
  33. };
  34. } // namespace device
  35. #endif // DEVICE_BLUETOOTH_BLUETOOTH_DISCOVERY_SESSION_OUTCOME_H_