[client/idd] network: add negotiated input service

This commit is contained in:
Geoffrey McRae
2026-09-30 18:51:14 +10:00
parent f15c0af653
commit 5138f470b7
11 changed files with 2790 additions and 386 deletions

View File

@@ -72,6 +72,7 @@
<ClCompile Include="..\..\repos\LGProtocol\src\network\packet.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\protocol.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\route.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\sequence.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\services.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\stream.c" />
<ClCompile Include="..\..\repos\LGProtocol\src\network\wire.c" />

View File

@@ -33,6 +33,9 @@
<ClCompile Include="..\..\repos\LGProtocol\src\network\route.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\repos\LGProtocol\src\network\sequence.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\repos\LGProtocol\src\network\services.c">
<Filter>Source Files</Filter>
</ClCompile>

File diff suppressed because it is too large Load Diff

View File

@@ -230,6 +230,35 @@ IInputSource * CNetworkTransport::Input()
return (m_config.services & TRANSPORT_SERVICE_INPUT) ? &m_input : nullptr;
}
bool CNetworkTransport::ServiceEnabled(LGNetService service) const
{
switch (service)
{
case LG_NET_SERVICE_RECOVERY:
case LG_NET_SERVICE_CURSOR:
return (m_config.services & TRANSPORT_SERVICE_CONTROL) != 0;
case LG_NET_SERVICE_INPUT:
return (m_config.services & TRANSPORT_SERVICE_INPUT) != 0;
case LG_NET_SERVICE_AUDIO:
return (m_config.services & TRANSPORT_SERVICE_AUDIO) != 0;
case LG_NET_SERVICE_CLIPBOARD:
case LG_NET_SERVICE_FILE:
return (m_config.services & TRANSPORT_SERVICE_CLIPBOARD) != 0;
case LG_NET_SERVICE_VIDEO:
return (m_config.services & TRANSPORT_SERVICE_FRAME) != 0;
case LG_NET_SERVICE_CORE:
case LG_NET_SERVICE_USB:
return false;
}
return false;
}
bool CNetworkTransport::ControlSnapshot(
NetworkControlSnapshot& state) const
{

View File

@@ -93,6 +93,7 @@ public:
IInputSource * Input() override;
const NetworkSettings& Settings() const { return m_settings; }
bool ServiceEnabled(LGNetService service) const;
bool ControlSnapshot(NetworkControlSnapshot& state) const;
// The QUIC provider calls these only after authenticating a peer. Keeping