| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto2"; | 5 syntax = "proto2"; |
| 6 | 6 |
| 7 option optimize_for = LITE_RUNTIME; | 7 option optimize_for = LITE_RUNTIME; |
| 8 | 8 |
| 9 package enterprise_management; | 9 package enterprise_management; |
| 10 | 10 |
| 11 // Meta-settings that control how a user receives regular settings | 11 // Meta-settings that control how a user receives regular settings |
| 12 // (CloudPolicySettings) for Chrome. The name "Initial" indicates that | 12 // (CloudPolicySettings) for Chrome. The name "Initial" indicates that |
| 13 // these settings will be downloaded before Chrome starts requesting | 13 // these settings will be downloaded before Chrome starts requesting |
| 14 // regular settings. | 14 // regular settings. |
| 15 message ChromeInitialSettingsProto { | 15 message ChromeInitialSettingsProto { |
| 16 enum EnrollmentProvision { | 16 enum EnrollmentProvision { |
| 17 // The users's device is not automatically enrolled for policies, but the | 17 // The users's device is not automatically enrolled for policies, but the |
| 18 // user may choose to try to enroll it. | 18 // user may choose to try to enroll it. |
| 19 UNMANAGED = 0; | 19 UNMANAGED = 0; |
| 20 // The user must enroll its device for policies. | 20 // The user must enroll its device for policies. |
| 21 MANAGED = 1; | 21 MANAGED = 1; |
| 22 } | 22 } |
| 23 // Chrome will interpret this as UNMANAGED if unset. | 23 // Chrome will interpret this as UNMANAGED if unset. |
| 24 optional EnrollmentProvision enrollment_provision = 1 [default = UNMANAGED]; | 24 optional EnrollmentProvision enrollment_provision = 1 [default = UNMANAGED]; |
| 25 } | 25 } |
| 26 | 26 |
| 27 // A setting is a set of generic name value pairs. | |
| 28 // TODO(gfeher): remove this after Chrome OS TT is over. | |
| 29 message GenericSetting { | |
| 30 repeated GenericNamedValue named_value = 1; | |
| 31 } | |
| 32 | |
| 33 // Generic value container. | |
| 34 message GenericValue { | |
| 35 enum ValueType { | |
| 36 VALUE_TYPE_BOOL = 1; | |
| 37 VALUE_TYPE_INT64 = 2; | |
| 38 VALUE_TYPE_STRING = 3; | |
| 39 VALUE_TYPE_DOUBLE = 4; | |
| 40 VALUE_TYPE_BYTES = 5; | |
| 41 VALUE_TYPE_BOOL_ARRAY = 6; | |
| 42 VALUE_TYPE_INT64_ARRAY = 7; | |
| 43 VALUE_TYPE_STRING_ARRAY = 8; | |
| 44 VALUE_TYPE_DOUBLE_ARRAY = 9; | |
| 45 } | |
| 46 | |
| 47 optional ValueType value_type = 1 [default = VALUE_TYPE_STRING]; | |
| 48 | |
| 49 // basic value types | |
| 50 optional bool bool_value = 2; | |
| 51 optional int64 int64_value = 3; | |
| 52 optional string string_value = 4; | |
| 53 optional double double_value = 5; | |
| 54 optional bytes bytes_value = 6; | |
| 55 repeated bool bool_array = 7; | |
| 56 repeated int64 int64_array = 8; | |
| 57 repeated string string_array = 9; | |
| 58 repeated double double_array = 10; | |
| 59 } | |
| 60 | |
| 61 // Generic name value pair container. | |
| 62 message GenericNamedValue { | |
| 63 required string name = 1; | |
| 64 optional GenericValue value = 2; | |
| 65 } | |
| 66 | |
| 67 // Identify a single device policy setting key/value pair. | |
| 68 // TODO(gfeher): remove this after Chrome OS TT is over. | |
| 69 message DevicePolicySetting { | |
| 70 // key of the policy setting | |
| 71 required string policy_key = 1; | |
| 72 // value of the setting | |
| 73 optional GenericSetting policy_value = 2; | |
| 74 // watermark for setting value. | |
| 75 optional string watermark = 3; | |
| 76 } | |
| 77 | |
| 78 // Request from device to server to register device. | 27 // Request from device to server to register device. |
| 79 message DeviceRegisterRequest { | 28 message DeviceRegisterRequest { |
| 80 // Reregister device without erasing server state. It can be used | 29 // Reregister device without erasing server state. It can be used |
| 81 // to refresh dmtoken etc. Client MUST set this value to true if it | 30 // to refresh dmtoken etc. Client MUST set this value to true if it |
| 82 // reuses an existing device id. | 31 // reuses an existing device id. |
| 83 optional bool reregister = 1; | 32 optional bool reregister = 1; |
| 84 | 33 |
| 85 // Device register type. This field does not exist for TT release. | 34 // Device register type. This field does not exist for TT release. |
| 86 // When a client requests for policies, server should verify the | 35 // When a client requests for policies, server should verify the |
| 87 // client has been registered properly. For example, a client must | 36 // client has been registered properly. For example, a client must |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 repeated DevicePolicySettingRequest setting_request = 2; | 199 repeated DevicePolicySettingRequest setting_request = 2; |
| 251 | 200 |
| 252 // The policy fetch request. If this field exists, the request must | 201 // The policy fetch request. If this field exists, the request must |
| 253 // comes from a non-TT client. The repeated field allows client to | 202 // comes from a non-TT client. The repeated field allows client to |
| 254 // request multiple policies for better performance. | 203 // request multiple policies for better performance. |
| 255 repeated PolicyFetchRequest request = 3; | 204 repeated PolicyFetchRequest request = 3; |
| 256 } | 205 } |
| 257 | 206 |
| 258 // Response from server to device for reading policies. | 207 // Response from server to device for reading policies. |
| 259 message DevicePolicyResponse { | 208 message DevicePolicyResponse { |
| 260 // the result of the settings. | |
| 261 // TODO(gfeher): remove this after Chrome OS TT is over. | |
| 262 repeated DevicePolicySetting setting = 1; | |
| 263 | |
| 264 // The policy fetch response. | 209 // The policy fetch response. |
| 265 repeated PolicyFetchResponse response = 3; | 210 repeated PolicyFetchResponse response = 3; |
| 266 } | 211 } |
| 267 | 212 |
| 268 // Request from the DMAgent on the device to the DMServer. This is | 213 // Request from the DMAgent on the device to the DMServer. This is |
| 269 // container for all requests from device to server. The overall HTTP | 214 // container for all requests from device to server. The overall HTTP |
| 270 // request MUST be in the following format: | 215 // request MUST be in the following format: |
| 271 // | 216 // |
| 272 // * HTTP method is POST | 217 // * HTTP method is POST |
| 273 // * Data mime type is application/x-protobuffer | 218 // * Data mime type is application/x-protobuffer |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 323 | 268 |
| 324 // Register response | 269 // Register response |
| 325 optional DeviceRegisterResponse register_response = 3; | 270 optional DeviceRegisterResponse register_response = 3; |
| 326 | 271 |
| 327 // Unregister response | 272 // Unregister response |
| 328 optional DeviceUnregisterResponse unregister_response = 4; | 273 optional DeviceUnregisterResponse unregister_response = 4; |
| 329 | 274 |
| 330 // Policy response. | 275 // Policy response. |
| 331 optional DevicePolicyResponse policy_response = 5; | 276 optional DevicePolicyResponse policy_response = 5; |
| 332 } | 277 } |
| OLD | NEW |