File: constants.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 (155 lines) | stat: -rw-r--r-- 6,640 bytes parent folder | download | duplicates (6)
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
// Copyright 2024 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_BOCA_SESSION_API_CONSTANTS_H_
#define CHROMEOS_ASH_COMPONENTS_BOCA_SESSION_API_CONSTANTS_H_

#include "google_apis/gaia/gaia_auth_fetcher.h"

namespace ash::boca {

inline constexpr char kCreateSessionUrlTemplate[] = "v1/teachers/$1/sessions";

inline constexpr char kContentTypeApplicationJson[] = "application/json";

inline constexpr char kMainStudentGroupName[] = "main";
inline constexpr char kAccessCodeGroupName[] = "accessCode";

inline constexpr char kSchoolToolsAuthScope[] =
    "https://www.googleapis.com/auth/chromeosschooltools";

inline constexpr char kGetSessionUrlTemplate[] =
    "v1/users/$1/sessions:getActive?device.device_id=$2";

inline constexpr char kUploadFCMTokenTemplate[] = "v1/users/$1";

inline constexpr char kUpdateSessionUrlTemplate[] =
    "v1/teachers/$1/sessions/$2?updateMask=$3";

inline constexpr char kUpdateSessionConfigUrlTemplate[] =
    "v1/teachers/$1/sessions/$2:updateConfig";

inline constexpr char kUpdateSessionConfigUrlTemplateWithUpdateMask[] =
    "v1/teachers/$1/sessions/$2:updateConfig?updateMask=$3";

inline constexpr char kInsertStudentActivity[] =
    "v1/sessions/$1/students/$2/devices/$3/activities:insert";

inline constexpr char kRemoveStudentUrlTemplate[] =
    "v1/teachers/$1/sessions/$2/students:remove";

inline constexpr char kAddStudentsUrlTemplate[] =
    "v1/teachers/$1/sessions/$2/students:add";

inline constexpr char kJoinTachyonGroupUrlTemplate[] =
    "/v1/students/$1/sessions/$2/tachyon:join";

inline constexpr char kJoinSessionUrlTemplate[] = "v1/students/$1/session:join";

inline constexpr char kViewScreenUrlTemplate[] =
    "v1/sessions/$1/viewScreen:initiate";

inline constexpr char kRegisterScreenUrlTemplate[] =
    "v1/sessions/$1/viewScreen:register";

inline constexpr char kUpdateViewScreenStateUrlTemplate[] =
    "v1/sessions/$1/viewScreen:updateState";

inline constexpr char kStudentHeartbeatUrlTemplate[] =
    "v1/sessions/$1/students/$2/devices/$3:heartbeat?studentGroupId=$4";

inline constexpr char kNotifyGetActiveSession[] =
    "v1/teachers/$1/sessions/$2/students:notifyGetActiveSession";

inline constexpr char kSessionId[] = "sessionId";
inline constexpr char kTeacher[] = "teacher";
inline constexpr char kRoster[] = "roster";
inline constexpr char kRosterTitle[] = "title";
inline constexpr char kStudentGroupTitle[] = "title";
inline constexpr char kStudentGroups[] = "studentGroups";
inline constexpr char kStudentGroupIds[] = "studentGroupIds";
inline constexpr char kStudents[] = "students";
inline constexpr char kGaiaId[] = "gaiaId";
inline constexpr char kEmail[] = "email";
inline constexpr char kFullName[] = "fullName";
inline constexpr char kPhotoUrl[] = "photoUrl";
inline constexpr char kStudentGroupsConfig[] = "studentGroupConfigs";
inline constexpr char kStartTime[] = "startTime";
inline constexpr char kDuration[] = "duration";
inline constexpr char kSessionState[] = "sessionState";
inline constexpr char kOnTaskConfig[] = "onTaskConfig";
inline constexpr char kSessionConfig[] = "sessionConfig";
inline constexpr char kCaptionsConfig[] = "captionsConfig";
inline constexpr char kCaptionsEnabled[] = "captionsEnabled";
inline constexpr char kTranslationsEnabled[] = "translationsEnabled";
inline constexpr char kStudentStatus[] = "studentStatuses";
inline constexpr char kStudentStatusState[] = "state";
inline constexpr char kDeviceStatusState[] = "state";
inline constexpr char kUrl[] = "url";
inline constexpr char kTitle[] = "title";
inline constexpr char kFavIcon[] = "faviconUrl";
inline constexpr char kContentConfigs[] = "contentConfigs";
inline constexpr char kActiveBundle[] = "activeBundle";
inline constexpr char kLocked[] = "locked";
inline constexpr char kLockToAppHome[] = "lockToAppHome";
inline constexpr char kLockedNavigationOptions[] = "lockedNavigationOptions";
inline constexpr char kNavigationType[] = "navigationType";
inline constexpr char kSeconds[] = "seconds";
inline constexpr char kNanos[] = "nanos";
inline constexpr char kRequestTime[] = "requestTime";
inline constexpr char kActivities[] = "activities";
inline constexpr char kActiveTab[] = "activeTab";
inline constexpr char kDevices[] = "devices";
inline constexpr char kDeviceId[] = "deviceId";
inline constexpr char kActivity[] = "activity";
inline constexpr char kUsers[] = "users";
inline constexpr char kUser[] = "user";
inline constexpr char kTachyonGroupId[] = "tachyonGroupId";
inline constexpr char kJoinCode[] = "joinCode";
inline constexpr char kJoinCodeEnabled[] = "enabled";
inline constexpr char kCode[] = "code";
inline constexpr char kSessionJoinCode[] = "sessionJoinCode";
inline constexpr char kDeviceInfo[] = "deviceInfo";
inline constexpr char kStudent[] = "student";
inline constexpr char kGroupSource[] = "groupSource";
inline constexpr char kTeacherClientDevice[] = "teacherClientDevice";
inline constexpr char kHostDevice[] = "hostDevice";
inline constexpr char kSpotlightConnectionCode[] = "connectionCode";
inline constexpr char kSpotlightConnectionParam[] = "connectionParam";
inline constexpr char kViewScreenRequester[] = "viewScreenRequester";
inline constexpr char kServiceAccount[] = "serviceAccount";
inline constexpr char kStudentGroupId[] = "studentGroupId";
inline constexpr char kViewScreenConfig[] = "viewScreenConfig";
inline constexpr char kViewScreenState[] = "viewScreenState";

inline constexpr net::NetworkTrafficAnnotationTag kTrafficAnnotation =
    net::DefineNetworkTrafficAnnotation("boca_server_integration", R"(
          semantics: {
            sender: "Boca"
            description: "Provide ChromeOS access to school tools server"
            internal {
              contacts {
                  email: "cros-edu-eng@google.com"
              }
            }
            user_data {
              type: ACCESS_TOKEN
              type: EMAIL
              type: NAME
            }
            trigger: "User opens Boca app and goes through session start flow."
            data: "The request is authenticated with an OAuth2 access token "
                  "identifying the Google account.
            destination: GOOGLE_OWNED_SERVICE
            last_reviewed: "2024-06-26"
          }
          policy: {
            cookies_allowed: NO
            setting: "This feature cannot be disabled by settings yet."
            policy_exception_justification: "Not implemented yet."
          })");

}  // namespace ash::boca

#endif  // CHROMEOS_ASH_COMPONENTS_BOCA_SESSION_API_CONSTANTS_H_