smartlock_state.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. #ifndef ASH_PUBLIC_CPP_SMARTLOCK_STATE_H_
  5. #define ASH_PUBLIC_CPP_SMARTLOCK_STATE_H_
  6. #include <ostream>
  7. #include "ash/public/cpp/ash_public_export.h"
  8. namespace ash {
  9. // Full set of states for the Smart Lock feature. Used to control which UI
  10. // elements are visible.
  11. enum class SmartLockState {
  12. // Smart Lock Feature is disabled.
  13. kDisabled,
  14. // Screen is not locked.
  15. kInactive,
  16. // Smart Lock unavailable because Bluetooth is disabled.
  17. kBluetoothDisabled,
  18. // A phone eligible to unlock the local device is found, but it does not have
  19. // a lock screen enabled and therefore cannot unlock the local device.
  20. kPhoneNotLockable,
  21. // No phones eligible to unlock the local device can be found.
  22. kPhoneNotFound,
  23. // Currently establishing a connection to phone.
  24. kConnectingToPhone,
  25. // A phone eligible to unlock the local device is found, but it cannot be
  26. // authenticated.
  27. kPhoneNotAuthenticated,
  28. // An eligible phone is found, but is both locked and too distant (signal
  29. // strength is too low, indicating that the phone is ~30+ feet away and is
  30. // therefore not allowed to unlock the device).
  31. kPhoneFoundLockedAndDistant,
  32. // An eligible phone is found and is close enough, but is locked and cannot
  33. // unlock the local device.
  34. kPhoneFoundLockedAndProximate,
  35. // An eligible phone is found and is unlocked, but is too distant to unlock
  36. // the local device.
  37. kPhoneFoundUnlockedAndDistant,
  38. // Phone is authenticated, and the local device can be unlocked.
  39. kPhoneAuthenticated,
  40. // The user must reauthenticate using their password because a sufficient time
  41. // has elapsed since their last password entry.
  42. kPasswordReentryRequired,
  43. // The primary user profile is either in the background or this user is a
  44. // secondary user profile.
  45. kPrimaryUserAbsent
  46. };
  47. ASH_PUBLIC_EXPORT std::ostream& operator<<(std::ostream& stream,
  48. const SmartLockState& state);
  49. } // namespace ash
  50. #endif // ASH_PUBLIC_CPP_SMARTLOCK_STATE_H_