ImagingTools Core SDK
CConversationCollectionControllerComp.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// ImtCore includes
5#include <imtchat/IConversation.h>
6#include <GeneratedFiles/imtchatsdl/SDL/1.0/CPP/ImtChat.h>
7
8
9namespace imtchatgql
10{
11
12
13class CConversationCollectionControllerComp:
14 public sdl::imtchat::ImtChat::CConversationCollectionControllerCompBase
15{
16public:
17 typedef sdl::imtchat::ImtChat::CConversationCollectionControllerCompBase BaseClass;
18
19 I_BEGIN_COMPONENT(CConversationCollectionControllerComp);
20 I_ASSIGN(m_conversationFactCompPtr, "ConversationFactory", "Factory for creating conversation instances", true, "ConversationFactory");
21 I_END_COMPONENT;
22
23protected:
24 // reimplemented (sdl::imtchat::ImtChat::CConversationCollectionControllerCompBase)
25 virtual bool CreateRepresentationFromObject(
26 const imtbase::IObjectCollectionIterator& objectCollectionIterator,
27 const sdl::imtchat::ImtChat::CConversationsListGqlRequest& listRequest,
28 sdl::imtchat::ImtChat::CConversationItemData::V1_0& representationObject,
29 QString& errorMessage) const override;
30 virtual istd::IChangeableUniquePtr CreateObjectFromRepresentation(
31 const sdl::imtchat::ImtChat::CConversationData::V1_0& dataRepresentation,
32 QByteArray& newObjectId,
33 QString& errorMessage) const override;
34 virtual bool CreateRepresentationFromObject(
35 const istd::IChangeable& data,
36 const sdl::imtchat::ImtChat::CConversationItemGqlRequest& itemRequest,
37 sdl::imtchat::ImtChat::CConversationData::V1_0& representationPayload,
38 QString& errorMessage) const override;
39 virtual bool UpdateObjectFromRepresentationRequest(
40 const imtgql::CGqlRequest& rawGqlRequest,
41 const sdl::imtchat::ImtChat::CConversationUpdateGqlRequest& updateRequest,
42 istd::IChangeable& object,
43 QString& errorMessage) const override;
44
45private:
46 bool FillObjectFromRepresentation(
47 const sdl::imtchat::ImtChat::CConversationData::V1_0& representation,
48 istd::IChangeable& object,
49 QByteArray& objectId,
50 QString& errorMessage) const;
51
52protected:
53 I_FACT(imtchat::IConversation, m_conversationFactCompPtr);
54};
55
56
57} // namespace imtchatgql
Chat GraphQL API Layer Module.