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