shill: Add connection class

The connection class represents the snapshot of connectivity
state, including routing, address information and addressing.
It is able to apply itself as the "default" connection, by
setting routing table metrics and DNS resolver files.

BUG=chromium-os:19095
TEST=New unittest

Change-Id: I7021867ed8a8559db0e84f58a72692abaf105cad
Reviewed-on: http://gerrit.chromium.org/gerrit/5938
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/mock_resolver.h b/mock_resolver.h
new file mode 100644
index 0000000..ba8f67e
--- /dev/null
+++ b/mock_resolver.h
@@ -0,0 +1,25 @@
+// 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_MOCK_RESOLVER_H_
+#define SHILL_MOCK_RESOLVER_H_
+
+#include <gmock/gmock.h>
+
+#include "shill/resolver.h"
+
+namespace shill {
+
+class MockResolver : public Resolver {
+ public:
+  MOCK_METHOD1(SetDNSFromIPConfig, bool(const IPConfigRefPtr &ipconfig));
+  MOCK_METHOD2(SetDNSFromLists,
+               bool(const std::vector<std::string> &dns_servers,
+                    const std::vector<std::string> &domain_search));
+  MOCK_METHOD0(ClearDNS, bool());
+};
+
+}  // namespace shill
+
+#endif  // SHILL_MOCK_RESOLVER_H_