Inventory.Source: Add DevicePresence interface

Dbus interface needed for the gpio hw inventory design [1].

This interface allows to use the presence of any device to be used as an
inventory source. The motivating use-case is for hardware detected via
gpios.

[1] https://github.com/openbmc/docs/blob/abbf7355231fbd9d5231e136780c167f2a89494e/designs/inventory/gpio-based-hardware-inventory.md

Change-Id: I2d4a80498acbca46c834d2c3f093098098415a35
Signed-off-by: Alexander Hansen <alexander.hansen@9elements.com>
diff --git a/gen/xyz/openbmc_project/Inventory/Source/DevicePresence/meson.build b/gen/xyz/openbmc_project/Inventory/Source/DevicePresence/meson.build
new file mode 100644
index 0000000..98bd057
--- /dev/null
+++ b/gen/xyz/openbmc_project/Inventory/Source/DevicePresence/meson.build
@@ -0,0 +1,35 @@
+# Generated file; do not modify.
+
+sdbusplus_current_path = 'xyz/openbmc_project/Inventory/Source/DevicePresence'
+
+generated_sources += custom_target(
+    'xyz/openbmc_project/Inventory/Source/DevicePresence__cpp'.underscorify(),
+    input: [
+        '../../../../../../yaml/xyz/openbmc_project/Inventory/Source/DevicePresence.interface.yaml',
+    ],
+    output: [
+        'common.hpp',
+        'server.hpp',
+        'server.cpp',
+        'aserver.hpp',
+        'client.hpp',
+    ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'cpp',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../../yaml',
+        'xyz/openbmc_project/Inventory/Source/DevicePresence',
+    ],
+    install: should_generate_cpp,
+    install_dir: [
+        get_option('includedir') / sdbusplus_current_path,
+        get_option('includedir') / sdbusplus_current_path,
+        false,
+        get_option('includedir') / sdbusplus_current_path,
+        get_option('includedir') / sdbusplus_current_path,
+    ],
+    build_by_default: should_generate_cpp,
+)
+
diff --git a/gen/xyz/openbmc_project/Inventory/Source/meson.build b/gen/xyz/openbmc_project/Inventory/Source/meson.build
index 9886b30..26cf0c3 100644
--- a/gen/xyz/openbmc_project/Inventory/Source/meson.build
+++ b/gen/xyz/openbmc_project/Inventory/Source/meson.build
@@ -1,2 +1,23 @@
 # Generated file; do not modify.
+subdir('DevicePresence')
 subdir('PLDM')
+
+sdbusplus_current_path = 'xyz/openbmc_project/Inventory/Source'
+
+generated_markdown += custom_target(
+    'xyz/openbmc_project/Inventory/Source/DevicePresence__markdown'.underscorify(),
+    input: [ '../../../../../yaml/xyz/openbmc_project/Inventory/Source/DevicePresence.interface.yaml',  ],
+    output: [ 'DevicePresence.md' ],
+    depend_files: sdbusplusplus_depfiles,
+    command: [
+        sdbuspp_gen_meson_prog, '--command', 'markdown',
+        '--output', meson.current_build_dir(),
+        '--tool', sdbusplusplus_prog,
+        '--directory', meson.current_source_dir() / '../../../../../yaml',
+        'xyz/openbmc_project/Inventory/Source/DevicePresence',
+    ],
+    install: should_generate_markdown,
+    install_dir: [inst_markdown_dir / sdbusplus_current_path],
+    build_by_default: should_generate_markdown,
+)
+
diff --git a/yaml/xyz/openbmc_project/Inventory/Source/DevicePresence.interface.yaml b/yaml/xyz/openbmc_project/Inventory/Source/DevicePresence.interface.yaml
new file mode 100644
index 0000000..9b679c6
--- /dev/null
+++ b/yaml/xyz/openbmc_project/Inventory/Source/DevicePresence.interface.yaml
@@ -0,0 +1,10 @@
+description: >
+    Information for a daemon to expose if hardware has been detected based on
+    xyz.openbmc_project.Configuration.GPIODeviceDetect interface
+
+properties:
+    - name: Name
+      type: string
+      description: >
+          Used by entity-manager to identify which hw was detected. For internal
+          use by entity-manager.