xref: /openbmc/phosphor-psu-code-mgmt/src/association_interface.hpp (revision 66a54ad41b40d019f52ff15866d249962b5c3f88)
17f2a2152SLei YU #pragma once
27f2a2152SLei YU 
37f2a2152SLei YU #include <string>
47f2a2152SLei YU 
57f2a2152SLei YU class AssociationInterface
67f2a2152SLei YU {
77f2a2152SLei YU   public:
8*66a54ad4SGeorge Liu     AssociationInterface() = default;
9*66a54ad4SGeorge Liu     AssociationInterface(const AssociationInterface&) = delete;
10*66a54ad4SGeorge Liu     AssociationInterface& operator=(const AssociationInterface&) = delete;
11*66a54ad4SGeorge Liu     AssociationInterface(AssociationInterface&&) = delete;
12*66a54ad4SGeorge Liu     AssociationInterface& operator=(AssociationInterface&&) = delete;
13*66a54ad4SGeorge Liu 
147f2a2152SLei YU     virtual ~AssociationInterface() = default;
157f2a2152SLei YU 
167f2a2152SLei YU     /** @brief Create an active association to the
177f2a2152SLei YU      *  newly active software image
187f2a2152SLei YU      *
197f2a2152SLei YU      * @param[in]  path - The path to create the association to.
207f2a2152SLei YU      */
217f2a2152SLei YU     virtual void createActiveAssociation(const std::string& path) = 0;
227f2a2152SLei YU 
237f2a2152SLei YU     /** @brief Add the functional association to the
247f2a2152SLei YU      *  new "running" PSU images
257f2a2152SLei YU      *
267f2a2152SLei YU      * @param[in]  path - The path to add the association to.
277f2a2152SLei YU      */
287f2a2152SLei YU     virtual void addFunctionalAssociation(const std::string& path) = 0;
297f2a2152SLei YU 
30a8b966f1SLei YU     /** @brief Add the updateable association to the
31a8b966f1SLei YU      *  "running" PSU software image
32a8b966f1SLei YU      *
33a8b966f1SLei YU      * @param[in]  path - The path to create the association.
34a8b966f1SLei YU      */
35a8b966f1SLei YU     virtual void addUpdateableAssociation(const std::string& path) = 0;
36a8b966f1SLei YU 
377f2a2152SLei YU     /** @brief Remove the associations from the provided software image path
387f2a2152SLei YU      *
397f2a2152SLei YU      * @param[in]  path - The path to remove the association from.
407f2a2152SLei YU      */
417f2a2152SLei YU     virtual void removeAssociation(const std::string& path) = 0;
427f2a2152SLei YU };
43