Add Connector.Slot interface to CPU and DIMM

Processor and memory present in SMBIOS tables(type 4 an type 17) are
socketed and replaceable. It is desirable to have the
xyz.openbmc_project.Inventory.Connector.Slot interface, which
differentiates from embedded items that have
xyz.openbmc_project.Inventory.Connector.Embedded interface.

Tested:
Cpu and memory DBus objects show
xyz.openbmc_project.Inventory.Connector.Slot interface.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I8cc24347ee62a7a077a2ac757863ac9895f807e5
diff --git a/include/cpu.hpp b/include/cpu.hpp
index 96cb367..395d528 100644
--- a/include/cpu.hpp
+++ b/include/cpu.hpp
@@ -17,6 +17,7 @@
 #pragma once
 #include "smbios_mdrv2.hpp"
 
+#include <xyz/openbmc_project/Inventory/Connector/Slot/server.hpp>
 #include <xyz/openbmc_project/Inventory/Decorator/Asset/server.hpp>
 #include <xyz/openbmc_project/Inventory/Decorator/LocationCode/server.hpp>
 #include <xyz/openbmc_project/Inventory/Decorator/Revision/server.hpp>
@@ -35,6 +36,8 @@
     sdbusplus::xyz::openbmc_project::Inventory::Decorator::server::Asset;
 using location =
     sdbusplus::xyz::openbmc_project::Inventory::Decorator::server::LocationCode;
+using connector =
+    sdbusplus::xyz::openbmc_project::Inventory::Connector::server::Slot;
 using processor = sdbusplus::xyz::openbmc_project::Inventory::Item::server::Cpu;
 using Item = sdbusplus::xyz::openbmc_project::Inventory::server::Item;
 
@@ -93,7 +96,9 @@
                          std::nullopt,
                          std::nullopt};
 
-class Cpu : sdbusplus::server::object_t<processor, asset, location, rev, Item>
+class Cpu :
+    sdbusplus::server::object_t<processor, asset, location, connector, rev,
+                                Item>
 {
   public:
     Cpu() = delete;
@@ -105,8 +110,8 @@
 
     Cpu(sdbusplus::bus::bus& bus, const std::string& objPath,
         const uint8_t& cpuId, uint8_t* smbiosTableStorage) :
-        sdbusplus::server::object_t<processor, asset, location, rev, Item>(
-            bus, objPath.c_str()),
+        sdbusplus::server::object_t<processor, asset, location, connector, rev,
+                                    Item>(bus, objPath.c_str()),
         cpuNum(cpuId), storage(smbiosTableStorage)
     {
         infoUpdate();