control: Use Group objects in events

Use the generated Group objects in configured events. Group objects are
temporarily generated from the `groups.json` configuration and passed to
each event. When the event is generated from its JSON configuration, the
group(s) its configured to use in the event are first copied from the
list of Group objects and then populated with the remaining details for
the group configuration that's provided in the event. Groups to be used
in the event must either have no profiles restricting their use or have
a profile that matches the event's profile where that profile is also
active.

Change-Id: Ifda7493ab256fa2fbf869e984609888c418b1f9b
Signed-off-by: Matthew Barth <msbarth@us.ibm.com>
diff --git a/control/json/group.hpp b/control/json/group.hpp
index 6b30b9f..8e931e5 100644
--- a/control/json/group.hpp
+++ b/control/json/group.hpp
@@ -45,7 +45,6 @@
     static constexpr auto confFileName = "groups.json";
 
     Group() = delete;
-    Group(const Group&) = delete;
     Group(Group&&) = delete;
     Group& operator=(const Group&) = delete;
     Group& operator=(Group&&) = delete;
@@ -60,6 +59,14 @@
     Group(const json& jsonObj);
 
     /**
+     * Copy Constructor
+     * Creates a group from another group's originally parsed JSON object data
+     *
+     * @param[in] origObj - Original Group object to be created from
+     */
+    Group(const Group& origObj);
+
+    /**
      * @brief Get the members
      *
      * @return List of dbus paths representing the members of the group
@@ -111,6 +118,38 @@
         return _property;
     }
 
+    /**
+     * @brief Set the dbus property's data type for the group
+     */
+    inline void setType(std::optional<std::string>& type)
+    {
+        _type = type;
+    }
+
+    /**
+     * @brief Get the group's dbus property's data type
+     */
+    inline const auto& getType() const
+    {
+        return _type;
+    }
+
+    /**
+     * @brief Set the dbus property's expected value for the group
+     */
+    inline void setValue(std::optional<PropertyVariantType>& value)
+    {
+        _value = value;
+    }
+
+    /**
+     * @brief Get the group's dbus property's expected value
+     */
+    inline const auto& getValue() const
+    {
+        return _value;
+    }
+
   private:
     /* Members of the group */
     std::vector<std::string> _members;
@@ -124,6 +163,12 @@
     /* Dbus property name for all the members */
     std::string _property;
 
+    /* Optional property's data type for all members */
+    std::optional<std::string> _type;
+
+    /* Optional property value for all the members */
+    std::optional<PropertyVariantType> _value;
+
     /**
      * @brief Parse and set the members list
      *