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