shill: Implement a basic IPConfig class.

Different IP configuration types will inherit from that class -- e.g., DHCP
clients, PPP, etc.

BUG=chromium-os:15953
TEST=unit test

Change-Id: Id6ba4559afdf0b10dac43fed55ab51d272aeb4df
Reviewed-on: http://gerrit.chromium.org/gerrit/1852
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
diff --git a/ipconfig.h b/ipconfig.h
new file mode 100644
index 0000000..3d5bd31
--- /dev/null
+++ b/ipconfig.h
@@ -0,0 +1,37 @@
+// 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_IPCONFIG_
+#define SHILL_IPCONFIG_
+
+#include <string>
+
+#include <base/memory/ref_counted.h>
+
+namespace shill {
+
+class Device;
+
+// IPConfig superclass. Individual IP configuration types will inherit from this
+// class.
+class IPConfig : public base::RefCounted<IPConfig> {
+ public:
+  explicit IPConfig(const Device *device);
+  virtual ~IPConfig();
+
+  const Device *device() const { return device_; }
+
+  const std::string &GetDeviceName() const;
+
+ private:
+  friend class base::RefCounted<IPConfig>;
+
+  const Device *device_;
+
+  DISALLOW_COPY_AND_ASSIGN(IPConfig);
+};
+
+}  // namespace shill
+
+#endif  // SHILL_IPCONFIG_