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 #ifndef GCP20_PROTOTYPE_PRINTER_H_ | 5 #ifndef GCP20_PROTOTYPE_PRINTER_H_ |
6 #define GCP20_PROTOTYPE_PRINTER_H_ | 6 #define GCP20_PROTOTYPE_PRINTER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 | 186 |
187 // Adds |OnIdle| method to the MessageLoop. | 187 // Adds |OnIdle| method to the MessageLoop. |
188 void PostOnIdle(); | 188 void PostOnIdle(); |
189 | 189 |
190 // Converts errors. | 190 // Converts errors. |
191 PrivetHttpServer::RegistrationErrorStatus ConfirmationToRegistrationError( | 191 PrivetHttpServer::RegistrationErrorStatus ConfirmationToRegistrationError( |
192 RegistrationInfo::ConfirmationState state); | 192 RegistrationInfo::ConfirmationState state); |
193 | 193 |
194 std::string ConnectionStateToString(ConnectionState state) const; | 194 std::string ConnectionStateToString(ConnectionState state) const; |
195 | 195 |
196 // Changes state and update info in DNS server. | 196 // Stops all Internet-services and boots them again in |delay| time. |
| 197 void ReconnectIn(const base::TimeDelta& delay); |
| 198 |
| 199 // Changes state and update info in DNS server. Returns |true| if state |
| 200 // was changed (otherwise state was the same). |
197 bool ChangeState(ConnectionState new_state); | 201 bool ChangeState(ConnectionState new_state); |
198 | 202 |
199 RegistrationInfo reg_info_; | 203 RegistrationInfo reg_info_; |
200 | 204 |
201 // Contains DNS-SD server. | 205 // Contains DNS-SD server. |
202 DnsSdServer dns_server_; | 206 DnsSdServer dns_server_; |
203 | 207 |
204 // Contains Privet HTTP server. | 208 // Contains Privet HTTP server. |
205 PrivetHttpServer http_server_; | 209 PrivetHttpServer http_server_; |
206 | 210 |
(...skipping 24 matching lines...) Expand all Loading... |
231 bool pending_local_settings_check_; | 235 bool pending_local_settings_check_; |
232 | 236 |
233 // Contains |true| if Printer has to check available printjobs. | 237 // Contains |true| if Printer has to check available printjobs. |
234 bool pending_print_jobs_check_; | 238 bool pending_print_jobs_check_; |
235 | 239 |
236 DISALLOW_COPY_AND_ASSIGN(Printer); | 240 DISALLOW_COPY_AND_ASSIGN(Printer); |
237 }; | 241 }; |
238 | 242 |
239 #endif // GCP20_PROTOTYPE_PRINTER_H_ | 243 #endif // GCP20_PROTOTYPE_PRINTER_H_ |
240 | 244 |
OLD | NEW |