0
0
Fork 0
mirror of https://github.com/ryujinx-mirror/ryujinx.git synced 2024-10-19 19:21:41 +00:00
ryujinx-fork/Ryujinx.HLE/HOS/Services/Account/Acc/Types/UserProfile.cs
Ac_K a0720b5681 Refactoring HOS folder structure (#771)
* Refactoring HOS folder structure

Refactoring HOS folder structure:

- Added some subfolders when needed (Following structure decided in private).
- Added some `Types` folders when needed.
- Little cleanup here and there.
- Add services placeholders for every HOS services (close #766 and #753).

* Remove Types namespaces
2019-09-19 10:45:11 +10:00

37 lines
No EOL
965 B
C#

using Ryujinx.HLE.Utilities;
using System;
namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
class UserProfile
{
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public UInt128 UserId { get; private set; }
public string Name { get; private set; }
public long LastModifiedTimestamp { get; private set; }
public AccountState AccountState { get; set; }
public AccountState OnlinePlayState { get; set; }
public UserProfile(UInt128 userId, string name)
{
UserId = userId;
Name = name;
LastModifiedTimestamp = 0;
AccountState = AccountState.Closed;
OnlinePlayState = AccountState.Closed;
UpdateTimestamp();
}
private void UpdateTimestamp()
{
LastModifiedTimestamp = (long)(DateTime.Now - Epoch).TotalSeconds;
}
}
}