|
Rabbit Remote Control 0.1.0-bate6
|
Backend interface. More...
#include <Backend.h>


Signals | |
| void | sigRunning () |
| Emitted when the plugin is successfully started. | |
| void | sigStop () |
| Notify the user to stop. | |
| void | sigFinished () |
| Successful stopped signal. | |
| void | sigError (const int nError, const QString &szError=QString()) |
| Triggered when an error is generated. | |
| void | sigInformation (const QString &szInfo) |
| Triggering from a background thread displays information in the main thread without blocking the background thread. | |
| void | sigShowMessageBox (const QString &szTitle, const QString &szMessage, const QMessageBox::Icon &icon=QMessageBox::Information) |
| Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread without blocking the background thread. | |
| void | sigBlockShowMessageBox (const QString &szTitle, const QString &szMessage, QMessageBox::StandardButtons buttons, QMessageBox::StandardButton &nRet, bool &checkBox, QString checkBoxContext=QString()) |
| Block background threads and display message dialogs in foreground threads (QMessageBox) | |
| void | sigBlockInputDialog (const QString &szTitle, const QString &szLable, const QString &szMessage, QString &szText) |
| Block background threads and display input dialogs in foreground threads (QInputDialog) | |
| void | sigBlockShowWidget (const QString &className, int &nRet, void *pContext) |
| Blocks the background thread and displays the window in the foreground thread. | |
Public Member Functions | |
| CBackend (COperate *pOperate=nullptr, bool bStopSignal=true) | |
| CBackend. | |
| virtual int | Start () |
| Start. | |
| virtual int | Stop () |
| Stop. | |
| virtual int | WakeUp () |
| Wake up. | |
Protected Types | |
| enum class | OnInitReturnValue { Fail = -1 , Success = 0 , UseOnProcess = Success , NotUseOnProcess = 1 } |
Protected Slots | |
| virtual void | slotTimeOut () |
| a non-Qt event loop (that is, normal loop processing), It call OnProcess(), and start timer. | |
Protected Member Functions | |
| virtual OnInitReturnValue | OnInit ()=0 |
| Initialization. | |
| virtual int | OnClean ()=0 |
| Clean. | |
| virtual int | OnProcess () |
| Specific operation processing of plug-in. | |
Private Member Functions | |
| int | SetConnect (COperate *pOperate) |
Private Attributes | |
| bool | m_bStopSignal |
When an error occurs, emit a COperate::sigStop() signal. | |
Backend interface.
It is implemented by the Protocol plugin. It starts a timer by default to start a non-Qt event loop (that is, normal loop processing) . See Start(), slotTimeOut(), OnProcess() for details. Of course, it still supports Qt events (the signal-slot mechanism of QObject).
|
explicit |
| pOperate | |
| bStopSignal |
|
|
virtual |
Definition at line 18 of file Backend.cpp.
|
protectedpure virtual |
Clean.
Implemented in CBackendFileTransfer, CBackendFreeRDP, CBackendFtpServer, CBackendLibVNCServer, CBackendPlayer, CBackendSSH, and CBackendVnc.
|
protectedpure virtual |
Initialization.
Implemented in CBackendFileTransfer, CBackendFreeRDP, CBackendFtpServer, CBackendLibVNCServer, CBackendPlayer, CBackendSSH, and CBackendVnc.
|
protectedvirtual |
Specific operation processing of plug-in.
Reimplemented in CBackendFileTransfer, CBackendFreeRDP, CBackendLibVNCServer, CBackendSSH, and CBackendVnc.
Definition at line 138 of file Backend.cpp.
|
private |
Definition at line 23 of file Backend.cpp.
|
signal |
Block background threads and display input dialogs in foreground threads (QInputDialog)
|
signal |
Block background threads and display message dialogs in foreground threads (QMessageBox)
| title | |
| message | |
| buttons | |
| nRet | |
| checkBox | |
| checkBoxContext |
|
signal |
Blocks the background thread and displays the window in the foreground thread.
| className | show windows class name The class must have follower public functions: Q_INVOKABLE void SetContext(void* pContext); |
| nRet | If className is QDialog derived class, QDialog::exec() return value. Otherwise, ignore |
| pContext | pass context to COperate::slotBlockShowWidget() |
|
signal |
|
signal |
Triggering from a background thread displays information in the main thread without blocking the background thread.
|
signal |
|
signal |
Trigger the display of a message dialog (QMessageBox) in the main thread from a background thread without blocking the background thread.
|
signal |
Notify the user to stop.
Emitted only by plugins Emitted when you need to stop from the plug-in. For example, the peer disconnect or reset the connection or the connection is error
|
protectedvirtualslot |
a non-Qt event loop (that is, normal loop processing), It call OnProcess(), and start timer.
If it is not have a non-Qt event loop, can override it, or OnInit() return >0
Definition at line 106 of file Backend.cpp.
|
virtual |
Start.
Based on the OnInit() return value, decide whether to start the timer to support no-qt event
Definition at line 81 of file Backend.cpp.
|
virtual |
Stop.
Definition at line 93 of file Backend.cpp.
|
virtual |
Wake up.
When it is block(a non-Qt event loop)
Reimplemented in CBackendFreeRDP, CBackendLibVNCServer, CBackendSSH, CBackendVnc, and CBackendDesktop.
Definition at line 101 of file Backend.cpp.
|
private |
When an error occurs, emit a COperate::sigStop() signal.