blob: 37906ddecb60f6bec7f0a7b444709c128ecce04d [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
Darin Petkova7b89492011-07-27 12:48:17 -070010#include "shill/glib.h"
Paul Stewart75897df2011-04-27 09:05:53 -070011#include "shill/manager.h"
Darin Petkova7b89492011-07-27 12:48:17 -070012#include "shill/proxy_factory.h"
Darin Petkov633ac6f2011-07-08 13:56:13 -070013#include "shill/shill_event.h"
14#include "shill/sockets.h"
Paul Stewart75897df2011-04-27 09:05:53 -070015
16namespace shill {
17
Darin Petkov633ac6f2011-07-08 13:56:13 -070018class Config;
19class ControlInterface;
Darin Petkov887f2982011-07-14 16:10:17 -070020class GLib;
Darin Petkov633ac6f2011-07-08 13:56:13 -070021
Paul Stewart75897df2011-04-27 09:05:53 -070022class Daemon {
23 public:
Darin Petkova7b89492011-07-27 12:48:17 -070024 Daemon(Config *config, ControlInterface *control);
Paul Stewart75897df2011-04-27 09:05:53 -070025 ~Daemon();
Darin Petkov633ac6f2011-07-08 13:56:13 -070026
mukesh agrawal8f317b62011-07-15 11:53:23 -070027 void AddDeviceToBlackList(const std::string &device_name);
Paul Stewart75897df2011-04-27 09:05:53 -070028 void Run();
29
30 private:
Darin Petkov633ac6f2011-07-08 13:56:13 -070031 friend class ShillDaemonTest;
32
Darin Petkova7b89492011-07-27 12:48:17 -070033 void Start();
Darin Petkov633ac6f2011-07-08 13:56:13 -070034
Paul Stewart75897df2011-04-27 09:05:53 -070035 Config *config_;
36 ControlInterface *control_;
37 Manager manager_;
38 EventDispatcher dispatcher_;
Darin Petkov633ac6f2011-07-08 13:56:13 -070039 Sockets sockets_;
Darin Petkova7b89492011-07-27 12:48:17 -070040 GLib glib_;
41 ProxyFactory proxy_factory_;
Paul Stewart75897df2011-04-27 09:05:53 -070042};
43
44} // namespace shill
45
Darin Petkov633ac6f2011-07-08 13:56:13 -070046#endif // SHILL_DAEMON_H_