summaryrefslogtreecommitdiffstats
path: root/xyz/openbmc_project/Led
diff options
context:
space:
mode:
authorVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2016-11-29 23:02:06 +0530
committerVishwanatha Subbanna <vishwa@linux.vnet.ibm.com>2016-12-15 11:05:43 +0530
commit4c8c72bc9131a0ad6a9685678528d95afc7c6a9a (patch)
tree0a188095e165d8da69c68c3c1bb4efa19999ea6f /xyz/openbmc_project/Led
parentbb8fe0b6e025aaff1b0f0360cf4ddb35f3d0912d (diff)
downloadphosphor-led-manager-4c8c72bc9131a0ad6a9685678528d95afc7c6a9a.tar.gz
phosphor-led-manager-4c8c72bc9131a0ad6a9685678528d95afc7c6a9a.zip
Use generated bindings for Led Group manager
This extends generated sdbusplus interface and provides implementation for handling LED group operations. Change-Id: I9e6f83f2f801de24d33937bc651228b1c0ccdc37 Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
Diffstat (limited to 'xyz/openbmc_project/Led')
-rw-r--r--xyz/openbmc_project/Led/Group/server.hpp77
1 files changed, 77 insertions, 0 deletions
diff --git a/xyz/openbmc_project/Led/Group/server.hpp b/xyz/openbmc_project/Led/Group/server.hpp
new file mode 100644
index 0000000..9f5a796
--- /dev/null
+++ b/xyz/openbmc_project/Led/Group/server.hpp
@@ -0,0 +1,77 @@
+#pragma once
+#include <tuple>
+#include <systemd/sd-bus.h>
+#include <sdbusplus/server.hpp>
+
+namespace sdbusplus
+{
+namespace xyz
+{
+namespace openbmc_project
+{
+namespace Led
+{
+namespace server
+{
+
+class Group
+{
+ public:
+ /* Define all of the basic class operations:
+ * Not allowed:
+ * - Default constructor to avoid nullptrs.
+ * - Copy operations due to internal unique_ptr.
+ * Allowed:
+ * - Move operations.
+ * - Destructor.
+ */
+ Group() = delete;
+ Group(const Group&) = delete;
+ Group& operator=(const Group&) = delete;
+ Group(Group&&) = default;
+ Group& operator=(Group&&) = default;
+ virtual ~Group() = default;
+
+ /** @brief Constructor to put object onto bus at a dbus path.
+ * @param[in] bus - Bus to attach to.
+ * @param[in] path - Path to attach at.
+ */
+ Group(bus::bus& bus, const char* path);
+
+
+
+
+ /** Get value of Asserted */
+ virtual bool asserted() const;
+ /** Set value of Asserted */
+ virtual bool asserted(bool value);
+
+
+ private:
+
+ /** @brief sd-bus callback for get-property 'Asserted' */
+ static int _callback_get_Asserted(
+ sd_bus*, const char*, const char*, const char*,
+ sd_bus_message*, void*, sd_bus_error*);
+ /** @brief sd-bus callback for set-property 'Asserted' */
+ static int _callback_set_Asserted(
+ sd_bus*, const char*, const char*, const char*,
+ sd_bus_message*, void*, sd_bus_error*);
+
+
+ static constexpr auto _interface = "xyz.openbmc_project.Led.Group";
+ static const vtable::vtable_t _vtable[];
+ sdbusplus::server::interface::interface
+ _xyz_openbmc_project_Led_Group_interface;
+
+ bool _asserted{};
+
+};
+
+
+} // namespace server
+} // namespace Led
+} // namespace openbmc_project
+} // namespace xyz
+} // namespace sdbusplus
+
OpenPOWER on IntegriCloud