File: software_feature.h

package info (click to toggle)
chromium 138.0.7204.183-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 6,071,908 kB
  • sloc: cpp: 34,937,088; ansic: 7,176,967; javascript: 4,110,704; python: 1,419,953; asm: 946,768; xml: 739,971; pascal: 187,324; sh: 89,623; perl: 88,663; objc: 79,944; sql: 50,304; cs: 41,786; fortran: 24,137; makefile: 21,806; php: 13,980; tcl: 13,166; yacc: 8,925; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (74 lines) | stat: -rw-r--r-- 2,592 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMEOS_ASH_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_
#define CHROMEOS_ASH_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_

#include <ostream>

#include "chromeos/ash/services/device_sync/proto/cryptauth_api.pb.h"

namespace ash::multidevice {

// Multi-device features. In this context, "host" refers to the device
// (typically an Android phone) which provides functionality, and "client"
// refers to the device (typically a Chromebook) which receives functionality.
//
// Note that numerical enum values must not be changed as these values are
// serialized to numbers and stored persistently.
//
// This enum should always be preferred over the cryptauth::SoftwareFeature
// proto except when communicating with the CryptAuth server.
enum class SoftwareFeature {
  // Note: Enum value 0 is intentionally skipped here for legacy reasons.

  // Support for multi-device features in general.
  kBetterTogetherHost = 1,
  kBetterTogetherClient = 2,

  // Smart Lock, which gives the user the ability to unlock and/or sign into a
  // Chromebook using an Android phone.
  kSmartLockHost = 3,
  kSmartLockClient = 4,

  // Instant Tethering, which gives the user the ability to use an Android
  // phone's Internet connection on a Chromebook.
  kInstantTetheringHost = 5,
  kInstantTetheringClient = 6,

  // Messages for Web, which gives the user the ability to sync messages (e.g.,
  // SMS) between an Android phone and a Chromebook.
  kMessagesForWebHost = 7,
  kMessagesForWebClient = 8,

  // Phone Hub, which allows users to view phone metadata and send commands to
  // their phone directly from the Chrome OS UI.
  kPhoneHubHost = 9,
  kPhoneHubClient = 10,

  // Wifi Sync with Android, which allows users to sync wifi network
  // configurations between Chrome OS devices and a connected Android phone
  kWifiSyncHost = 11,
  kWifiSyncClient = 12,

  // Eche
  kEcheHost = 13,
  kEcheClient = 14,

  // Camera Roll allows users to view and download recent photos and videos from
  // the Phone Hub tray
  kPhoneHubCameraRollHost = 15,
  kPhoneHubCameraRollClient = 16
};

SoftwareFeature FromCryptAuthFeature(
    cryptauth::SoftwareFeature cryptauth_feature);
cryptauth::SoftwareFeature ToCryptAuthFeature(
    SoftwareFeature multidevice_feature);

std::ostream& operator<<(std::ostream& stream, const SoftwareFeature& feature);

}  // namespace ash::multidevice

#endif  // CHROMEOS_ASH_COMPONENTS_MULTIDEVICE_SOFTWARE_FEATURE_H_