shill: Add Technology class

Move Technology enum out into its own class, and create static
functions for converting between these and strings.

BUG=chromium-os:20114
TEST=Rerun unit tests

Change-Id: I9e3aea44e5d0b14d844328f023b01d7f8ea04c42
Reviewed-on: http://gerrit.chromium.org/gerrit/8204
Reviewed-by: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/technology.h b/technology.h
new file mode 100644
index 0000000..11d4b8b
--- /dev/null
+++ b/technology.h
@@ -0,0 +1,32 @@
+// 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_TECHNOLOGY_
+#define SHILL_TECHNOLOGY_
+
+#include <string>
+
+namespace shill {
+
+class Technology {
+ public:
+  enum Identifier {
+    kEthernet,
+    kWifi,
+    kCellular,
+    kBlacklisted,
+    kUnknown,
+    kNumTechnologies
+  };
+
+  static Identifier IdentifierFromName(const std::string &name);
+  static std::string NameFromIdentifier(Identifier id);
+
+ private:
+  static const char kUnknownName[];
+};
+
+}  // namespace shill
+
+#endif  // SHILL_TECHNOLOGY_