ImagingTools Core SDK
CPermissionsProviderComp.h
1// SPDX-License-Identifier: LGPL-2.1-or-later OR GPL-2.0-or-later OR GPL-3.0-or-later OR LicenseRef-ImtCore-Commercial
2#pragma once
3
4
5// Qt includes
6#include <QtCore/QJsonObject>
7
8// ImtCore includes
9#include <imtbase/CTreeItemModel.h>
10#include <imtlic/IProductInfo.h>
11#include <imtlic/CFeatureInfo.h>
12#include <imtservergql/CGqlRequestHandlerCompBase.h>
13
14
15namespace imtlicgql
16{
17
18
19class CPermissionsProviderComp: public imtservergql::CGqlRequestHandlerCompBase
20{
21public:
22 typedef imtservergql::CGqlRequestHandlerCompBase BaseClass;
23
24 I_BEGIN_COMPONENT(CPermissionsProviderComp)
25 I_ASSIGN(m_productInfoCompPtr, "FeatureContainer", "Feature container", true, "FeatureContainer");
26 I_END_COMPONENT
27
28protected:
29 bool CreateRepresentationModelFromFeatureInfo(
30 const imtlic::CFeatureInfo& featureInfo,
31 imtbase::CTreeItemModel& representationModel,
32 const QByteArray& languageId,
33 QString& errorMessage) const;
34
35 // reimplemented (imtservergql::CGqlRequestHandlerCompBase)
36 virtual QJsonObject CreateInternalResponse(const imtgql::CGqlRequest& gqlRequest, QString& errorMessage) const override;
37
38protected:
39 I_REF(imtlic::IProductInfo, m_productInfoCompPtr);
40};
41
42
43} // namespace imtlicgql
44
45
Interface for accessing information about a product (software or hardware).
GraphQL API interface layer for the licensing domain model.