ImagingTools Core SDK
IServiceConnectionParam.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/QUuid>
7
8// ACF includes
9#include <iser/ISerializable.h>
10
11
12namespace imtservice
13{
14
15
20class IServiceConnectionParam: virtual public iser::ISerializable
21{
22public:
23 struct IncomingConnectionParam
24 {
25 QByteArray id;
26 QString host = "localhost";
27 QString description;
28 int wsPort = -1;
29 int httpPort = -1;
30
31 IncomingConnectionParam()
32 {
33 id = QUuid::createUuid().toString(QUuid::WithoutBraces).toUtf8();
34 }
35
36 bool operator==(const IncomingConnectionParam& other) const
37 {
38 return (host == other.host) &&
39 (description == other.description) &&
40 (wsPort == other.wsPort) &&
41 (httpPort == other.httpPort) &&
42 (id == other.id);
43 }
44
45 bool operator!=(const IncomingConnectionParam& other) const
46 {
47 return !operator==(other);
48 }
49 };
50
51 typedef QList<IncomingConnectionParam> IncomingConnectionList;
52
53 virtual QList<IncomingConnectionParam> GetIncomingConnections() const = 0;
54};
55
56
57} // namespace imtservice
58
59