OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 5 #ifndef CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 6 #define CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 const em::DevicePolicyResponse& response) = 0; | 92 const em::DevicePolicyResponse& response) = 0; |
93 virtual void OnError(ErrorCode code) = 0; | 93 virtual void OnError(ErrorCode code) = 0; |
94 | 94 |
95 protected: | 95 protected: |
96 DevicePolicyResponseDelegate() {} | 96 DevicePolicyResponseDelegate() {} |
97 | 97 |
98 private: | 98 private: |
99 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); | 99 DISALLOW_COPY_AND_ASSIGN(DevicePolicyResponseDelegate); |
100 }; | 100 }; |
101 | 101 |
102 class DeviceAutoEnrollmentResponseDelegate { | |
103 public: | |
104 virtual ~DeviceAutoEnrollmentResponseDelegate() {} | |
105 | |
106 virtual void HandleAutoEnrollmentResponse( | |
107 const em::DeviceAutoEnrollmentResponse& response) = 0; | |
108 virtual void OnError(ErrorCode code) = 0; | |
109 | |
110 protected: | |
111 DeviceAutoEnrollmentResponseDelegate() {} | |
112 | |
113 private: | |
114 DISALLOW_COPY_AND_ASSIGN(DeviceAutoEnrollmentResponseDelegate); | |
115 }; | |
116 | |
102 virtual ~DeviceManagementBackend() {} | 117 virtual ~DeviceManagementBackend() {} |
103 | 118 |
104 virtual void ProcessRegisterRequest( | 119 virtual void ProcessRegisterRequest( |
105 const std::string& gaia_auth_token, | 120 const std::string& gaia_auth_token, |
106 const std::string& oauth_token, | 121 const std::string& oauth_token, |
107 const std::string& device_id, | 122 const std::string& device_id, |
108 const em::DeviceRegisterRequest& request, | 123 const em::DeviceRegisterRequest& request, |
109 DeviceRegisterResponseDelegate* delegate) = 0; | 124 DeviceRegisterResponseDelegate* delegate) = 0; |
110 | 125 |
111 virtual void ProcessUnregisterRequest( | 126 virtual void ProcessUnregisterRequest( |
112 const std::string& device_management_token, | 127 const std::string& device_management_token, |
113 const std::string& device_id, | 128 const std::string& device_id, |
114 const em::DeviceUnregisterRequest& request, | 129 const em::DeviceUnregisterRequest& request, |
115 DeviceUnregisterResponseDelegate* delegate) = 0; | 130 DeviceUnregisterResponseDelegate* delegate) = 0; |
116 | 131 |
117 virtual void ProcessPolicyRequest( | 132 virtual void ProcessPolicyRequest( |
118 const std::string& device_management_token, | 133 const std::string& device_management_token, |
119 const std::string& device_id, | 134 const std::string& device_id, |
120 CloudPolicyDataStore::UserAffiliation user_affiliation, | 135 CloudPolicyDataStore::UserAffiliation user_affiliation, |
121 const em::DevicePolicyRequest& request, | 136 const em::DevicePolicyRequest& request, |
122 DevicePolicyResponseDelegate* delegate) = 0; | 137 DevicePolicyResponseDelegate* delegate) = 0; |
123 | 138 |
139 virtual void ProcessAutoEnrollmentRequest( | |
140 const std::string& device_id, | |
Mattias Nissler (ping if slow)
2011/12/05 09:44:15
Ah, we'll have to make sure that the device_id pas
Joao da Silva
2011/12/05 10:00:15
Will do.
| |
141 const em::DeviceAutoEnrollmentRequest& request, | |
142 DeviceAutoEnrollmentResponseDelegate* delegate) = 0; | |
143 | |
124 protected: | 144 protected: |
125 DeviceManagementBackend() {} | 145 DeviceManagementBackend() {} |
126 | 146 |
127 private: | 147 private: |
128 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); | 148 DISALLOW_COPY_AND_ASSIGN(DeviceManagementBackend); |
129 }; | 149 }; |
130 | 150 |
131 } // namespace policy | 151 } // namespace policy |
132 | 152 |
133 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ | 153 #endif // CHROME_BROWSER_POLICY_DEVICE_MANAGEMENT_BACKEND_H_ |
OLD | NEW |