2018-06-11 02:46:42 +02:00
|
|
|
using Ryujinx.HLE.OsHle.Ipc;
|
2018-02-25 05:34:16 +01:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-06-11 02:46:42 +02:00
|
|
|
namespace Ryujinx.HLE.OsHle.Services.Time
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
2018-04-06 06:01:52 +02:00
|
|
|
class IStaticService : IpcService
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
|
|
|
|
2018-03-19 19:58:46 +01:00
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-02-25 05:34:16 +01:00
|
|
|
|
2018-04-06 06:01:52 +02:00
|
|
|
public IStaticService()
|
2018-02-25 05:34:16 +01:00
|
|
|
{
|
|
|
|
m_Commands = new Dictionary<int, ServiceProcessRequest>()
|
|
|
|
{
|
|
|
|
{ 0, GetStandardUserSystemClock },
|
|
|
|
{ 1, GetStandardNetworkSystemClock },
|
|
|
|
{ 2, GetStandardSteadyClock },
|
|
|
|
{ 3, GetTimeZoneService },
|
|
|
|
{ 4, GetStandardLocalSystemClock }
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetStandardUserSystemClock(ServiceCtx Context)
|
|
|
|
{
|
|
|
|
MakeObject(Context, new ISystemClock(SystemClockType.User));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetStandardNetworkSystemClock(ServiceCtx Context)
|
|
|
|
{
|
|
|
|
MakeObject(Context, new ISystemClock(SystemClockType.Network));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetStandardSteadyClock(ServiceCtx Context)
|
|
|
|
{
|
|
|
|
MakeObject(Context, new ISteadyClock());
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetTimeZoneService(ServiceCtx Context)
|
|
|
|
{
|
|
|
|
MakeObject(Context, new ITimeZoneService());
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
public long GetStandardLocalSystemClock(ServiceCtx Context)
|
|
|
|
{
|
|
|
|
MakeObject(Context, new ISystemClock(SystemClockType.Local));
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|