1// Copyright (C) 2017 Ford Motor Company
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5#ifndef QREMOTEOBJECTREGISTRY_P_H
6#define QREMOTEOBJECTREGISTRY_P_H
7
8#include <QtRemoteObjects/qremoteobjectreplica.h>
9
10QT_BEGIN_NAMESPACE
11
12class QRemoteObjectRegistryPrivate;
13class QRemoteObjectNodePrivate;
14
15class Q_REMOTEOBJECTS_EXPORT QRemoteObjectRegistry : public QRemoteObjectReplica
16{
17 Q_OBJECT
18 Q_CLASSINFO(QCLASSINFO_REMOTEOBJECT_TYPE, "Registry")
19
20 Q_PROPERTY(QRemoteObjectSourceLocations sourceLocations READ sourceLocations STORED false
21 BINDABLE bindableSourceLocations)
22
23public:
24 ~QRemoteObjectRegistry() override;
25 static void registerMetatypes();
26
27 QRemoteObjectSourceLocations sourceLocations() const;
28 QBindable<QRemoteObjectSourceLocations> bindableSourceLocations() const;
29
30Q_SIGNALS:
31 void remoteObjectAdded(const QRemoteObjectSourceLocation &entry);
32 void remoteObjectRemoved(const QRemoteObjectSourceLocation &entry);
33
34protected Q_SLOTS:
35 void addSource(const QRemoteObjectSourceLocation &entry);
36 void removeSource(const QRemoteObjectSourceLocation &entry);
37 void pushToRegistryIfNeeded();
38
39private:
40 void initialize() override;
41 void notifySourceLocationsChanged();
42
43 explicit QRemoteObjectRegistry(QObject *parent = nullptr);
44 explicit QRemoteObjectRegistry(QRemoteObjectNode *node, const QString &name, QObject *parent = nullptr);
45
46 Q_DECLARE_PRIVATE(QRemoteObjectRegistry)
47 friend class QT_PREPEND_NAMESPACE(QRemoteObjectNode);
48 friend class QT_PREPEND_NAMESPACE(QRemoteObjectNodePrivate);
49};
50
51QT_END_NAMESPACE
52
53#endif
54

source code of qtremoteobjects/src/remoteobjects/qremoteobjectregistry.h