Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 1 | // Copyright (c) 2011 The Chromium OS Authors. All rights reserved. |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
3 | // found in the LICENSE file. | ||||
4 | |||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 5 | #ifndef SHILL_DAEMON_H_ |
6 | #define SHILL_DAEMON_H_ | ||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 7 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 8 | #include "shill/manager.h" |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 9 | #include "shill/shill_event.h" |
10 | #include "shill/sockets.h" | ||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 11 | |
12 | namespace shill { | ||||
13 | |||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 14 | class Config; |
15 | class ControlInterface; | ||||
16 | |||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 17 | class Daemon { |
18 | public: | ||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 19 | Daemon(Config *config, ControlInterface *control); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 20 | ~Daemon(); |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 21 | |
Paul Stewart | 0af98bf | 2011-05-10 17:38:08 -0700 | [diff] [blame] | 22 | void Start(); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 23 | void Run(); |
24 | |||||
25 | private: | ||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 26 | friend class ShillDaemonTest; |
27 | |||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 28 | ControlInterface *CreateControl(); |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 29 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 30 | Config *config_; |
31 | ControlInterface *control_; | ||||
32 | Manager manager_; | ||||
33 | EventDispatcher dispatcher_; | ||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 34 | Sockets sockets_; |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 35 | }; |
36 | |||||
37 | } // namespace shill | ||||
38 | |||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame^] | 39 | #endif // SHILL_DAEMON_H_ |