feature_status.cc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. // Copyright 2020 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. #include "ash/components/phonehub/feature_status.h"
  5. namespace ash {
  6. namespace phonehub {
  7. std::ostream& operator<<(std::ostream& stream, FeatureStatus status) {
  8. switch (status) {
  9. case FeatureStatus::kNotEligibleForFeature:
  10. stream << "[Not eligible for feature]";
  11. break;
  12. case FeatureStatus::kEligiblePhoneButNotSetUp:
  13. stream << "[Eligible phone but not set up]";
  14. break;
  15. case FeatureStatus::kPhoneSelectedAndPendingSetup:
  16. stream << "[Phone selected and pending setup]";
  17. break;
  18. case FeatureStatus::kDisabled:
  19. stream << "[Disabled]";
  20. break;
  21. case FeatureStatus::kUnavailableBluetoothOff:
  22. stream << "[Unavailable; Bluetooth off]";
  23. break;
  24. case FeatureStatus::kEnabledButDisconnected:
  25. stream << "[Enabled; disconnected]";
  26. break;
  27. case FeatureStatus::kEnabledAndConnecting:
  28. stream << "[Enabled; connecting]";
  29. break;
  30. case FeatureStatus::kEnabledAndConnected:
  31. stream << "[Enabled; connected]";
  32. break;
  33. case FeatureStatus::kLockOrSuspended:
  34. stream << "[Unavailable; lock or suspended]";
  35. break;
  36. }
  37. return stream;
  38. }
  39. } // namespace phonehub
  40. } // namespace ash