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 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
615 // Enterprise enrollment is enforced and cannot be skipped. | 615 // Enterprise enrollment is enforced and cannot be skipped. |
616 RESTORE_MODE_REENROLLMENT_ENFORCED = 2; | 616 RESTORE_MODE_REENROLLMENT_ENFORCED = 2; |
617 }; | 617 }; |
618 // The server-indicated restore mode. | 618 // The server-indicated restore mode. |
619 optional RestoreMode restore_mode = 1 [default = RESTORE_MODE_NONE]; | 619 optional RestoreMode restore_mode = 1 [default = RESTORE_MODE_NONE]; |
620 | 620 |
621 // Primary domain the device is associated with. | 621 // Primary domain the device is associated with. |
622 optional string management_domain = 2; | 622 optional string management_domain = 2; |
623 } | 623 } |
624 | 624 |
625 // Sent by the client to the server to pair the Host device with the Controller | |
626 // device. The HTTP request contains an end-user OAuth token and only succeeds | |
627 // if both Host and Controller devices belong to the end-user domain. | |
628 message DevicePairingRequest { | |
629 | |
Joao da Silva
2014/09/24 12:39:56
The other protos don't have an empty newline here.
achuithb
2014/09/24 12:46:32
I should've caught this in the review, but the ser
| |
630 // The device ID of the Host device. | |
631 optional string host_device_id = 1; | |
632 | |
633 // The device ID of the Controller device. | |
634 optional string controller_device_id = 2; | |
635 } | |
636 | |
637 // Response from the server to the device pairing request. | |
638 message DevicePairingResponse { | |
639 | |
640 // The client should check HTTP status code first. If HTTP status code is not | |
641 // 200 (e.g. 500 internal error), then it means the pairing fails. If HTTP | |
642 // status code is 200, then the client should check the status code within the | |
643 // response. | |
644 enum StatusCode { | |
645 SUCCESS = 0; | |
646 | |
647 // A generic failure code for pairing. | |
648 FAILED = 1; | |
649 | |
650 // The Host device cannot be found in the user's domain. | |
651 HOST_DEVICE_NOT_FOUND = 2; | |
652 | |
653 // The Controller device cannot be found in the user's domain. | |
654 CONTROLLER_DEVICE_NOT_FOUND = 3; | |
655 | |
656 // The Host device is deprovisioned. | |
657 HOST_DEVICE_DEPROVISIONED = 4; | |
658 | |
659 // The Controller device is deprovisioned. | |
660 CONTROLLER_DEVICE_DEPROVISIONED = 5; | |
661 } | |
662 | |
663 optional StatusCode status_code = 1 [default = FAILED]; | |
664 } | |
665 | |
666 // Sent by the client to the server to check if the devices are paired. The HTTP | |
667 // request contains controller service account OAuth token as well as the | |
668 // DMToken from the Host device. | |
669 message CheckDevicePairingRequest { | |
670 | |
671 // The device ID of the Host device. | |
672 optional string host_device_id = 1; | |
673 | |
674 // The device ID of the Controller device. | |
675 optional string controller_device_id = 2; | |
676 } | |
677 | |
678 // Response from the server to the check device pairing request. | |
679 message CheckDevicePairingResponse { | |
680 | |
681 // The client should check HTTP status code first. If HTTP status code is not | |
682 // 200 (e.g. 500 internal error), then it means the pairing status is unknown. | |
683 // If HTTP status code is 200, then the client should check the status code | |
684 // within the response. | |
685 enum StatusCode { | |
686 PAIRED = 0; | |
687 | |
688 // The Host and Controller devices are not paired. | |
689 NOT_PAIRED = 1; | |
690 | |
691 // The Host device cannot be found in the Host device domain. | |
692 HOST_DEVICE_NOT_FOUND = 2; | |
693 | |
694 // The Controller device cannot be found in the Host device domain. | |
695 CONTROLLER_DEVICE_NOT_FOUND = 3; | |
696 | |
697 // The Host device is deprovisioned. | |
698 HOST_DEVICE_DEPROVISIONED = 4; | |
699 | |
700 // The Controller device is deprovisioned. | |
701 CONTROLLER_DEVICE_DEPROVISIONED = 5; | |
702 | |
703 // Invalid controller identity. | |
704 INVALID_CONTROLLER_DEVICE_IDENTITY = 6; | |
705 } | |
706 | |
707 optional StatusCode status_code = 1 [default = NOT_PAIRED]; | |
708 } | |
709 | |
625 // Request from the DMAgent on the device to the DMServer. This is | 710 // Request from the DMAgent on the device to the DMServer. This is |
626 // container for all requests from device to server. The overall HTTP | 711 // container for all requests from device to server. The overall HTTP |
627 // request MUST be in the following format: | 712 // request MUST be in the following format: |
628 // | 713 // |
629 // * HTTP method is POST | 714 // * HTTP method is POST |
630 // * Data mime type is application/x-protobuffer | 715 // * Data mime type is application/x-protobuffer |
631 // * HTTP parameters are (all required, all case sensitive): | 716 // * HTTP parameters are (all required, all case sensitive): |
632 // * request: MUST BE one of | 717 // * request: MUST BE one of |
718 // * api_authorization | |
633 // * cert_upload | 719 // * cert_upload |
720 // * check_device_pairing | |
721 // * device_pairing | |
722 // * device_state_retrieval | |
634 // * enterprise_check | 723 // * enterprise_check |
635 // * device_state_retrieval | |
636 // * ping | 724 // * ping |
637 // * policy | 725 // * policy |
638 // * register | 726 // * register |
639 // * status | 727 // * status |
640 // * unregister | 728 // * unregister |
641 // * api_authorization | |
642 // | 729 // |
643 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. | 730 // * devicetype: MUST BE "1" for Android or "2" for Chrome OS. |
644 // * apptype: MUST BE Android or Chrome. | 731 // * apptype: MUST BE Android or Chrome. |
645 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. | 732 // * deviceid: MUST BE no more than 64-char in [\x21-\x7E]. |
646 // * agent: MUST BE a string of characters. | 733 // * agent: MUST BE a string of characters. |
647 // * HTTP Authorization header MUST be in the following formats: | 734 // * HTTP Authorization header MUST be in the following formats: |
648 // * For register and ping requests | 735 // * For register and ping requests |
649 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> | 736 // Authorization: GoogleLogin auth=<auth cookie for Mobile Sync> |
650 // | 737 // |
651 // * For unregister, policy, status, and cert_upload requests | 738 // * For unregister, policy, status, and cert_upload requests |
652 // Authorization: GoogleDMToken token=<dm token from register> | 739 // Authorization: GoogleDMToken token=<dm token from register> |
653 // | 740 // |
654 // * The Authorization header isn't used for enterprise_check | 741 // * The Authorization header isn't used for enterprise_check |
655 // request, nor for register requests using OAuth. In the latter case, | 742 // request, nor for register requests using OAuth. In the latter case, |
656 // the OAuth token is passed in the "oauth" parameter. | 743 // the OAuth token is passed in the "oauth" parameter. |
657 // | 744 // |
658 // DeviceManagementRequest should only contain one request which matches the | 745 // DeviceManagementRequest should only contain one request which matches the |
659 // HTTP query parameter - request, as listed below. Other requests within the | 746 // HTTP query parameter - request, as listed below. Other requests within the |
660 // container will be ignored. | 747 // container will be ignored. |
661 // cert_upload: cert_upload_request | 748 // cert_upload: cert_upload_request |
749 // check_device_pairing: check_device_pairing_request | |
750 // device_pairing: device_pairing_request | |
751 // device_state_retrieval: device_state_retrieval_request | |
662 // enterprise_check: auto_enrollment_request | 752 // enterprise_check: auto_enrollment_request |
663 // device_state_retrieval: device_state_retrieval_request | |
664 // ping: policy_request | 753 // ping: policy_request |
665 // policy: policy_request | 754 // policy: policy_request |
666 // register: register_request | 755 // register: register_request |
667 // status: device_status_report_request or session_status_report_request | 756 // status: device_status_report_request or session_status_report_request |
668 // unregister: unregister_request | 757 // unregister: unregister_request |
669 // | 758 // |
670 // | 759 // |
671 message DeviceManagementRequest { | 760 message DeviceManagementRequest { |
672 // Register request. | 761 // Register request. |
673 optional DeviceRegisterRequest register_request = 1; | 762 optional DeviceRegisterRequest register_request = 1; |
(...skipping 15 matching lines...) Expand all Loading... | |
689 optional DeviceCertUploadRequest cert_upload_request = 7; | 778 optional DeviceCertUploadRequest cert_upload_request = 7; |
690 | 779 |
691 // Request for OAuth2 authorization codes to access Google services. | 780 // Request for OAuth2 authorization codes to access Google services. |
692 optional DeviceServiceApiAccessRequest service_api_access_request = 8; | 781 optional DeviceServiceApiAccessRequest service_api_access_request = 8; |
693 | 782 |
694 // Device-state retrieval. | 783 // Device-state retrieval. |
695 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9; | 784 optional DeviceStateRetrievalRequest device_state_retrieval_request = 9; |
696 | 785 |
697 // Device state key update. | 786 // Device state key update. |
698 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10; | 787 optional DeviceStateKeyUpdateRequest device_state_key_update_request = 10; |
788 | |
789 // Pair two devices. | |
790 optional DevicePairingRequest device_pairing_request = 11; | |
791 | |
792 // Check if two devices are paired. | |
793 optional CheckDevicePairingRequest check_device_pairing_request = 12; | |
699 } | 794 } |
700 | 795 |
701 // Response from server to device. | 796 // Response from server to device. |
702 // | 797 // |
703 // The server uses the following numbers as HTTP status codes | 798 // The server uses the following numbers as HTTP status codes |
704 // to report top-level errors. | 799 // to report top-level errors. |
705 // | 800 // |
706 // 200 OK: valid response is returned to client. | 801 // 200 OK: valid response is returned to client. |
707 // 400 Bad Request: invalid argument. | 802 // 400 Bad Request: invalid argument. |
708 // 401 Unauthorized: invalid auth cookie or DM token. | 803 // 401 Unauthorized: invalid auth cookie or DM token. |
(...skipping 28 matching lines...) Expand all Loading... | |
737 optional DeviceAutoEnrollmentResponse auto_enrollment_response = 8; | 832 optional DeviceAutoEnrollmentResponse auto_enrollment_response = 8; |
738 | 833 |
739 // EMCert upload response. | 834 // EMCert upload response. |
740 optional DeviceCertUploadResponse cert_upload_response = 9; | 835 optional DeviceCertUploadResponse cert_upload_response = 9; |
741 | 836 |
742 // Response to OAuth2 authorization code request. | 837 // Response to OAuth2 authorization code request. |
743 optional DeviceServiceApiAccessResponse service_api_access_response = 10; | 838 optional DeviceServiceApiAccessResponse service_api_access_response = 10; |
744 | 839 |
745 // Device-state retrieval. | 840 // Device-state retrieval. |
746 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11; | 841 optional DeviceStateRetrievalResponse device_state_retrieval_response = 11; |
842 | |
843 // Response to device pairing request. | |
844 optional DevicePairingResponse device_pairing_response = 12; | |
845 | |
846 // Response to check device pairing request. | |
847 optional CheckDevicePairingResponse check_device_pairing_response = 13; | |
747 } | 848 } |
OLD | NEW |