Skip to content

Commit

Permalink
FreeRDP::Rail: add CRailManageWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
KangLin committed Dec 26, 2024
1 parent 19580e6 commit 43f91c8
Show file tree
Hide file tree
Showing 10 changed files with 528 additions and 459 deletions.
4 changes: 2 additions & 2 deletions Client/ConnectDesktop.h
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ public Q_SLOTS:
*/
virtual void slotClipBoardChanged() = 0;

private:
protected:
int SetConnecter(CConnecter* pConnecter);
Q_INVOKABLE int SetViewer(CFrmViewer* pView, bool bDirectConnection);
int SetViewer(CFrmViewer* pView, bool bDirectConnection);

Q_SIGNALS:
void sigSetDesktopSize(int width, int height);
Expand Down
2 changes: 2 additions & 0 deletions Plugins/FreeRDP/Client/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ SET(FreeRDP_SOURCE_FILES
DlgDesktopSize.cpp
Rail.cpp
RailWindow.cpp
RailManageWindows.cpp
)

SET(FreeRDP_HEADER_FILES
Expand All @@ -36,6 +37,7 @@ SET(FreeRDP_HEADER_FILES
DlgDesktopSize.h
Rail.h
RailWindow.h
RailManageWindows.h
)

SET(FreeRDP_UI_FILES
Expand Down
9 changes: 9 additions & 0 deletions Plugins/FreeRDP/Client/ConnectFreeRDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ CConnectFreeRDP::CConnectFreeRDP(CConnecterFreeRDP *pConnecter)
: CConnectDesktop(pConnecter),
m_pContext(nullptr),
m_pParameter(nullptr),
m_pConnecter(pConnecter),
m_ClipBoard(this),
m_pRail(nullptr),
m_Cursor(this),
Expand Down Expand Up @@ -863,7 +864,10 @@ void CConnectFreeRDP::OnChannelConnectedEventHandler(void *context,
else if (strcmp(e->name, RAIL_SVC_CHANNEL_NAME) == 0)
{
if(!pThis->m_pRail)
{
pThis->m_pRail = new CRail(pThis);
pThis->m_pConnecter->m_RailManageWindows.ConnecRail(pThis->m_pRail);
}
if(pThis->m_pRail)
pThis->m_pRail->Init((RailClientContext*)e->pInterface);
}
Expand Down Expand Up @@ -2156,3 +2160,8 @@ int CConnectFreeRDP::InitRemoteApp()
<< m_pParameter->GetRemoteApplicationWorkingDir();
return nRet;
}

int CConnectFreeRDP::SetRailViewer(CFrmViewer *pView)
{
return CConnectDesktop::SetViewer(pView, true);
}
13 changes: 9 additions & 4 deletions Plugins/FreeRDP/Client/ConnectFreeRDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ public Q_SLOTS:
};
ClientContext* m_pContext;
CParameterFreeRDP* m_pParameter;
CConnecterFreeRDP* m_pConnecter;

RDP_CLIENT_ENTRY_POINTS m_ClientEntryPoints;

Expand All @@ -165,17 +166,21 @@ public Q_SLOTS:

CClipboardFreeRDP m_ClipBoard;

CRail* m_pRail;
friend class CRail;
int InitRemoteApp();

HANDLE m_writeEvent;

#ifdef HAVE_LIBSSH
CSSHTunnelThread* m_pThread;
#endif
private Q_SLOTS:
void slotConnectProxyServer(QString szHost, quint16 nPort);

private:
CRail* m_pRail;
CRailManageWindows* m_pRailManageWindows;
friend class CRail;
friend class CRailManageWindows;
int InitRemoteApp();
int SetRailViewer(CFrmViewer* pView);
};

#endif // CCONNECTFREERDP_H
1 change: 1 addition & 0 deletions Plugins/FreeRDP/Client/ConnecterFreeRDP.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
#include <QLoggingCategory>

static Q_LOGGING_CATEGORY(log, "FreeRDP.Connecter")

//! [Set the parameter]
CConnecterFreeRDP::CConnecterFreeRDP(CPluginClient *plugin)
: CConnecterThread(plugin)
Expand Down
6 changes: 5 additions & 1 deletion Plugins/FreeRDP/Client/ConnecterFreeRDP.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,22 @@
#include "ConnecterThread.h"
#include "ParameterFreeRDP.h"

#include "RailManageWindows.h"

class CConnecterFreeRDP : public CConnecterThread
{
Q_OBJECT
public:
explicit CConnecterFreeRDP(CPluginClient *plugin);
virtual ~CConnecterFreeRDP() override;

CRailManageWindows m_RailManageWindows;

public:
virtual qint16 Version() override;
virtual int Initial() override;
virtual int Clean() override;

protected:
virtual QDialog *OnOpenDialogSettings(QWidget *parent) override;

Expand Down
Loading

0 comments on commit 43f91c8

Please sign in to comment.