| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 |
| (...skipping 1003 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1014 // Response from the server to update device attributes (asset id and location). | 1014 // Response from the server to update device attributes (asset id and location). |
| 1015 message DeviceAttributeUpdateResponse { | 1015 message DeviceAttributeUpdateResponse { |
| 1016 enum ResultType { | 1016 enum ResultType { |
| 1017 ATTRIBUTE_UPDATE_ERROR = 0; | 1017 ATTRIBUTE_UPDATE_ERROR = 0; |
| 1018 ATTRIBUTE_UPDATE_SUCCESS = 1; | 1018 ATTRIBUTE_UPDATE_SUCCESS = 1; |
| 1019 } | 1019 } |
| 1020 | 1020 |
| 1021 optional ResultType result = 1; | 1021 optional ResultType result = 1; |
| 1022 } | 1022 } |
| 1023 | 1023 |
| 1024 // Sent by the client to server to update the mapping from GCM id to device_id | |
| 1025 // on the server side. | |
| 1026 message GcmIdUpdateRequest { | |
| 1027 optional string gcm_id = 1; | |
| 1028 } | |
| 1029 | |
| 1030 // Response for GcmIdUpdateRequest, an empty message for now. | |
| 1031 message GcmIdUpdateResponse {} | |
| 1032 | |
| 1033 // Request from the DMAgent on the device to the DMServer. This is | 1024 // Request from the DMAgent on the device to the DMServer. This is |
| 1034 // container for all requests from device to server. The overall HTTP | 1025 // container for all requests from device to server. The overall HTTP |
| 1035 // request MUST be in the following format: | 1026 // request MUST be in the following format: |
| 1036 // | 1027 // |
| 1037 // * HTTP method is POST | 1028 // * HTTP method is POST |
| 1038 // * Data mime type is application/x-protobuffer | 1029 // * Data mime type is application/x-protobuffer |
| 1039 // * HTTP parameters are (all required, all case sensitive): | 1030 // * HTTP parameters are (all required, all case sensitive): |
| 1040 // * request: MUST BE one of | 1031 // * request: MUST BE one of |
| 1041 // * api_authorization | 1032 // * api_authorization |
| 1042 // * cert_upload | 1033 // * cert_upload |
| 1043 // * check_device_pairing | 1034 // * check_device_pairing |
| 1044 // * device_pairing | 1035 // * device_pairing |
| 1045 // * device_state_retrieval | 1036 // * device_state_retrieval |
| 1046 // * enterprise_check | 1037 // * enterprise_check |
| 1047 // * ping | 1038 // * ping |
| 1048 // * policy | 1039 // * policy |
| 1049 // * register | 1040 // * register |
| 1050 // * status | 1041 // * status |
| 1051 // * unregister | 1042 // * unregister |
| 1052 // * remote_commands | 1043 // * remote_commands |
| 1053 // * attribute_update_permission | 1044 // * attribute_update_permission |
| 1054 // * attribute_update | 1045 // * attribute_update |
| 1055 // * gcm_id_update | |
| 1056 // | 1046 // |
| 1057 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 1047 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
| 1058 // * apptype: MUST BE Android or Chrome. | 1048 // * apptype: MUST BE Android or Chrome. |
| 1059 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 1049 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
| 1060 // * agent: MUST BE a string of characters. | 1050 // * agent: MUST BE a string of characters. |
| 1061 // * HTTP Authorization header MUST be in the following formats: | 1051 // * HTTP Authorization header MUST be in the following formats: |
| 1062 // * For register and ping requests | 1052 // * For register and ping requests |
| 1063 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 1053 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
| 1064 // | 1054 // |
| 1065 // * For unregister, policy, status, cert_upload, remote commands requests, | 1055 // * For unregister, policy, status, cert_upload and remote commands requests |
| 1066 // and gcm id update requests | |
| 1067 // Authorization: GoogleDMToken token=<dm token from register> | 1056 // Authorization: GoogleDMToken token=<dm token from register> |
| 1068 // | 1057 // |
| 1069 // * The Authorization header isn't used for enterprise_check | 1058 // * The Authorization header isn't used for enterprise_check |
| 1070 // request, nor for register requests using OAuth. In the latter case, | 1059 // request, nor for register requests using OAuth. In the latter case, |
| 1071 // the OAuth token is passed in the "oauth" parameter. | 1060 // the OAuth token is passed in the "oauth" parameter. |
| 1072 // | 1061 // |
| 1073 // DeviceManagementRequest should only contain one request which matches the | 1062 // DeviceManagementRequest should only contain one request which matches the |
| 1074 // HTTP query parameter - request, as listed below. Other requests within the | 1063 // HTTP query parameter - request, as listed below. Other requests within the |
| 1075 // container will be ignored. | 1064 // container will be ignored. |
| 1076 // cert_upload: cert_upload_request | 1065 // cert_upload: cert_upload_request |
| 1077 // check_device_pairing: check_device_pairing_request | 1066 // check_device_pairing: check_device_pairing_request |
| 1078 // device_pairing: device_pairing_request | 1067 // device_pairing: device_pairing_request |
| 1079 // device_state_retrieval: device_state_retrieval_request | 1068 // device_state_retrieval: device_state_retrieval_request |
| 1080 // enterprise_check: auto_enrollment_request | 1069 // enterprise_check: auto_enrollment_request |
| 1081 // ping: policy_request | 1070 // ping: policy_request |
| 1082 // policy: policy_request | 1071 // policy: policy_request |
| 1083 // register: register_request | 1072 // register: register_request |
| 1084 // status: device_status_report_request or session_status_report_request | 1073 // status: device_status_report_request or session_status_report_request |
| 1085 // unregister: unregister_request | 1074 // unregister: unregister_request |
| 1086 // remote_commands: remote_command_request | 1075 // remote_commands: remote_command_request |
| 1087 // attribute_update_permission: device_attribute_update_permission_request | 1076 // attribute_update_permission: device_attribute_update_permission_request |
| 1088 // attribute_update: device_attribute_update_request | 1077 // attribute_update: device_attribute_update_request |
| 1089 // gcm_id_update: gcm_id_update_request | |
| 1090 // | 1078 // |
| 1091 message DeviceManagementRequest { | 1079 message DeviceManagementRequest { |
| 1092 // Register request. | 1080 // Register request. |
| 1093 optional DeviceRegisterRequest register_request = 1; | 1081 optional DeviceRegisterRequest register_request = 1; |
| 1094 | 1082 |
| 1095 // Unregister request. | 1083 // Unregister request. |
| 1096 optional DeviceUnregisterRequest unregister_request = 2; | 1084 optional DeviceUnregisterRequest unregister_request = 2; |
| 1097 | 1085 |
| 1098 // Policy request. | 1086 // Policy request. |
| 1099 optional DevicePolicyRequest policy_request = 3; | 1087 optional DevicePolicyRequest policy_request = 3; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 1126 // Remote command fetching. | 1114 // Remote command fetching. |
| 1127 optional DeviceRemoteCommandRequest remote_command_request = 13; | 1115 optional DeviceRemoteCommandRequest remote_command_request = 13; |
| 1128 | 1116 |
| 1129 // Check permission for updating device attribute. | 1117 // Check permission for updating device attribute. |
| 1130 optional DeviceAttributeUpdatePermissionRequest | 1118 optional DeviceAttributeUpdatePermissionRequest |
| 1131 device_attribute_update_permission_request = 14; | 1119 device_attribute_update_permission_request = 14; |
| 1132 | 1120 |
| 1133 // Update device attribute. | 1121 // Update device attribute. |
| 1134 optional DeviceAttributeUpdateRequest device_attribute_update_request | 1122 optional DeviceAttributeUpdateRequest device_attribute_update_request |
| 1135 = 15; | 1123 = 15; |
| 1136 | |
| 1137 // Update the GCM id to device_id mapping. | |
| 1138 optional GcmIdUpdateRequest gcm_id_update_request = 16; | |
| 1139 } | 1124 } |
| 1140 | 1125 |
| 1141 // Response from server to device. | 1126 // Response from server to device. |
| 1142 // | 1127 // |
| 1143 // The server uses the following numbers as HTTP status codes | 1128 // The server uses the following numbers as HTTP status codes |
| 1144 // to report top-level errors. | 1129 // to report top-level errors. |
| 1145 // | 1130 // |
| 1146 // 200 OK: valid response is returned to client. | 1131 // 200 OK: valid response is returned to client. |
| 1147 // 400 Bad Request: invalid argument. | 1132 // 400 Bad Request: invalid argument. |
| 1148 // 401 Unauthorized: invalid auth cookie or DM token. | 1133 // 401 Unauthorized: invalid auth cookie or DM token. |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 | 1178 |
| 1194 // Response to remote command request. | 1179 // Response to remote command request. |
| 1195 optional DeviceRemoteCommandResponse remote_command_response = 14; | 1180 optional DeviceRemoteCommandResponse remote_command_response = 14; |
| 1196 | 1181 |
| 1197 // Response to check device attribute update permission. | 1182 // Response to check device attribute update permission. |
| 1198 optional DeviceAttributeUpdatePermissionResponse | 1183 optional DeviceAttributeUpdatePermissionResponse |
| 1199 device_attribute_update_permission_response = 15; | 1184 device_attribute_update_permission_response = 15; |
| 1200 | 1185 |
| 1201 // Response to update device attribute. | 1186 // Response to update device attribute. |
| 1202 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; | 1187 optional DeviceAttributeUpdateResponse device_attribute_update_response = 16; |
| 1203 | |
| 1204 // Response to GCM id update request. | |
| 1205 optional GcmIdUpdateResponse gcm_id_update_response = 17; | |
| 1206 } | 1188 } |
| OLD | NEW |