blob: 3a6557af2b55d0a2d56e1aafe0baf61cdda7ae10 [file] [log] [blame]
Darin Petkov633ac6f2011-07-08 13:56:13 -07001// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
Paul Stewart75897df2011-04-27 09:05:53 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Darin Petkov633ac6f2011-07-08 13:56:13 -07005#ifndef SHILL_DAEMON_H_
6#define SHILL_DAEMON_H_
Paul Stewart75897df2011-04-27 09:05:53 -07007
Paul Stewart75897df2011-04-27 09:05:53 -07008#include "shill/manager.h"
Darin Petkov633ac6f2011-07-08 13:56:13 -07009#include "shill/shill_event.h"
10#include "shill/sockets.h"
Paul Stewart75897df2011-04-27 09:05:53 -070011
12namespace shill {
13
Darin Petkov633ac6f2011-07-08 13:56:13 -070014class Config;
15class ControlInterface;
16
Paul Stewart75897df2011-04-27 09:05:53 -070017class Daemon {
18 public:
Darin Petkov633ac6f2011-07-08 13:56:13 -070019 Daemon(Config *config, ControlInterface *control);
Paul Stewart75897df2011-04-27 09:05:53 -070020 ~Daemon();
Darin Petkov633ac6f2011-07-08 13:56:13 -070021
Paul Stewart0af98bf2011-05-10 17:38:08 -070022 void Start();
Paul Stewart75897df2011-04-27 09:05:53 -070023 void Run();
24
25 private:
Darin Petkov633ac6f2011-07-08 13:56:13 -070026 friend class ShillDaemonTest;
27
Paul Stewart75897df2011-04-27 09:05:53 -070028 ControlInterface *CreateControl();
Darin Petkov633ac6f2011-07-08 13:56:13 -070029
Paul Stewart75897df2011-04-27 09:05:53 -070030 Config *config_;
31 ControlInterface *control_;
32 Manager manager_;
33 EventDispatcher dispatcher_;
Darin Petkov633ac6f2011-07-08 13:56:13 -070034 Sockets sockets_;
Paul Stewart75897df2011-04-27 09:05:53 -070035};
36
37} // namespace shill
38
Darin Petkov633ac6f2011-07-08 13:56:13 -070039#endif // SHILL_DAEMON_H_