Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: components/policy/proto/device_management_backend.proto

Issue 879233003: Initial RemoteCommandService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remote-commands
Patch Set: fix last_command_id Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
444 444
445 // The time at which the command was executed, if the the result is 445 // The time at which the command was executed, if the the result is
446 // RESULT_SUCCESS. 446 // RESULT_SUCCESS.
447 optional int64 timestamp = 3; 447 optional int64 timestamp = 3;
448 448
449 // Extra information sent to server as result of execution, might be a 449 // Extra information sent to server as result of execution, might be a
450 // serialization of another protobuf. 450 // serialization of another protobuf.
451 optional bytes payload = 4; 451 optional bytes payload = 4;
452 } 452 }
453 453
454 message DeviceRemoteCommandRequest {
455 // The command id of the last command received from the server until
456 // now. Omitted if no commands have been received yet.
457 optional int64 last_command_unique_id = 1;
458
459 // The execution results of previously fetched commands.
460 // The client should send back the command result whenever possible.
461 repeated RemoteCommandResult command_results = 2;
462 }
463
464 message DeviceRemoteCommandResponse {
465 // The queue of pending commands.
466 repeated RemoteCommand commands = 1;
467 }
468
454 // Request from device to server for reading policies. 469 // Request from device to server for reading policies.
455 message DevicePolicyRequest { 470 message DevicePolicyRequest {
456 // The policy fetch request. If this field exists, the request must 471 // The policy fetch request. If this field exists, the request must
457 // comes from a non-TT client. The repeated field allows client to 472 // comes from a non-TT client. The repeated field allows client to
458 // request multiple policies for better performance. 473 // request multiple policies for better performance.
459 repeated PolicyFetchRequest request = 3; 474 repeated PolicyFetchRequest request = 3;
460 } 475 }
461 476
462 // Response from server to device for reading policies. 477 // Response from server to device for reading policies.
463 message DevicePolicyResponse { 478 message DevicePolicyResponse {
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after
921 // * cert_upload 936 // * cert_upload
922 // * check_device_pairing 937 // * check_device_pairing
923 // * device_pairing 938 // * device_pairing
924 // * device_state_retrieval 939 // * device_state_retrieval
925 // * enterprise_check 940 // * enterprise_check
926 // * ping 941 // * ping
927 // * policy 942 // * policy
928 // * register 943 // * register
929 // * status 944 // * status
930 // * unregister 945 // * unregister
946 // * remote_commands
931 // 947 //
932 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. 948 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS.
933 // * apptype: MUST BE Android or Chrome. 949 // * apptype: MUST BE Android or Chrome.
934 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. 950 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E].
935 // * agent: MUST BE a string of characters. 951 // * agent: MUST BE a string of characters.
936 // * HTTP Authorization header MUST be in the following formats: 952 // * HTTP Authorization header MUST be in the following formats:
937 // * For register and ping requests 953 // * For register and ping requests
938 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> 954 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync>
939 // 955 //
940 // * For unregister, policy, status, and cert_upload requests 956 // * For unregister, policy, status, and cert_upload requests
941 // Authorization: GoogleDMToken token=<dm token from register> 957 // Authorization: GoogleDMToken token=<dm token from register>
942 // 958 //
943 // * The Authorization header isn't used for enterprise_check 959 // * The Authorization header isn't used for enterprise_check
944 // request, nor for register requests using OAuth. In the latter case, 960 // request, nor for register requests using OAuth. In the latter case,
945 // the OAuth token is passed in the "oauth" parameter. 961 // the OAuth token is passed in the "oauth" parameter.
946 // 962 //
947 // DeviceManagementRequest should only contain one request which matches the 963 // DeviceManagementRequest should only contain one request which matches the
948 // HTTP query parameter - request, as listed below. Other requests within the 964 // HTTP query parameter - request, as listed below. Other requests within the
949 // container will be ignored. 965 // container will be ignored.
950 // cert_upload: cert_upload_request 966 // cert_upload: cert_upload_request
951 // check_device_pairing: check_device_pairing_request 967 // check_device_pairing: check_device_pairing_request
952 // device_pairing: device_pairing_request 968 // device_pairing: device_pairing_request
953 // device_state_retrieval: device_state_retrieval_request 969 // device_state_retrieval: device_state_retrieval_request
954 // enterprise_check: auto_enrollment_request 970 // enterprise_check: auto_enrollment_request
955 // ping: policy_request 971 // ping: policy_request
956 // policy: policy_request 972 // policy: policy_request
957 // register: register_request 973 // register: register_request
958 // status: device_status_report_request or session_status_report_request 974 // status: device_status_report_request or session_status_report_request
959 // unregister: unregister_request 975 // unregister: unregister_request
976 // remote_commands: remote_command_request
960 // 977 //
961 // 978 //
962 message DeviceManagementRequest { 979 message DeviceManagementRequest {
963 // Register request. 980 // Register request.
964 optional DeviceRegisterRequest register_request = 1; 981 optional DeviceRegisterRequest register_request = 1;
965 982
966 // Unregister request. 983 // Unregister request.
967 optional DeviceUnregisterRequest unregister_request = 2; 984 optional DeviceUnregisterRequest unregister_request = 2;
968 985
969 // Policy request. 986 // Policy request.
(...skipping 16 matching lines...) Expand all
986 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9; 1003 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9;
987 1004
988 // Device state key update. 1005 // Device state key update.
989 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10; 1006 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10;
990 1007
991 // Pair two devices. 1008 // Pair two devices.
992 optional DevicePairingRequest device_pairing_request = 11; 1009 optional DevicePairingRequest device_pairing_request = 11;
993 1010
994 // Check if two devices are paired. 1011 // Check if two devices are paired.
995 optional CheckDevicePairingRequest check_device_pairing_request = 12; 1012 optional CheckDevicePairingRequest check_device_pairing_request = 12;
1013
1014 // Remote command fetching.
1015 optional DeviceRemoteCommandRequest remote_command_request = 13;
996 } 1016 }
997 1017
998 // Response from server to device. 1018 // Response from server to device.
999 // 1019 //
1000 // The server uses the following numbers as HTTP status codes 1020 // The server uses the following numbers as HTTP status codes
1001 // to report top-level errors. 1021 // to report top-level errors.
1002 // 1022 //
1003 // 200 OK: valid response is returned to client. 1023 // 200 OK: valid response is returned to client.
1004 // 400 Bad Request: invalid argument. 1024 // 400 Bad Request: invalid argument.
1005 // 401 Unauthorized: invalid auth cookie or DM token. 1025 // 401 Unauthorized: invalid auth cookie or DM token.
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
1040 optional DeviceServiceApiAccessResponse service_api_access_response = 10; 1060 optional DeviceServiceApiAccessResponse service_api_access_response = 10;
1041 1061
1042 // Device-state retrieval. 1062 // Device-state retrieval.
1043 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11; 1063 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11;
1044 1064
1045 // Response to device pairing request. 1065 // Response to device pairing request.
1046 optional DevicePairingResponse device_pairing_response = 12; 1066 optional DevicePairingResponse device_pairing_response = 12;
1047 1067
1048 // Response to check device pairing request. 1068 // Response to check device pairing request.
1049 optional CheckDevicePairingResponse check_device_pairing_response = 13; 1069 optional CheckDevicePairingResponse check_device_pairing_response = 13;
1070
1071 // Response to remote command request.
1072 optional DeviceRemoteCommandResponse remote_command_response = 14;
1050 } 1073 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698