nifm/ssl: Implement GetCurrentNetworkProfile and stub Ssl Service (#2186)

* nifm/ssl: Implement GetCurrentNetworkProfile and stub Ssl Service

* remove InterfaceVersion
This commit is contained in:
Ac_K 2021-04-13 03:04:18 +02:00 committed by GitHub
parent 73881fad19
commit b662a26c7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 375 additions and 56 deletions

View file

@ -1,24 +1,27 @@
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Services.Ssl.SslService;
using Ryujinx.HLE.HOS.Services.Ssl.Types;
namespace Ryujinx.HLE.HOS.Services.Ssl
{
[Service("ssl")]
class ISslService : IpcService
{
// NOTE: The SSL service is used by games to connect it to various official online services, which we do not intend to support.
// In this case it is acceptable to stub all calls of the service.
public ISslService(ServiceCtx context) { }
[Command(0)]
// CreateContext(nn::ssl::sf::SslVersion, u64, pid) -> object<nn::ssl::sf::ISslContext>
public ResultCode CreateContext(ServiceCtx context)
{
int sslVersion = context.RequestData.ReadInt32();
long unknown = context.RequestData.ReadInt64();
Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { sslVersion, unknown });
SslVersion sslVersion = (SslVersion)context.RequestData.ReadUInt32();
ulong pidPlaceholder = context.RequestData.ReadUInt64();
MakeObject(context, new ISslContext(context));
Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { sslVersion });
return ResultCode.Success;
}
@ -26,9 +29,10 @@ namespace Ryujinx.HLE.HOS.Services.Ssl
// SetInterfaceVersion(u32)
public ResultCode SetInterfaceVersion(ServiceCtx context)
{
int version = context.RequestData.ReadInt32();
// 1 = 3.0.0+, 2 = 5.0.0+, 3 = 6.0.0+
uint interfaceVersion = context.RequestData.ReadUInt32();
Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { version });
Logger.Stub?.PrintStub(LogClass.ServiceSsl, new { interfaceVersion });
return ResultCode.Success;
}