libcamera: controls: Make ControList constructor public

We need to construct empty ControlList objects to serialization. Make
the constructor public.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
This commit is contained in:
Laurent Pinchart 2019-10-26 20:37:09 +03:00
parent 81493f36e1
commit 113cfb1e08
2 changed files with 12 additions and 0 deletions

View file

@ -189,6 +189,7 @@ private:
using ControlListMap = std::unordered_map<unsigned int, ControlValue>; using ControlListMap = std::unordered_map<unsigned int, ControlValue>;
public: public:
ControlList();
ControlList(const ControlIdMap &idmap, ControlValidator *validator = nullptr); ControlList(const ControlIdMap &idmap, ControlValidator *validator = nullptr);
ControlList(const ControlInfoMap &info, ControlValidator *validator = nullptr); ControlList(const ControlInfoMap &info, ControlValidator *validator = nullptr);

View file

@ -590,6 +590,17 @@ void ControlInfoMap::generateIdmap()
* controls. * controls.
*/ */
/**
* \brief Construct a ControlList not associated with any object
*
* This constructor is meant to support ControlList serialization and shall not
* be used directly by application.
*/
ControlList::ControlList()
: validator_(nullptr), idmap_(nullptr)
{
}
/** /**
* \brief Construct a ControlList with an optional control validator * \brief Construct a ControlList with an optional control validator
* \param[in] idmap The ControlId map for the control list target object * \param[in] idmap The ControlId map for the control list target object