Chromium Code Reviews| 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 436 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 447 | 447 |
| 448 // The time at which the command was executed, if the the result is | 448 // The time at which the command was executed, if the the result is |
| 449 // RESULT_SUCCESS. | 449 // RESULT_SUCCESS. |
| 450 optional int64 timestamp = 3; | 450 optional int64 timestamp = 3; |
| 451 | 451 |
| 452 // Extra information sent to server as result of execution, might be a | 452 // Extra information sent to server as result of execution, might be a |
| 453 // serialization of another protobuf. | 453 // serialization of another protobuf. |
| 454 optional bytes payload = 4; | 454 optional bytes payload = 4; |
| 455 } | 455 } |
| 456 | 456 |
| 457 message DeviceRemoteCommandRequest { | |
| 458 // The command id of the last command received from the server until | |
|
bartfab (slow)
2015/02/28 00:01:26
Nit: s/id/ID/
binjin
2015/02/28 02:18:08
Done.
| |
| 459 // now. Omitted if no commands have been received yet. | |
| 460 optional int64 last_command_unique_id = 1; | |
| 461 | |
| 462 // The execution results of previously fetched commands. | |
| 463 // The client should send back the command result whenever possible. | |
|
bartfab (slow)
2015/02/28 00:01:27
Nit: s/the/a/
binjin
2015/02/28 02:18:08
Done.
| |
| 464 repeated RemoteCommandResult command_results = 2; | |
| 465 } | |
| 466 | |
| 467 message DeviceRemoteCommandResponse { | |
| 468 // The queue of pending commands. | |
| 469 repeated RemoteCommand commands = 1; | |
| 470 } | |
| 471 | |
| 457 // Request from device to server for reading policies. | 472 // Request from device to server for reading policies. |
| 458 message DevicePolicyRequest { | 473 message DevicePolicyRequest { |
| 459 // The policy fetch request. If this field exists, the request must | 474 // The policy fetch request. If this field exists, the request must |
| 460 // comes from a non-TT client. The repeated field allows client to | 475 // comes from a non-TT client. The repeated field allows client to |
| 461 // request multiple policies for better performance. | 476 // request multiple policies for better performance. |
| 462 repeated PolicyFetchRequest request = 3; | 477 repeated PolicyFetchRequest request = 3; |
| 463 } | 478 } |
| 464 | 479 |
| 465 // Response from server to device for reading policies. | 480 // Response from server to device for reading policies. |
| 466 message DevicePolicyResponse { | 481 message DevicePolicyResponse { |
| (...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 927 // * cert_upload | 942 // * cert_upload |
| 928 // * check_device_pairing | 943 // * check_device_pairing |
| 929 // * device_pairing | 944 // * device_pairing |
| 930 // * device_state_retrieval | 945 // * device_state_retrieval |
| 931 // * enterprise_check | 946 // * enterprise_check |
| 932 // * ping | 947 // * ping |
| 933 // * policy | 948 // * policy |
| 934 // * register | 949 // * register |
| 935 // * status | 950 // * status |
| 936 // * unregister | 951 // * unregister |
| 952 // * remote_commands | |
| 937 // | 953 // |
| 938 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 954 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
| 939 // * apptype: MUST BE Android or Chrome. | 955 // * apptype: MUST BE Android or Chrome. |
| 940 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 956 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
| 941 // * agent: MUST BE a string of characters. | 957 // * agent: MUST BE a string of characters. |
| 942 // * HTTP Authorization header MUST be in the following formats: | 958 // * HTTP Authorization header MUST be in the following formats: |
|
bartfab (slow)
2015/02/28 00:01:26
What format should the header have for remote comm
binjin
2015/03/09 16:31:56
Done.
| |
| 943 // * For register and ping requests | 959 // * For register and ping requests |
| 944 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 960 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
| 945 // | 961 // |
| 946 // * For unregister, policy, status, and cert_upload requests | 962 // * For unregister, policy, status, and cert_upload requests |
| 947 // Authorization: GoogleDMToken token=<dm token from register> | 963 // Authorization: GoogleDMToken token=<dm token from register> |
| 948 // | 964 // |
| 949 // * The Authorization header isn't used for enterprise_check | 965 // * The Authorization header isn't used for enterprise_check |
| 950 // request, nor for register requests using OAuth. In the latter case, | 966 // request, nor for register requests using OAuth. In the latter case, |
| 951 // the OAuth token is passed in the "oauth" parameter. | 967 // the OAuth token is passed in the "oauth" parameter. |
| 952 // | 968 // |
| 953 // DeviceManagementRequest should only contain one request which matches the | 969 // DeviceManagementRequest should only contain one request which matches the |
| 954 // HTTP query parameter - request, as listed below. Other requests within the | 970 // HTTP query parameter - request, as listed below. Other requests within the |
| 955 // container will be ignored. | 971 // container will be ignored. |
| 956 // cert_upload: cert_upload_request | 972 // cert_upload: cert_upload_request |
| 957 // check_device_pairing: check_device_pairing_request | 973 // check_device_pairing: check_device_pairing_request |
| 958 // device_pairing: device_pairing_request | 974 // device_pairing: device_pairing_request |
| 959 // device_state_retrieval: device_state_retrieval_request | 975 // device_state_retrieval: device_state_retrieval_request |
| 960 // enterprise_check: auto_enrollment_request | 976 // enterprise_check: auto_enrollment_request |
| 961 // ping: policy_request | 977 // ping: policy_request |
| 962 // policy: policy_request | 978 // policy: policy_request |
| 963 // register: register_request | 979 // register: register_request |
| 964 // status: device_status_report_request or session_status_report_request | 980 // status: device_status_report_request or session_status_report_request |
| 965 // unregister: unregister_request | 981 // unregister: unregister_request |
| 982 // remote_commands: remote_command_request | |
| 966 // | 983 // |
| 967 // | 984 // |
| 968 message DeviceManagementRequest { | 985 message DeviceManagementRequest { |
| 969 // Register request. | 986 // Register request. |
| 970 optional DeviceRegisterRequest register_request = 1; | 987 optional DeviceRegisterRequest register_request = 1; |
| 971 | 988 |
| 972 // Unregister request. | 989 // Unregister request. |
| 973 optional DeviceUnregisterRequest unregister_request = 2; | 990 optional DeviceUnregisterRequest unregister_request = 2; |
| 974 | 991 |
| 975 // Policy request. | 992 // Policy request. |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 992 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9; | 1009 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9; |
| 993 | 1010 |
| 994 // Device state key update. | 1011 // Device state key update. |
| 995 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10; | 1012 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10; |
| 996 | 1013 |
| 997 // Pair two devices. | 1014 // Pair two devices. |
| 998 optional DevicePairingRequest device_pairing_request = 11; | 1015 optional DevicePairingRequest device_pairing_request = 11; |
| 999 | 1016 |
| 1000 // Check if two devices are paired. | 1017 // Check if two devices are paired. |
| 1001 optional CheckDevicePairingRequest check_device_pairing_request = 12; | 1018 optional CheckDevicePairingRequest check_device_pairing_request = 12; |
| 1019 | |
| 1020 // Remote command fetching. | |
| 1021 optional DeviceRemoteCommandRequest remote_command_request = 13; | |
| 1002 } | 1022 } |
| 1003 | 1023 |
| 1004 // Response from server to device. | 1024 // Response from server to device. |
| 1005 // | 1025 // |
| 1006 // The server uses the following numbers as HTTP status codes | 1026 // The server uses the following numbers as HTTP status codes |
| 1007 // to report top-level errors. | 1027 // to report top-level errors. |
| 1008 // | 1028 // |
| 1009 // 200 OK: valid response is returned to client. | 1029 // 200 OK: valid response is returned to client. |
| 1010 // 400 Bad Request: invalid argument. | 1030 // 400 Bad Request: invalid argument. |
| 1011 // 401 Unauthorized: invalid auth cookie or DM token. | 1031 // 401 Unauthorized: invalid auth cookie or DM token. |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1046 optional DeviceServiceApiAccessResponse service_api_access_response = 10; | 1066 optional DeviceServiceApiAccessResponse service_api_access_response = 10; |
| 1047 | 1067 |
| 1048 // Device-state retrieval. | 1068 // Device-state retrieval. |
| 1049 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11; | 1069 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11; |
| 1050 | 1070 |
| 1051 // Response to device pairing request. | 1071 // Response to device pairing request. |
| 1052 optional DevicePairingResponse device_pairing_response = 12; | 1072 optional DevicePairingResponse device_pairing_response = 12; |
| 1053 | 1073 |
| 1054 // Response to check device pairing request. | 1074 // Response to check device pairing request. |
| 1055 optional CheckDevicePairingResponse check_device_pairing_response = 13; | 1075 optional CheckDevicePairingResponse check_device_pairing_response = 13; |
| 1076 | |
| 1077 // Response to remote command request. | |
| 1078 optional DeviceRemoteCommandResponse remote_command_response = 14; | |
| 1056 } | 1079 } |
| OLD | NEW |