blob: 202f1c4ea4564a8b0bcb479eb91464e547f87b38 [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 Stewart26b327e2011-10-19 11:38:09 -070010#include "shill/event_dispatcher.h"
Darin Petkova7b89492011-07-27 12:48:17 -070011#include "shill/glib.h"
Paul Stewart75897df2011-04-27 09:05:53 -070012#include "shill/manager.h"
Darin Petkov633ac6f2011-07-08 13:56:13 -070013#include "shill/sockets.h"
Paul Stewart75897df2011-04-27 09:05:53 -070014
15namespace shill {
16
Darin Petkov633ac6f2011-07-08 13:56:13 -070017class Config;
18class ControlInterface;
Darin Petkov887f2982011-07-14 16:10:17 -070019class GLib;
Darin Petkov633ac6f2011-07-08 13:56:13 -070020
Paul Stewart75897df2011-04-27 09:05:53 -070021class Daemon {
22 public:
Darin Petkova7b89492011-07-27 12:48:17 -070023 Daemon(Config *config, ControlInterface *control);
Paul Stewart75897df2011-04-27 09:05:53 -070024 ~Daemon();
Darin Petkov633ac6f2011-07-08 13:56:13 -070025
mukesh agrawal8f317b62011-07-15 11:53:23 -070026 void AddDeviceToBlackList(const std::string &device_name);
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
Darin Petkova7b89492011-07-27 12:48:17 -070032 void Start();
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_;
Darin Petkova7b89492011-07-27 12:48:17 -070039 GLib glib_;
Paul Stewart75897df2011-04-27 09:05:53 -070040};
41
42} // namespace shill
43
Darin Petkov633ac6f2011-07-08 13:56:13 -070044#endif // SHILL_DAEMON_H_