Files
strato/app/src/main/cpp/skyline/services/sm/IUserInterface.cpp
◱ PixelyIon d75d30b809 Minor Audio Refactor (and fix sm:IUserManager service name)
This makes some tiny changes to audio to make them compliant with the guidelines. In addition, to changing `IUserManager:IUserManager` to `sm:IUserManager`.
2020-04-23 22:26:27 +05:30

25 lines
1.1 KiB
C++

#include "IUserInterface.h"
namespace skyline::service::sm {
IUserInterface::IUserInterface(const DeviceState &state, ServiceManager &manager) : BaseService(state, manager, Service::sm_IUserInterface, "sm:IUserInterface", {
{0x0, SFUNC(IUserInterface::Initialize)},
{0x1, SFUNC(IUserInterface::GetService)}
}) {}
void IUserInterface::Initialize(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {}
void IUserInterface::GetService(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) {
std::string serviceName(reinterpret_cast<char *>(request.cmdArg));
if (serviceName.empty()) {
response.errorCode = constant::status::ServiceInvName;
} else {
try {
manager.NewService(serviceName, session, response);
} catch (std::out_of_range &) {
response.errorCode = constant::status::ServiceNotReg;
state.logger->Warn("Service has not been implemented: \"{}\"", serviceName);
}
}
}
}