Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(588)

Unified Diff: shill_daemon.cc

Issue 6575006: Add initial sketch to shill repository (Closed) Base URL: ssh://git@gitrw.chromium.org/shill.git@master
Patch Set: A few object renames and pointer conversions Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « shill_daemon.h ('k') | shill_event.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: shill_daemon.cc
diff --git a/shill_daemon.cc b/shill_daemon.cc
new file mode 100644
index 0000000000000000000000000000000000000000..91175bc68dc54be3dd34d2cf0f2f975da1b041c0
--- /dev/null
+++ b/shill_daemon.cc
@@ -0,0 +1,43 @@
+// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include <stdio.h>
+#include <glib.h>
+
+#include <algorithm>
+#include <string>
+#include <vector>
+
+#include "shill/shill_logging.h"
+#include "shill/shill_daemon.h"
+#include "shill/control_interface.h"
+#include "shill/dbus_control.h"
+
+using std::max;
+using std::min;
+using std::string;
+using std::vector;
+
+namespace shill {
+
+static const char kTaggedFilePath[] = "/var/lib/shill";
+
+// Daemon: Main for connection manager. Starts main process and holds event
+// loop.
+
+Daemon::Daemon(Config *config, ControlInterface *control)
+ : config_(config),
+ control_(control),
+ manager_(control_, &dispatcher_) { }
+Daemon::~Daemon() {}
+
+
+void Daemon::Run() {
+ GMainLoop* loop = g_main_loop_new(NULL, false);
+ SHILL_LOG(INFO, SHILL_LOG_DAEMON) << "Running main loop.";
+ g_main_loop_run(loop);
+}
+
+
+} // namespace shill
« no previous file with comments | « shill_daemon.h ('k') | shill_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698