[AC] Stub undocumented functions

This commit is contained in:
wheremyfoodat 2023-09-24 19:07:47 +03:00
parent becc777bd8
commit ef51572193
2 changed files with 25 additions and 0 deletions

View file

@ -16,6 +16,8 @@ class ACService {
void cancelConnectAsync(u32 messagePointer);
void closeAsync(u32 messagePointer);
void createDefaultConfig(u32 messagePointer);
void getConnectingInfraPriority(u32 messagePointer);
void getStatus(u32 messagePointer);
void getLastErrorCode(u32 messagePointer);
void isConnected(u32 messagePointer);
void registerDisconnectEvent(u32 messagePointer);

View file

@ -7,6 +7,8 @@ namespace ACCommands {
CancelConnectAsync = 0x00070002,
CloseAsync = 0x00080004,
GetLastErrorCode = 0x000A0000,
GetStatus = 0x000C0000,
GetConnectingInfraPriority = 0x000F0000,
RegisterDisconnectEvent = 0x00300004,
IsConnected = 0x003E0042,
SetClientVersion = 0x00400042,
@ -24,7 +26,9 @@ void ACService::handleSyncRequest(u32 messagePointer) {
case ACCommands::CancelConnectAsync: cancelConnectAsync(messagePointer); break;
case ACCommands::CloseAsync: closeAsync(messagePointer); break;
case ACCommands::CreateDefaultConfig: createDefaultConfig(messagePointer); break;
case ACCommands::GetConnectingInfraPriority: getConnectingInfraPriority(messagePointer); break;
case ACCommands::GetLastErrorCode: getLastErrorCode(messagePointer); break;
case ACCommands::GetStatus: getStatus(messagePointer); break;
case ACCommands::IsConnected: isConnected(messagePointer); break;
case ACCommands::RegisterDisconnectEvent: registerDisconnectEvent(messagePointer); break;
case ACCommands::SetClientVersion: setClientVersion(messagePointer); break;
@ -69,6 +73,25 @@ void ACService::getLastErrorCode(u32 messagePointer) {
mem.write32(messagePointer + 8, 0); // Hopefully this means no error?
}
void ACService::getConnectingInfraPriority(u32 messagePointer) {
log("AC::GetConnectingInfraPriority (stubbed)\n");
// TODO: Find out what this is
mem.write32(messagePointer, IPC::responseHeader(0x0F, 2, 0));
mem.write32(messagePointer + 4, Result::Success);
mem.write32(messagePointer + 8, 0);
}
void ACService::getStatus(u32 messagePointer) {
log("AC::GetStatus (stubbed)\n");
// TODO: Find out what this is
mem.write32(messagePointer, IPC::responseHeader(0x0C, 2, 0));
mem.write32(messagePointer + 4, Result::Success);
mem.write32(messagePointer + 8, 0);
}
void ACService::isConnected(u32 messagePointer) {
log("AC::IsConnected\n");
// This has parameters according to the command word but it's unknown what they are