types: move common types into types header

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8e6f6fbae784a8ceebcc83ac53c1beb5c7b46779
diff --git a/include/commandutils.hpp b/include/commandutils.hpp
index 7898be3..7ed49c8 100644
--- a/include/commandutils.hpp
+++ b/include/commandutils.hpp
@@ -54,17 +54,3 @@
                   << netfn << "], Cmd:[0x" << cmd << "]\n";
     }
 }
-
-namespace ipmi
-{
-using Association = std::tuple<std::string, std::string, std::string>;
-
-using DbusVariant =
-    std::variant<std::string, bool, uint8_t, uint16_t, int16_t, uint32_t,
-                 int32_t, uint64_t, int64_t, double, std::vector<Association>>;
-using GetSubTreeType = std::vector<
-    std::pair<std::string,
-              std::vector<std::pair<std::string, std::vector<std::string>>>>>;
-
-using SensorMap = std::map<std::string, std::map<std::string, DbusVariant>>;
-} // namespace ipmi
diff --git a/include/sdrutils.hpp b/include/sdrutils.hpp
index 055043a..b3d7689 100644
--- a/include/sdrutils.hpp
+++ b/include/sdrutils.hpp
@@ -15,6 +15,7 @@
 */
 
 #include "commandutils.hpp"
+#include "types.hpp"
 
 #include <boost/algorithm/string.hpp>
 #include <boost/bimap.hpp>
diff --git a/include/types.hpp b/include/types.hpp
new file mode 100644
index 0000000..2f65646
--- /dev/null
+++ b/include/types.hpp
@@ -0,0 +1,41 @@
+/*
+// Copyright (c) 2017 2018 Intel Corporation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+*/
+
+#pragma once
+
+#include <map>
+#include <string>
+#include <tuple>
+#include <utility>
+#include <variant>
+#include <vector>
+
+namespace ipmi
+{
+
+using Association = std::tuple<std::string, std::string, std::string>;
+
+using DbusVariant =
+    std::variant<std::string, bool, uint8_t, uint16_t, int16_t, uint32_t,
+                 int32_t, uint64_t, int64_t, double, std::vector<Association>>;
+
+using GetSubTreeType = std::vector<
+    std::pair<std::string,
+              std::vector<std::pair<std::string, std::vector<std::string>>>>>;
+
+using SensorMap = std::map<std::string, std::map<std::string, DbusVariant>>;
+
+} // namespace ipmi
diff --git a/src/firmware-update.cpp b/src/firmware-update.cpp
index 04ed4e9..8c3cc94 100644
--- a/src/firmware-update.cpp
+++ b/src/firmware-update.cpp
@@ -19,6 +19,7 @@
 #include <sdbusplus/bus/match.hpp>
 #include <sdbusplus/server/object.hpp>
 #include <sdbusplus/timer.hpp>
+#include <types.hpp>
 
 #include <chrono>
 #include <cstdint>
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index 9e05308..f532884 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -14,6 +14,7 @@
 // limitations under the License.
 */
 
+#include "types.hpp"
 #include "xyz/openbmc_project/Common/error.hpp"
 #include "xyz/openbmc_project/Led/Physical/server.hpp"
 
diff --git a/src/sensorcommands.cpp b/src/sensorcommands.cpp
index a226cb9..06b4374 100644
--- a/src/sensorcommands.cpp
+++ b/src/sensorcommands.cpp
@@ -21,6 +21,7 @@
 #include "sdrutils.hpp"
 #include "sensorutils.hpp"
 #include "storagecommands.hpp"
+#include "types.hpp"
 
 #include <boost/algorithm/string.hpp>
 #include <boost/container/flat_map.hpp>
diff --git a/src/storagecommands.cpp b/src/storagecommands.cpp
index 68e3c04..1887581 100644
--- a/src/storagecommands.cpp
+++ b/src/storagecommands.cpp
@@ -19,6 +19,7 @@
 #include "commandutils.hpp"
 #include "ipmi_to_redfish_hooks.hpp"
 #include "sdrutils.hpp"
+#include "types.hpp"
 
 #include <boost/algorithm/string.hpp>
 #include <boost/container/flat_map.hpp>