blob: 52bab1b77a9279ecb820b36d1fc3c53808d4ed1d [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;
Darin Petkov887f2982011-07-14 16:10:17 -070016class GLib;
Darin Petkov633ac6f2011-07-08 13:56:13 -070017
Paul Stewart75897df2011-04-27 09:05:53 -070018class Daemon {
19 public:
Darin Petkov887f2982011-07-14 16:10:17 -070020 Daemon(Config *config, ControlInterface *control, GLib *glib);
Paul Stewart75897df2011-04-27 09:05:53 -070021 ~Daemon();
Darin Petkov633ac6f2011-07-08 13:56:13 -070022
Paul Stewart0af98bf2011-05-10 17:38:08 -070023 void Start();
Paul Stewart75897df2011-04-27 09:05:53 -070024 void Run();
25
26 private:
Darin Petkov633ac6f2011-07-08 13:56:13 -070027 friend class ShillDaemonTest;
28
Paul Stewart75897df2011-04-27 09:05:53 -070029 ControlInterface *CreateControl();
Darin Petkov633ac6f2011-07-08 13:56:13 -070030
Paul Stewart75897df2011-04-27 09:05:53 -070031 Config *config_;
32 ControlInterface *control_;
33 Manager manager_;
34 EventDispatcher dispatcher_;
Darin Petkov633ac6f2011-07-08 13:56:13 -070035 Sockets sockets_;
Paul Stewart75897df2011-04-27 09:05:53 -070036};
37
38} // namespace shill
39
Darin Petkov633ac6f2011-07-08 13:56:13 -070040#endif // SHILL_DAEMON_H_