OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include <stdio.h> |
| 6 #include <glib.h> |
| 7 |
| 8 #include <algorithm> |
| 9 #include <string> |
| 10 #include <vector> |
| 11 |
| 12 #include "shill/shill_logging.h" |
| 13 #include "shill/shill_daemon.h" |
| 14 #include "shill/control_interface.h" |
| 15 #include "shill/dbus_control.h" |
| 16 |
| 17 using std::max; |
| 18 using std::min; |
| 19 using std::string; |
| 20 using std::vector; |
| 21 |
| 22 namespace shill { |
| 23 |
| 24 static const char kTaggedFilePath[] = "/var/lib/shill"; |
| 25 |
| 26 // Daemon: Main for connection manager. Starts main process and holds event |
| 27 // loop. |
| 28 |
| 29 Daemon::Daemon(Config *config, ControlInterface *control) |
| 30 : config_(config), |
| 31 control_(control), |
| 32 manager_(control_, &dispatcher_) { } |
| 33 Daemon::~Daemon() {} |
| 34 |
| 35 |
| 36 void Daemon::Run() { |
| 37 GMainLoop* loop = g_main_loop_new(NULL, false); |
| 38 SHILL_LOG(INFO, SHILL_LOG_DAEMON) << "Running main loop."; |
| 39 g_main_loop_run(loop); |
| 40 } |
| 41 |
| 42 |
| 43 } // namespace shill |
OLD | NEW |