mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-11-12 14:57:20 +00:00
[client/idd] network: add negotiated input service
This commit is contained in:
@@ -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" />
|
||||
|
||||
@@ -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
@@ -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
|
||||
{
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user