2021-01-02 17:34:28 -05:00
|
|
|
namespace Ryujinx.HLE.HOS.Services.Account.Acc.AccountService
|
|
|
|
{
|
|
|
|
class IProfileEditor : IpcService
|
|
|
|
{
|
|
|
|
private ProfileServer _profileServer;
|
|
|
|
|
|
|
|
public IProfileEditor(UserProfile profile)
|
|
|
|
{
|
|
|
|
_profileServer = new ProfileServer(profile);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(0)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// Get() -> (nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x1a>)
|
|
|
|
public ResultCode Get(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.Get(context);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(1)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// GetBase() -> nn::account::profile::ProfileBase
|
|
|
|
public ResultCode GetBase(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.GetBase(context);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(10)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// GetImageSize() -> u32
|
|
|
|
public ResultCode GetImageSize(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.GetImageSize(context);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(11)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// LoadImage() -> (u32, buffer<bytes, 6>)
|
|
|
|
public ResultCode LoadImage(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.LoadImage(context);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(100)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// Store(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>)
|
|
|
|
public ResultCode Store(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.Store(context);
|
|
|
|
}
|
|
|
|
|
2021-04-13 18:01:24 -04:00
|
|
|
[CommandHipc(101)]
|
2021-01-02 17:34:28 -05:00
|
|
|
// StoreWithImage(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>, buffer<bytes, 5>)
|
|
|
|
public ResultCode StoreWithImage(ServiceCtx context)
|
|
|
|
{
|
|
|
|
return _profileServer.StoreWithImage(context);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|