summaryrefslogtreecommitdiffstats
path: root/xyz
diff options
context:
space:
mode:
authorGunnar Mills <gmills@us.ibm.com>2017-01-31 21:44:36 -0600
committerGunnar Mills <gmills@us.ibm.com>2017-02-14 11:53:35 -0600
commit32159fb9a2a1b365e72372d1b72a8bbf0ed7412a (patch)
tree83ac79112aa33bb489fbf5fa48373dedf7dbcba0 /xyz
parent89484c790a1931ba3caa3a52f2fa02d5ab1f7007 (diff)
downloadphosphor-bmc-code-mgmt-32159fb9a2a1b365e72372d1b72a8bbf0ed7412a.tar.gz
phosphor-bmc-code-mgmt-32159fb9a2a1b365e72372d1b72a8bbf0ed7412a.zip
Use phosphor-dbus-interfaces directly
Change-Id: I6d65c4a582115a1280ed705eb33f6c354d001f21 Signed-off-by: Gunnar Mills <gmills@us.ibm.com>
Diffstat (limited to 'xyz')
-rw-r--r--xyz/openbmc_project/Software/Activation/server.hpp136
-rwxr-xr-xxyz/openbmc_project/Software/Version/server.hpp115
2 files changed, 0 insertions, 251 deletions
diff --git a/xyz/openbmc_project/Software/Activation/server.hpp b/xyz/openbmc_project/Software/Activation/server.hpp
deleted file mode 100644
index 011d202..0000000
--- a/xyz/openbmc_project/Software/Activation/server.hpp
+++ /dev/null
@@ -1,136 +0,0 @@
-#pragma once
-#include <tuple>
-#include <systemd/sd-bus.h>
-#include <sdbusplus/server.hpp>
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace server
-{
-
-class Activation
-{
- public:
- /* Define all of the basic class operations:
- * Not allowed:
- * - Default constructor to avoid nullptrs.
- * - Copy operations due to internal unique_ptr.
- * - Move operations due to 'this' being registered as the
- * 'context' with sdbus.
- * Allowed:
- * - Destructor.
- */
- Activation() = delete;
- Activation(const Activation&) = delete;
- Activation& operator=(const Activation&) = delete;
- Activation(Activation&&) = delete;
- Activation& operator=(Activation&&) = delete;
- virtual ~Activation() = 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.
- */
- Activation(bus::bus& bus, const char* path);
-
- enum class Activations
- {
- NotReady,
- Invalid,
- Ready,
- Activating,
- Active,
- Failed,
- };
- enum class RequestedActivations
- {
- None,
- Active,
- };
-
-
-
- /** Get value of Activation */
- virtual Activations activation() const;
- /** Set value of Activation */
- virtual Activations activation(Activations value);
- /** Get value of RequestedActivation */
- virtual RequestedActivations requestedActivation() const;
- /** Set value of RequestedActivation */
- virtual RequestedActivations requestedActivation(RequestedActivations value);
-
- /** @brief Convert a string to an appropriate enum value.
- * @param[in] s - The string to convert in the form of
- * "xyz.openbmc_project.Software.Activation.<value name>"
- * @return - The enum value.
- */
- static Activations convertActivationsFromString(std::string& s);
- /** @brief Convert a string to an appropriate enum value.
- * @param[in] s - The string to convert in the form of
- * "xyz.openbmc_project.Software.Activation.<value name>"
- * @return - The enum value.
- */
- static RequestedActivations convertRequestedActivationsFromString(std::string& s);
-
- private:
-
- /** @brief sd-bus callback for get-property 'Activation' */
- static int _callback_get_Activation(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
- /** @brief sd-bus callback for set-property 'Activation' */
- static int _callback_set_Activation(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
-
- /** @brief sd-bus callback for get-property 'RequestedActivation' */
- static int _callback_get_RequestedActivation(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
- /** @brief sd-bus callback for set-property 'RequestedActivation' */
- static int _callback_set_RequestedActivation(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
-
-
- static constexpr auto _interface = "xyz.openbmc_project.Software.Activation";
- static const vtable::vtable_t _vtable[];
- sdbusplus::server::interface::interface
- _xyz_openbmc_project_Software_Activation_interface;
-
- Activations _activation{};
- RequestedActivations _requestedActivation{};
-
-};
-
-/* Specialization of sdbusplus::server::bindings::details::convertForMessage
- * for enum-type Activation::Activations.
- *
- * This converts from the enum to a constant c-string representing the enum.
- *
- * @param[in] e - Enum value to convert.
- * @return C-string representing the name for the enum value.
- */
-std::string convertForMessage(Activation::Activations e);
-/* Specialization of sdbusplus::server::bindings::details::convertForMessage
- * for enum-type Activation::RequestedActivations.
- *
- * This converts from the enum to a constant c-string representing the enum.
- *
- * @param[in] e - Enum value to convert.
- * @return C-string representing the name for the enum value.
- */
-std::string convertForMessage(Activation::RequestedActivations e);
-
-} // namespace server
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
diff --git a/xyz/openbmc_project/Software/Version/server.hpp b/xyz/openbmc_project/Software/Version/server.hpp
deleted file mode 100755
index d92b48a..0000000
--- a/xyz/openbmc_project/Software/Version/server.hpp
+++ /dev/null
@@ -1,115 +0,0 @@
-#pragma once
-#include <tuple>
-#include <systemd/sd-bus.h>
-#include <sdbusplus/server.hpp>
-
-namespace sdbusplus
-{
-namespace xyz
-{
-namespace openbmc_project
-{
-namespace Software
-{
-namespace server
-{
-
-class Version
-{
- public:
- /* Define all of the basic class operations:
- * Not allowed:
- * - Default constructor to avoid nullptrs.
- * - Copy operations due to internal unique_ptr.
- * - Move operations due to 'this' being registered as the
- * 'context' with sdbus.
- * Allowed:
- * - Destructor.
- */
- Version() = delete;
- Version(const Version&) = delete;
- Version& operator=(const Version&) = delete;
- Version(Version&&) = delete;
- Version& operator=(Version&&) = delete;
- virtual ~Version() = 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.
- */
- Version(bus::bus& bus, const char* path);
-
- enum class VersionPurpose
- {
- Unknown,
- Other,
- System,
- BMC,
- Host,
- };
-
-
-
- /** Get value of Version */
- virtual std::string version() const;
- /** Set value of Version */
- virtual std::string version(std::string value);
- /** Get value of Purpose */
- virtual VersionPurpose purpose() const;
- /** Set value of Purpose */
- virtual VersionPurpose purpose(VersionPurpose value);
-
- /** @brief Convert a string to an appropriate enum value.
- * @param[in] s - The string to convert in the form of
- * "xyz.openbmc_project.Software.Version.<value name>"
- * @return - The enum value.
- */
- static VersionPurpose convertVersionPurposeFromString(std::string& s);
-
- private:
-
- /** @brief sd-bus callback for get-property 'Version' */
- static int _callback_get_Version(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
- /** @brief sd-bus callback for set-property 'Version' */
- static int _callback_set_Version(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
-
- /** @brief sd-bus callback for get-property 'Purpose' */
- static int _callback_get_Purpose(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
- /** @brief sd-bus callback for set-property 'Purpose' */
- static int _callback_set_Purpose(
- sd_bus*, const char*, const char*, const char*,
- sd_bus_message*, void*, sd_bus_error*);
-
-
- static constexpr auto _interface = "xyz.openbmc_project.Software.Version";
- static const vtable::vtable_t _vtable[];
- sdbusplus::server::interface::interface
- _xyz_openbmc_project_Software_Version_interface;
-
- std::string _version{};
- VersionPurpose _purpose{};
-
-};
-
-/* Specialization of sdbusplus::server::bindings::details::convertForMessage
- * for enum-type Version::VersionPurpose.
- *
- * This converts from the enum to a constant c-string representing the enum.
- *
- * @param[in] e - Enum value to convert.
- * @return C-string representing the name for the enum value.
- */
-std::string convertForMessage(Version::VersionPurpose e);
-
-} // namespace server
-} // namespace Software
-} // namespace openbmc_project
-} // namespace xyz
-} // namespace sdbusplus
-
OpenPOWER on IntegriCloud