software_feature.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // Copyright 2018 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_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_
  5. #define ASH_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_
  6. #include <ostream>
  7. #include "ash/services/device_sync/proto/cryptauth_api.pb.h"
  8. namespace ash::multidevice {
  9. // Multi-device features. In this context, "host" refers to the device
  10. // (typically an Android phone) which provides functionality, and "client"
  11. // refers to the device (typically a Chromebook) which receives functionality.
  12. //
  13. // Note that numerical enum values must not be changed as these values are
  14. // serialized to numbers and stored persistently.
  15. //
  16. // This enum should always be preferred over the cryptauth::SoftwareFeature
  17. // proto except when communicating with the CryptAuth server.
  18. enum class SoftwareFeature {
  19. // Note: Enum value 0 is intentionally skipped here for legacy reasons.
  20. // Support for multi-device features in general.
  21. kBetterTogetherHost = 1,
  22. kBetterTogetherClient = 2,
  23. // Smart Lock, which gives the user the ability to unlock and/or sign into a
  24. // Chromebook using an Android phone.
  25. kSmartLockHost = 3,
  26. kSmartLockClient = 4,
  27. // Instant Tethering, which gives the user the ability to use an Android
  28. // phone's Internet connection on a Chromebook.
  29. kInstantTetheringHost = 5,
  30. kInstantTetheringClient = 6,
  31. // Messages for Web, which gives the user the ability to sync messages (e.g.,
  32. // SMS) between an Android phone and a Chromebook.
  33. kMessagesForWebHost = 7,
  34. kMessagesForWebClient = 8,
  35. // Phone Hub, which allows users to view phone metadata and send commands to
  36. // their phone directly from the Chrome OS UI.
  37. kPhoneHubHost = 9,
  38. kPhoneHubClient = 10,
  39. // Wifi Sync with Android, which allows users to sync wifi network
  40. // configurations between Chrome OS devices and a connected Android phone
  41. kWifiSyncHost = 11,
  42. kWifiSyncClient = 12,
  43. // Eche
  44. kEcheHost = 13,
  45. kEcheClient = 14,
  46. // Camera Roll allows users to view and download recent photos and videos from
  47. // the Phone Hub tray
  48. kPhoneHubCameraRollHost = 15,
  49. kPhoneHubCameraRollClient = 16
  50. };
  51. SoftwareFeature FromCryptAuthFeature(
  52. cryptauth::SoftwareFeature cryptauth_feature);
  53. cryptauth::SoftwareFeature ToCryptAuthFeature(
  54. SoftwareFeature multidevice_feature);
  55. std::ostream& operator<<(std::ostream& stream, const SoftwareFeature& feature);
  56. } // namespace ash::multidevice
  57. #endif // ASH_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_