Skip to content

Commit

Permalink
Rename Hipc to Cmif where appropriate (Ryujinx#3880)
Browse files Browse the repository at this point in the history
  • Loading branch information
Thealexbarney committed Apr 14, 2023
1 parent 4c3f096 commit 11ecff2
Show file tree
Hide file tree
Showing 149 changed files with 1,152 additions and 1,153 deletions.
2 changes: 1 addition & 1 deletion Ryujinx.HLE/Exceptions/ServiceNotImplementedException.cs
Expand Up @@ -55,7 +55,7 @@ private string BuildMessage()
if (callingType != null && callingMethod != null)
{
// If the type is past 0xF, we are using TIPC
var ipcCommands = Request.Type > IpcMessageType.TipcCloseSession ? Service.TipcCommands : Service.HipcCommands;
var ipcCommands = Request.Type > IpcMessageType.TipcCloseSession ? Service.TipcCommands : Service.CmifCommands;

// Find the handler for the method called
var ipcHandler = ipcCommands.FirstOrDefault(x => x.Value == callingMethod);
Expand Down
2 changes: 1 addition & 1 deletion Ryujinx.HLE/HOS/Ipc/IpcMessage.cs
Expand Up @@ -88,7 +88,7 @@ void ReadBuff(List<IpcBuffDesc> buff, int count)

long recvListPos = reader.BaseStream.Position + rawDataSize;

// only HIPC have the padding requirements.
// Only CMIF has the padding requirements.
if (Type < IpcMessageType.TipcCloseSession)
{
long pad0 = GetPadSize16(reader.BaseStream.Position + cmdPtr);
Expand Down
12 changes: 6 additions & 6 deletions Ryujinx.HLE/HOS/Ipc/IpcMessageType.cs
Expand Up @@ -2,12 +2,12 @@ namespace Ryujinx.HLE.HOS.Ipc
{
enum IpcMessageType
{
HipcResponse = 0,
HipcCloseSession = 2,
HipcRequest = 4,
HipcControl = 5,
HipcRequestWithContext = 6,
HipcControlWithContext = 7,
CmifResponse = 0,
CmifCloseSession = 2,
CmifRequest = 4,
CmifControl = 5,
CmifRequestWithContext = 6,
CmifControlWithContext = 7,
TipcCloseSession = 0xF
}
}
Expand Up @@ -9,21 +9,21 @@ public IManagerForApplication(UserId userId)
_managerServer = new ManagerServer(userId);
}

[CommandHipc(0)]
[CommandCmif(0)]
// CheckAvailability()
public ResultCode CheckAvailability(ServiceCtx context)
{
return _managerServer.CheckAvailability(context);
}

[CommandHipc(1)]
[CommandCmif(1)]
// GetAccountId() -> nn::account::NetworkServiceAccountId
public ResultCode GetAccountId(ServiceCtx context)
{
return _managerServer.GetAccountId(context);
}

[CommandHipc(2)]
[CommandCmif(2)]
// EnsureIdTokenCacheAsync() -> object<nn::account::detail::IAsyncContext>
public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
{
Expand All @@ -37,28 +37,28 @@ public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
return resultCode;
}

[CommandHipc(3)]
[CommandCmif(3)]
// LoadIdTokenCache() -> (u32 id_token_cache_size, buffer<bytes, 6>)
public ResultCode LoadIdTokenCache(ServiceCtx context)
{
return _managerServer.LoadIdTokenCache(context);
}

[CommandHipc(130)]
[CommandCmif(130)]
// GetNintendoAccountUserResourceCacheForApplication() -> (nn::account::NintendoAccountId, nn::account::nas::NasUserBaseForApplication, buffer<bytes, 6>)
public ResultCode GetNintendoAccountUserResourceCacheForApplication(ServiceCtx context)
{
return _managerServer.GetNintendoAccountUserResourceCacheForApplication(context);
}

[CommandHipc(160)] // 5.0.0+
[CommandCmif(160)] // 5.0.0+
// StoreOpenContext()
public ResultCode StoreOpenContext(ServiceCtx context)
{
return _managerServer.StoreOpenContext(context);
}

[CommandHipc(170)] // 6.0.0+
[CommandCmif(170)] // 6.0.0+
// LoadNetworkServiceLicenseKindAsync() -> object<nn::account::detail::IAsyncNetworkServiceLicenseKindContext>
public ResultCode LoadNetworkServiceLicenseKindAsync(ServiceCtx context)
{
Expand Down
Expand Up @@ -9,21 +9,21 @@ public IManagerForSystemService(UserId userId)
_managerServer = new ManagerServer(userId);
}

[CommandHipc(0)]
[CommandCmif(0)]
// CheckAvailability()
public ResultCode CheckAvailability(ServiceCtx context)
{
return _managerServer.CheckAvailability(context);
}

[CommandHipc(1)]
[CommandCmif(1)]
// GetAccountId() -> nn::account::NetworkServiceAccountId
public ResultCode GetAccountId(ServiceCtx context)
{
return _managerServer.GetAccountId(context);
}

[CommandHipc(2)]
[CommandCmif(2)]
// EnsureIdTokenCacheAsync() -> object<nn::account::detail::IAsyncContext>
public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
{
Expand All @@ -37,7 +37,7 @@ public ResultCode EnsureIdTokenCacheAsync(ServiceCtx context)
return resultCode;
}

[CommandHipc(3)]
[CommandCmif(3)]
// LoadIdTokenCache() -> (u32 id_token_cache_size, buffer<bytes, 6>)
public ResultCode LoadIdTokenCache(ServiceCtx context)
{
Expand Down
Expand Up @@ -9,28 +9,28 @@ public IProfile(UserProfile profile)
_profileServer = new ProfileServer(profile);
}

[CommandHipc(0)]
[CommandCmif(0)]
// Get() -> (nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x1a>)
public ResultCode Get(ServiceCtx context)
{
return _profileServer.Get(context);
}

[CommandHipc(1)]
[CommandCmif(1)]
// GetBase() -> nn::account::profile::ProfileBase
public ResultCode GetBase(ServiceCtx context)
{
return _profileServer.GetBase(context);
}

[CommandHipc(10)]
[CommandCmif(10)]
// GetImageSize() -> u32
public ResultCode GetImageSize(ServiceCtx context)
{
return _profileServer.GetImageSize(context);
}

[CommandHipc(11)]
[CommandCmif(11)]
// LoadImage() -> (u32, buffer<bytes, 6>)
public ResultCode LoadImage(ServiceCtx context)
{
Expand Down
Expand Up @@ -9,42 +9,42 @@ public IProfileEditor(UserProfile profile)
_profileServer = new ProfileServer(profile);
}

[CommandHipc(0)]
[CommandCmif(0)]
// Get() -> (nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x1a>)
public ResultCode Get(ServiceCtx context)
{
return _profileServer.Get(context);
}

[CommandHipc(1)]
[CommandCmif(1)]
// GetBase() -> nn::account::profile::ProfileBase
public ResultCode GetBase(ServiceCtx context)
{
return _profileServer.GetBase(context);
}

[CommandHipc(10)]
[CommandCmif(10)]
// GetImageSize() -> u32
public ResultCode GetImageSize(ServiceCtx context)
{
return _profileServer.GetImageSize(context);
}

[CommandHipc(11)]
[CommandCmif(11)]
// LoadImage() -> (u32, buffer<bytes, 6>)
public ResultCode LoadImage(ServiceCtx context)
{
return _profileServer.LoadImage(context);
}

[CommandHipc(100)]
[CommandCmif(100)]
// Store(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>)
public ResultCode Store(ServiceCtx context)
{
return _profileServer.Store(context);
}

[CommandHipc(101)]
[CommandCmif(101)]
// StoreWithImage(nn::account::profile::ProfileBase, buffer<nn::account::profile::UserData, 0x19>, buffer<bytes, 5>)
public ResultCode StoreWithImage(ServiceCtx context)
{
Expand Down
Expand Up @@ -14,42 +14,42 @@ public IAccountServiceForAdministrator(ServiceCtx context, AccountServiceFlag se
_applicationServiceServer = new ApplicationServiceServer(serviceFlag);
}

[CommandHipc(0)]
[CommandCmif(0)]
// GetUserCount() -> i32
public ResultCode GetUserCount(ServiceCtx context)
{
return _applicationServiceServer.GetUserCountImpl(context);
}

[CommandHipc(1)]
[CommandCmif(1)]
// GetUserExistence(nn::account::Uid) -> bool
public ResultCode GetUserExistence(ServiceCtx context)
{
return _applicationServiceServer.GetUserExistenceImpl(context);
}

[CommandHipc(2)]
[CommandCmif(2)]
// ListAllUsers() -> array<nn::account::Uid, 0xa>
public ResultCode ListAllUsers(ServiceCtx context)
{
return _applicationServiceServer.ListAllUsers(context);
}

[CommandHipc(3)]
[CommandCmif(3)]
// ListOpenUsers() -> array<nn::account::Uid, 0xa>
public ResultCode ListOpenUsers(ServiceCtx context)
{
return _applicationServiceServer.ListOpenUsers(context);
}

[CommandHipc(4)]
[CommandCmif(4)]
// GetLastOpenedUser() -> nn::account::Uid
public ResultCode GetLastOpenedUser(ServiceCtx context)
{
return _applicationServiceServer.GetLastOpenedUser(context);
}

[CommandHipc(5)]
[CommandCmif(5)]
// GetProfile(nn::account::Uid) -> object<nn::account::profile::IProfile>
public ResultCode GetProfile(ServiceCtx context)
{
Expand All @@ -63,7 +63,7 @@ public ResultCode GetProfile(ServiceCtx context)
return resultCode;
}

[CommandHipc(50)]
[CommandCmif(50)]
// IsUserRegistrationRequestPermitted(pid) -> bool
public ResultCode IsUserRegistrationRequestPermitted(ServiceCtx context)
{
Expand All @@ -72,14 +72,14 @@ public ResultCode IsUserRegistrationRequestPermitted(ServiceCtx context)
return _applicationServiceServer.IsUserRegistrationRequestPermitted(context);
}

[CommandHipc(51)]
[CommandCmif(51)]
// TrySelectUserWithoutInteraction(bool) -> nn::account::Uid
public ResultCode TrySelectUserWithoutInteraction(ServiceCtx context)
{
return _applicationServiceServer.TrySelectUserWithoutInteraction(context);
}

[CommandHipc(102)]
[CommandCmif(102)]
// GetBaasAccountManagerForSystemService(nn::account::Uid) -> object<nn::account::baas::IManagerForApplication>
public ResultCode GetBaasAccountManagerForSystemService(ServiceCtx context)
{
Expand All @@ -98,14 +98,14 @@ public ResultCode GetBaasAccountManagerForSystemService(ServiceCtx context)
return ResultCode.Success;
}

[CommandHipc(140)] // 6.0.0+
[CommandCmif(140)] // 6.0.0+
// ListQualifiedUsers() -> array<nn::account::Uid, 0xa>
public ResultCode ListQualifiedUsers(ServiceCtx context)
{
return _applicationServiceServer.ListQualifiedUsers(context);
}

[CommandHipc(205)]
[CommandCmif(205)]
// GetProfileEditor(nn::account::Uid) -> object<nn::account::profile::IProfileEditor>
public ResultCode GetProfileEditor(ServiceCtx context)
{
Expand Down

0 comments on commit 11ecff2

Please sign in to comment.