2018-06-10 20:46:42 -04:00
|
|
|
using Ryujinx.HLE.OsHle.Ipc;
|
2018-02-24 23:34:16 -05:00
|
|
|
using System.Collections.Generic;
|
|
|
|
|
2018-06-10 20:46:42 -04:00
|
|
|
namespace Ryujinx.HLE.OsHle.Services.Time
|
2018-02-24 23:34:16 -05:00
|
|
|
{
|
2018-04-06 00:01:52 -04:00
|
|
|
class IStaticService : IpcService
|
2018-02-24 23:34:16 -05:00
|
|
|
{
|
|
|
|
private Dictionary<int, ServiceProcessRequest> m_Commands;
|
|
|
|
|
2018-03-19 14:58:46 -04:00
|
|
|
public override IReadOnlyDictionary<int, ServiceProcessRequest> Commands => m_Commands;
|
2018-02-24 23:34:16 -05:00
|
|
|
|
2018-04-06 00:01:52 -04:00
|
|
|
public IStaticService()
|
2018-02-24 23:34:16 -05: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;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|