ac_u.cpp 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. // Copyright 2014 Citra Emulator Project
  2. // Licensed under GPLv2 or any later version
  3. // Refer to the license.txt file included.
  4. #include "common/log.h"
  5. #include "core/hle/hle.h"
  6. #include "core/hle/service/ac_u.h"
  7. ////////////////////////////////////////////////////////////////////////////////////////////////////
  8. // Namespace AC_U
  9. namespace AC_U {
  10. /**
  11. * AC_U::GetWifiStatus service function
  12. * Outputs:
  13. * 1 : Result of function, 0 on success, otherwise error code
  14. * 2 : Output connection type, 0 = none, 1 = Old3DS Internet, 2 = New3DS Internet.
  15. */
  16. void GetWifiStatus(Service::Interface* self) {
  17. u32* cmd_buff = Kernel::GetCommandBuffer();
  18. // TODO(purpasmart96): This function is only a stub,
  19. // it returns a valid result without implementing full functionality.
  20. cmd_buff[1] = 0; // No error
  21. cmd_buff[2] = 0; // Connection type set to none
  22. LOG_WARNING(Service_AC, "(STUBBED) called");
  23. }
  24. const Interface::FunctionInfo FunctionTable[] = {
  25. {0x00010000, nullptr, "CreateDefaultConfig"},
  26. {0x00040006, nullptr, "ConnectAsync"},
  27. {0x00050002, nullptr, "GetConnectResult"},
  28. {0x00080004, nullptr, "CloseAsync"},
  29. {0x00090002, nullptr, "GetCloseResult"},
  30. {0x000A0000, nullptr, "GetLastErrorCode"},
  31. {0x000D0000, GetWifiStatus, "GetWifiStatus"},
  32. {0x000E0042, nullptr, "GetCurrentAPInfo"},
  33. {0x00100042, nullptr, "GetCurrentNZoneInfo"},
  34. {0x00110042, nullptr, "GetNZoneApNumService"},
  35. {0x00240042, nullptr, "AddDenyApType"},
  36. {0x00270002, nullptr, "GetInfraPriority"},
  37. {0x002D0082, nullptr, "SetRequestEulaVersion"},
  38. {0x00300004, nullptr, "RegisterDisconnectEvent"},
  39. {0x003C0042, nullptr, "GetAPSSIDList"},
  40. {0x003E0042, nullptr, "IsConnected"},
  41. {0x00400042, nullptr, "SetClientVersion"},
  42. };
  43. ////////////////////////////////////////////////////////////////////////////////////////////////////
  44. // Interface class
  45. Interface::Interface() {
  46. Register(FunctionTable);
  47. }
  48. } // namespace