shill: Add Nl80211Attribute type.

This checkin is just a framework for the Nl80211Attribute type.
The Nl80211Attribute type encapsulates each attribute in an object.
This will enable the creation of an AttributeList type that can
encapsulate an arbitrary number of levels of nested attributes.

The next checkin includes all the types and all the attributes
necessary to use Nl80211Attribute.  It also passes unittests.

BUG=chromium-os:36637
TEST=unittests.

Change-Id: Ide967812e5286526d37f3ac5d478ab5a4c358bd6
Reviewed-on: https://gerrit.chromium.org/gerrit/38973
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Ready: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
diff --git a/user_bound_nlmessage.h b/user_bound_nlmessage.h
index a15e61a..f11c90b 100644
--- a/user_bound_nlmessage.h
+++ b/user_bound_nlmessage.h
@@ -17,6 +17,8 @@
 
 #include <linux/nl80211.h>
 
+#include "shill/nl80211_attribute.h"
+
 struct nlattr;
 struct nlmsghdr;
 
@@ -25,20 +27,6 @@
 // Class for messages received from libnl.
 class UserBoundNlMessage {
  public:
-  enum Type {
-    kTypeUnspecified,
-    kTypeU8,
-    kTypeU16,
-    kTypeU32,
-    kTypeU64,
-    kTypeString,
-    kTypeFlag,
-    kTypeMsecs,
-    kTypeNested,
-    kTypeOther,  // Specified in the message but not listed, here.
-    kTypeError
-  };
-
   // TODO(wdg): break 'Attribute' into its own class to handle
   // nested attributes better.
 
@@ -98,7 +86,7 @@
   uint32_t GetId() const;
 
   // Returns the data type of a given attribute.
-  Type GetAttributeType(nl80211_attrs name) const;
+  Nl80211Attribute::Type GetAttributeType(nl80211_attrs name) const;
 
   // Returns a string describing the data type of a given attribute.
   std::string GetAttributeTypeString(nl80211_attrs name) const;