blob: 49f8937781efbe49bc4d454e536e4963d6882664 [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();
Thieu Le1271d682011-11-02 22:48:19 +000028 void Quit();
Paul Stewart75897df2011-04-27 09:05:53 -070029
30 private:
Darin Petkov633ac6f2011-07-08 13:56:13 -070031 friend class ShillDaemonTest;
32
Darin Petkova7b89492011-07-27 12:48:17 -070033 void Start();
Thieu Le1271d682011-11-02 22:48:19 +000034 void Stop();
Darin Petkov633ac6f2011-07-08 13:56:13 -070035
Paul Stewart75897df2011-04-27 09:05:53 -070036 Config *config_;
37 ControlInterface *control_;
38 Manager manager_;
39 EventDispatcher dispatcher_;
Darin Petkov633ac6f2011-07-08 13:56:13 -070040 Sockets sockets_;
Darin Petkova7b89492011-07-27 12:48:17 -070041 GLib glib_;
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_