mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-04 09:00:44 +00:00
Add function to connect to a remote host from python
This commit is contained in:
@@ -1450,6 +1450,24 @@ void CaptureContext::SetEventID(const rdcarray<ICaptureViewer *> &exclude, uint3
|
||||
RefreshUIStatus(exclude, updateSelectedEvent, updateEvent);
|
||||
}
|
||||
|
||||
void CaptureContext::ConnectToRemoteServer(RemoteHost host)
|
||||
{
|
||||
rdcarray<RemoteHost> hosts = Config().GetRemoteHosts();
|
||||
|
||||
int hostIdx = -1;
|
||||
for(int32_t i = 0; i < hosts.count(); i++)
|
||||
{
|
||||
if(hosts[i].Hostname() == host.Hostname())
|
||||
{
|
||||
hostIdx = i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(hostIdx >= 0)
|
||||
m_MainWindow->setRemoteHost(hostIdx);
|
||||
}
|
||||
|
||||
void CaptureContext::SetRemoteHost(int hostIdx)
|
||||
{
|
||||
m_MainWindow->setRemoteHost(hostIdx);
|
||||
|
||||
@@ -183,6 +183,8 @@ public:
|
||||
void MarkMessagesRead() override { m_UnreadMessageCount = 0; }
|
||||
void AddMessages(const rdcarray<DebugMessage> &msgs) override;
|
||||
|
||||
void ConnectToRemoteServer(RemoteHost host) override;
|
||||
|
||||
rdcstr GetNotes(const rdcstr &key) override { return m_Notes[key]; }
|
||||
void SetNotes(const rdcstr &key, const rdcstr &contents) override;
|
||||
rdcarray<EventBookmark> GetBookmarks() override { return m_Bookmarks; }
|
||||
|
||||
@@ -1204,6 +1204,12 @@ See :meth:`ReplaceResource`.
|
||||
)");
|
||||
virtual IReplayManager &Replay() = 0;
|
||||
|
||||
DOCUMENT(R"(Connect to a remote server.
|
||||
|
||||
:param RemoteHost host: The host to connect to.
|
||||
)");
|
||||
virtual void ConnectToRemoteServer(RemoteHost host) = 0;
|
||||
|
||||
DOCUMENT(R"(Check whether or not a capture is currently loaded.
|
||||
|
||||
:return: ``True`` if a capture is loaded.
|
||||
|
||||
@@ -173,6 +173,10 @@ struct CaptureContextInvoker : ICaptureContext
|
||||
return (m_Ctx.*ptr)(params...);
|
||||
}
|
||||
|
||||
virtual void ConnectToRemoteServer(RemoteHost host) override
|
||||
{
|
||||
InvokeVoidFunction(&ICaptureContext::ConnectToRemoteServer, host);
|
||||
}
|
||||
virtual WindowingData CreateWindowingData(QWidget *window) override
|
||||
{
|
||||
return InvokeRetFunction<WindowingData>(&ICaptureContext::CreateWindowingData, window);
|
||||
|
||||
Reference in New Issue
Block a user