| 1 | // Copyright (C) 2024 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 QREMOTEOBJECTSTRUCTS_P_H |
| 6 | #define QREMOTEOBJECTSTRUCTS_P_H |
| 7 | |
| 8 | #include <QByteArray> |
| 9 | #include <QList> |
| 10 | |
| 11 | // |
| 12 | // W A R N I N G |
| 13 | // ------------- |
| 14 | // |
| 15 | // This file is not part of the Qt API. It exists purely as an |
| 16 | // implementation detail. This header file may change from version to |
| 17 | // version without notice, or even be removed. |
| 18 | // |
| 19 | // We mean it. |
| 20 | // |
| 21 | |
| 22 | // Simple structs used to describe types for dynamically creating and registering |
| 23 | // new instances. |
| 24 | |
| 25 | QT_BEGIN_NAMESPACE |
| 26 | |
| 27 | namespace QRemoteObjectInternalTypes { |
| 28 | |
| 29 | struct EnumPair { |
| 30 | QByteArray name; |
| 31 | int value; |
| 32 | }; |
| 33 | |
| 34 | struct EnumData { |
| 35 | QByteArray name; |
| 36 | bool isFlag, isScoped; |
| 37 | quint32 keyCount, size; |
| 38 | QList<EnumPair> values; |
| 39 | }; |
| 40 | |
| 41 | struct GadgetProperty { |
| 42 | QByteArray name; |
| 43 | QByteArray type; |
| 44 | }; |
| 45 | |
| 46 | struct GadgetData { |
| 47 | QList<GadgetProperty> properties; |
| 48 | QList<EnumData> enums; |
| 49 | }; |
| 50 | |
| 51 | struct ClassProperty { |
| 52 | QByteArray name; |
| 53 | QByteArray typeName; |
| 54 | QByteArray signalName; |
| 55 | bool isWritable = false; |
| 56 | }; |
| 57 | |
| 58 | struct ClassSignal { |
| 59 | QByteArray signature; |
| 60 | QByteArrayList parameterNames; |
| 61 | }; |
| 62 | |
| 63 | struct ClassSlot { |
| 64 | QByteArray signature, returnType; |
| 65 | QByteArrayList parameterNames; |
| 66 | }; |
| 67 | |
| 68 | struct ClassData |
| 69 | { |
| 70 | ClassData(bool _isSource = false); |
| 71 | QByteArray type; |
| 72 | QList<ClassProperty> properties; |
| 73 | QList<ClassSignal> _signals; |
| 74 | QList<ClassSlot> _slots; |
| 75 | QList<EnumData> enums; |
| 76 | bool isSource; |
| 77 | const QMetaObject *baseMeta; |
| 78 | }; |
| 79 | |
| 80 | }; // QRemoteObjectInternalTypes namespace |
| 81 | |
| 82 | QT_END_NAMESPACE |
| 83 | |
| 84 | #endif // QREMOTEOBJECTSTRUCTS_P_H |
| 85 | |