ImagingTools Core SDK
CCommandIdSubscriptionsMonitorComp.h
1#pragma once
2
3
4// Qt includes
5#include <QtCore/QByteArray>
6#include <QtCore/QByteArrayList>
7#include <QtCore/QMap>
8
9// ACF includes
10#include <ilog/TLoggerCompWrap.h>
11
12// ImtCore includes
13#include <imtservergql/CGqlPublisherCompBase.h>
14#include <imtservergql/ICommandIdSubscriptionsMonitor.h>
15
16
17namespace imtservergql
18{
19
20
21class CCommandIdSubscriptionsMonitorComp : public QObject,
22 public ilog::CLoggerComponentBase,
23 virtual public imtservergql::ICommandIdSubscriptionsMonitor
24{
25 Q_OBJECT
26public:
27 typedef ilog::CLoggerComponentBase BaseClass;
28
29 I_BEGIN_COMPONENT(CCommandIdSubscriptionsMonitorComp)
30 I_REGISTER_INTERFACE(imtservergql::ICommandIdSubscriptionsMonitor);
31 I_END_COMPONENT;
32
33 // reimplemented (ICommandIdSubscriptionsMonitor)
34 void SubscriptionAdded(
35 const QByteArray& subscriptionId, const QByteArray& commandId, const QByteArray& subscribedInputId) override;
36 void SubscriptionRemoved(const QByteArray& subscriptionId) override;
37
38protected:
39 virtual void SendNotification(int id, const QByteArray& changeNotifier, QVariant changeInfo);
40
41private:
42 /*
43 {
44 "commandId": {
45 "subscribedInputId": [
46 "subscriptionId"
47 ]
48 },
49 "OnSessionStateChanged": {
50 "S:aa5d1bde-1932-426c-b3ec-dd0cbd17e1af#D:X-Rite i1Pro 2 1004146#A:Agent_GMGA-JakeDell": [
51 "ad62771e-8a77-4f95-85e3-af64b0127489"
52 ]
53 }
54 }
55 */
56 QMap<QByteArray /*commandId*/, QMap<QByteArray /*subscribedInputId*/, QByteArrayList /*subscribedClients (List of subscriptionId)*/>>
57 m_subscribers;
58};
59
60
61} // namespace imtservergql