OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ | 5 #ifndef REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ |
6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ | 6 #define REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ |
7 | 7 |
8 #include <queue> | 8 #include <queue> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 enum AsyncResult { | 51 enum AsyncResult { |
52 RESULT_OK = 0, | 52 RESULT_OK = 0, |
53 | 53 |
54 // The operation has FAILED. | 54 // The operation has FAILED. |
55 RESULT_FAILED = 1, | 55 RESULT_FAILED = 1, |
56 | 56 |
57 // User has cancelled the action (e.g. rejected UAC prompt). | 57 // User has cancelled the action (e.g. rejected UAC prompt). |
58 // TODO(sergeyu): Current implementations don't return this value. | 58 // TODO(sergeyu): Current implementations don't return this value. |
59 RESULT_CANCELLED = 2, | 59 RESULT_CANCELLED = 2, |
60 | 60 |
61 // Failed to access host directory. | |
62 RESULT_FAILED_DIRECTORY = 3 | |
63 | |
64 // TODO(sergeyu): Add more error codes when we know how to handle | 61 // TODO(sergeyu): Add more error codes when we know how to handle |
65 // them in the webapp. | 62 // them in the webapp. |
66 }; | 63 }; |
67 | 64 |
68 // Callback type for GetConfig(). If the host is configured then a dictionary | 65 // Callback type for GetConfig(). If the host is configured then a dictionary |
69 // is returned containing host_id and xmpp_login, with security-sensitive | 66 // is returned containing host_id and xmpp_login, with security-sensitive |
70 // fields filtered out. An empty dictionary is returned if the host is not | 67 // fields filtered out. An empty dictionary is returned if the host is not |
71 // configured, and nullptr if the configuration is corrupt or cannot be read. | 68 // configured, and nullptr if the configuration is corrupt or cannot be read. |
72 typedef base::Callback<void (scoped_ptr<base::DictionaryValue> config)> | 69 typedef base::Callback<void (scoped_ptr<base::DictionaryValue> config)> |
73 GetConfigCallback; | 70 GetConfigCallback; |
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
229 scoped_ptr<Delegate> delegate_; | 226 scoped_ptr<Delegate> delegate_; |
230 | 227 |
231 std::queue<base::Closure> pending_requests_; | 228 std::queue<base::Closure> pending_requests_; |
232 | 229 |
233 DISALLOW_COPY_AND_ASSIGN(DaemonController); | 230 DISALLOW_COPY_AND_ASSIGN(DaemonController); |
234 }; | 231 }; |
235 | 232 |
236 } // namespace remoting | 233 } // namespace remoting |
237 | 234 |
238 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ | 235 #endif // REMOTING_HOST_SETUP_DAEMON_CONTROLLER_H_ |
OLD | NEW |