using System;
namespace Ryujinx.HLE.HOS.Services.Account.Acc
{
public class UserProfile
private static readonly DateTime Epoch = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);
public UserId UserId { get; }
public long LastModifiedTimestamp { get; set; }
private string _name;
public string Name
get => _name;
set
_name = value;
UpdateLastModifiedTimestamp();
}
private byte[] _image;
public byte[] Image
get => _image;
_image = value;
private AccountState _accountState;
public AccountState AccountState
get => _accountState;
_accountState = value;
public AccountState _onlinePlayState;
public AccountState OnlinePlayState
get => _onlinePlayState;
_onlinePlayState = value;
public UserProfile(UserId userId, string name, byte[] image, long lastModifiedTimestamp = 0)
UserId = userId;
Name = name;
Image = image;
AccountState = AccountState.Closed;
OnlinePlayState = AccountState.Closed;
if (lastModifiedTimestamp != 0)
LastModifiedTimestamp = lastModifiedTimestamp;
else
private void UpdateLastModifiedTimestamp()
LastModifiedTimestamp = (long)(DateTime.Now - Epoch).TotalSeconds;