1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef PLUGINMETAOBJECT_P_H
6#define PLUGINMETAOBJECT_P_H
7
8#include "framework/framework_global.h"
9#include "framework/lifecycle/pluginmetaobject.h"
10
11#include <QString>
12#include <QStringList>
13#include <QSharedPointer>
14
15DPF_BEGIN_NAMESPACE
16
17/// @brief PLUGIN_NAME 插件名称Key
18const char PLUGIN_NAME[] = "Name";
19/// @brief PLUGIN_VERSION 插件版本Key
20const char PLUGIN_VERSION[] = "Version";
21/// @brief PLUGIN_VERSION 插件兼容版本Key
22const char PLUGIN_COMPATVERSION[] = "CompatVersion";
23/// @brief PLUGIN_VERSION 插件类型Key
24const char PLUGIN_CATEGORY[] = "Category";
25/// @nrief PLUGIN_VENDOR 插件作者
26const char PLUGIN_VENDOR[] = "Vendor";
27/// @nrief PLUGIN_VENDOR 插件所持有的公司
28const char PLUGIN_COPYRIGHT[] = "Copyright";
29/// @nrief PLUGIN_VENDOR 插件描述
30const char PLUGIN_DESCRIPTION[] = "Description";
31/// @nrief PLUGIN_VENDOR 插件开源协议
32const char PLUGIN_LICENSE[] = "License";
33/// @nrief PLUGIN_VENDOR 插件主页链接地址
34const char PLUGIN_URLLINK[] = "UrlLink";
35/// @nrief PLUGIN_VENDOR 插件依赖
36const char PLUGIN_DEPENDS[] = "Depends";
37
38class PluginMetaObject;
39class PluginMetaObjectPrivate
40{
41 friend class PluginManager;
42 friend class PluginManagerPrivate;
43 friend class PluginMetaObject;
44 PluginMetaObject const *q;
45public:
46 QString iid;
47 QString name;
48 QString version;
49 QString compatVersion;
50 QString vendor;
51 QString copyright;
52 QStringList license;
53 QString description;
54 QString urlLink;
55 QString category;
56 QString error;
57 PluginMetaObject::State state;
58 QList<PluginDepend> depends;
59 QSharedPointer<Plugin> plugin;
60 QSharedPointer<QPluginLoader> loader;
61 QSharedPointer<PluginContext> context;
62 bool enabledBySettings = true;
63 bool disabledBySettings = false;
64
65 explicit PluginMetaObjectPrivate(PluginMetaObject * q)
66 : q(q)
67 , loader(new QPluginLoader(nullptr))
68 {
69
70 }
71};
72
73DPF_END_NAMESPACE
74
75#endif // PLUGINMETAOBJECT_P_H
76