blob: 17e687b97fe86fad7fc839858890afab05d868b5 [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
mukesh agrawal8f317b62011-07-15 11:53:23 -07008#include <string>
9
Paul Stewart75897df2011-04-27 09:05:53 -070010#include "shill/manager.h"
Darin Petkov633ac6f2011-07-08 13:56:13 -070011#include "shill/shill_event.h"
12#include "shill/sockets.h"
Paul Stewart75897df2011-04-27 09:05:53 -070013
14namespace shill {
15
Darin Petkov633ac6f2011-07-08 13:56:13 -070016class Config;
17class ControlInterface;
Darin Petkov887f2982011-07-14 16:10:17 -070018class GLib;
Darin Petkov633ac6f2011-07-08 13:56:13 -070019
Paul Stewart75897df2011-04-27 09:05:53 -070020class Daemon {
21 public:
Darin Petkov887f2982011-07-14 16:10:17 -070022 Daemon(Config *config, ControlInterface *control, GLib *glib);
Paul Stewart75897df2011-04-27 09:05:53 -070023 ~Daemon();
Darin Petkov633ac6f2011-07-08 13:56:13 -070024
mukesh agrawal8f317b62011-07-15 11:53:23 -070025 void AddDeviceToBlackList(const std::string &device_name);
Paul Stewart0af98bf2011-05-10 17:38:08 -070026 void Start();
Paul Stewart75897df2011-04-27 09:05:53 -070027 void Run();
28
29 private:
Darin Petkov633ac6f2011-07-08 13:56:13 -070030 friend class ShillDaemonTest;
31
Paul Stewart75897df2011-04-27 09:05:53 -070032 ControlInterface *CreateControl();
Darin Petkov633ac6f2011-07-08 13:56:13 -070033
Paul Stewart75897df2011-04-27 09:05:53 -070034 Config *config_;
35 ControlInterface *control_;
36 Manager manager_;
37 EventDispatcher dispatcher_;
Darin Petkov633ac6f2011-07-08 13:56:13 -070038 Sockets sockets_;
Paul Stewart75897df2011-04-27 09:05:53 -070039};
40
41} // namespace shill
42
Darin Petkov633ac6f2011-07-08 13:56:13 -070043#endif // SHILL_DAEMON_H_