It starts a background thread by default.
More...
#include <PluginClientThread.h>
|
| CPluginClientThread (QObject *parent=nullptr) |
|
| CPluginClient (QObject *parent=nullptr) |
| When the derived class is implemented, The plugin global resources are initialized are loaded here.
|
|
virtual | ~CPluginClient () |
| When the derived class is implemented, the resources are clean are unloaded here.
|
|
virtual const QString | Id () const |
| ID. Default: Protocol() + ":" + Name()
|
|
virtual const QString | Protocol () const =0 |
| Plugin Protocol.
|
|
virtual const QString | Name () const =0 |
| This name must be the same as the project name (${PROJECT_NAME}). The translation file (${PROJECT_NAME}_*.ts)) name is associated with it.
|
|
virtual const QString | DisplayName () const |
| The plugin display name.
|
|
virtual const QString | Description () const =0 |
| Plugin description.
|
|
virtual const QString | Version () const =0 |
| Version.
|
|
virtual const QIcon | Icon () const |
|
virtual const QString | Details () const |
| Display more information in About dialog or log.
|
|
It starts a background thread by default.
Together with CConnecterConnect, it enables a background thread to handle multiple remote desktop connections.
- Note
- The interface only is implemented by plug-in. The connecter must be derived from CConnecterConnect
- See also
- CConnecterConnect CPluginThread CManageConnect
Definition at line 25 of file PluginClientThread.h.
◆ ~CPluginClientThread()
CPluginClientThread::~CPluginClientThread |
( |
| ) |
|
|
virtual |
◆ CreateConnecter()
CConnecter * CPluginClientThread::CreateConnecter |
( |
const QString & |
szId | ) |
|
|
overrideprivatevirtual |
New CConnecter instance.
Only is called by CClient
{
auto it = m_Plugins.find(id);
if(m_Plugins.end() != it)
{
bool bRet = 0;
qDebug(log) << "CreateConnecter id:" << id;
auto plugin = it.value();
if(plugin) {
bRet = QMetaObject::invokeMethod(
plugin,
"CreateConnecter",
Qt::DirectConnection,
Q_ARG(QString, id));
if(!bRet) {
qCritical(log) << "Create CConnecter fail.";
return nullptr;
}
}
if(p) {
int val = 0;
bRet = QMetaObject::invokeMethod(
p,
"Initial",
Qt::DirectConnection,
Q_RETURN_ARG(int, val));
if(!bRet || val) {
qCritical(log) << "Connecter initial fail" << bRet << val;
DeleteConnecter(p);
return nullptr;
}
bRet = QMetaObject::invokeMethod(
p,
"SetParameterClient",
Qt::DirectConnection,
Q_RETURN_ARG(int, val),
if(!bRet || val) {
qCritical(log) << "SetParameterClient fail" << bRet << val;
DeleteConnecter(p);
return nullptr;
}
}
return p;
}
return nullptr;
}
virtual CConnecter * CreateConnecter(const QString &id)
New CConnecter pointer, the owner is caller.
The parameters of client.
- Returns
- Return CConnecter pointer, the owner is caller
- Note
- The function new object pointer, the caller must delete it when don't use it.
- Parameters
-
- See also
- CClient::CreateConnecter CClient::LoadConnecter
Implements CPluginClient.
Definition at line 30 of file PluginClientThread.cpp.
◆ OnCreateConnecter()
virtual CConnecterConnect * CPluginClientThread::OnCreateConnecter |
( |
const QString & |
szProtocol | ) |
|
|
privatepure virtual |
Create Connecter.
- Parameters
-
- Returns
- CConnecterConnect*
◆ m_pThread
The documentation for this class was generated from the following files: