shill: Start a mockable GLib interface.
Use the interface to test DHCPConfig::Start.
BUG=chromium-os:16319,chromium-os:16013
TEST=unit test, tested on device
Change-Id: Ice6c65b0cc2ac2dd738cb6aacb426703cce48a3f
Reviewed-on: http://gerrit.chromium.org/gerrit/2356
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Chris Masone <cmasone@chromium.org>
diff --git a/glib.h b/glib.h
new file mode 100644
index 0000000..274d3a2
--- /dev/null
+++ b/glib.h
@@ -0,0 +1,27 @@
+// Copyright (c) 2011 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.
+
+#ifndef SHILL_GLIB_H_
+#define SHILL_GLIB_H_
+
+#include "shill/glib_interface.h"
+
+namespace shill {
+
+// A concrete implementation of the GLib interface.
+class GLib : public GLibInterface {
+ public:
+ virtual gboolean SpawnAsync(const gchar *working_directory,
+ gchar **argv,
+ gchar **envp,
+ GSpawnFlags flags,
+ GSpawnChildSetupFunc child_setup,
+ gpointer user_data,
+ GPid *child_pid,
+ GError **error);
+};
+
+} // namespace shill
+
+#endif // SHILL_GLIB_H_