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 | |
mukesh agrawal | 8f317b6 | 2011-07-15 11:53:23 -0700 | [diff] [blame] | 8 | #include <string> |
9 | |||||
Darin Petkov | a7b8949 | 2011-07-27 12:48:17 -0700 | [diff] [blame] | 10 | #include "shill/glib.h" |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 11 | #include "shill/manager.h" |
Darin Petkov | a7b8949 | 2011-07-27 12:48:17 -0700 | [diff] [blame] | 12 | #include "shill/proxy_factory.h" |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 13 | #include "shill/shill_event.h" |
14 | #include "shill/sockets.h" | ||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 15 | |
16 | namespace shill { | ||||
17 | |||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 18 | class Config; |
19 | class ControlInterface; | ||||
Darin Petkov | 887f298 | 2011-07-14 16:10:17 -0700 | [diff] [blame] | 20 | class GLib; |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 21 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 22 | class Daemon { |
23 | public: | ||||
Darin Petkov | a7b8949 | 2011-07-27 12:48:17 -0700 | [diff] [blame] | 24 | Daemon(Config *config, ControlInterface *control); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 25 | ~Daemon(); |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 26 | |
mukesh agrawal | 8f317b6 | 2011-07-15 11:53:23 -0700 | [diff] [blame] | 27 | void AddDeviceToBlackList(const std::string &device_name); |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 28 | void Run(); |
29 | |||||
30 | private: | ||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 31 | friend class ShillDaemonTest; |
32 | |||||
Darin Petkov | a7b8949 | 2011-07-27 12:48:17 -0700 | [diff] [blame] | 33 | void Start(); |
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 34 | |
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 35 | Config *config_; |
36 | ControlInterface *control_; | ||||
37 | Manager manager_; | ||||
38 | EventDispatcher dispatcher_; | ||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 39 | Sockets sockets_; |
Darin Petkov | a7b8949 | 2011-07-27 12:48:17 -0700 | [diff] [blame] | 40 | GLib glib_; |
41 | ProxyFactory proxy_factory_; | ||||
Paul Stewart | 75897df | 2011-04-27 09:05:53 -0700 | [diff] [blame] | 42 | }; |
43 | |||||
44 | } // namespace shill | ||||
45 | |||||
Darin Petkov | 633ac6f | 2011-07-08 13:56:13 -0700 | [diff] [blame] | 46 | #endif // SHILL_DAEMON_H_ |