1
0
Fork 0
mirror of https://github.com/Atmosphere-NX/Atmosphere.git synced 2024-11-09 21:51:45 +00:00

sm: implement UserService::DetachClient

This commit is contained in:
Michael Scire 2020-11-30 22:18:18 -08:00 committed by SciresM
parent 632c8984c8
commit 05832cec73
3 changed files with 7 additions and 0 deletions

View file

@ -26,6 +26,7 @@ namespace ams::sm::impl {
AMS_SF_METHOD_INFO(C, H, 1, Result, GetServiceHandle, (sf::OutMoveHandle out_h, ServiceName service)) \
AMS_SF_METHOD_INFO(C, H, 2, Result, RegisterService, (sf::OutMoveHandle out_h, ServiceName service, u32 max_sessions, bool is_light)) \
AMS_SF_METHOD_INFO(C, H, 3, Result, UnregisterService, (ServiceName service)) \
AMS_SF_METHOD_INFO(C, H, 4, Result, DetachClient, (const sf::ClientProcessId &client_process_id)) \
AMS_SF_METHOD_INFO(C, H, 65000, Result, AtmosphereInstallMitm, (sf::OutMoveHandle srv_h, sf::OutMoveHandle qry_h, ServiceName service)) \
AMS_SF_METHOD_INFO(C, H, 65001, Result, AtmosphereUninstallMitm, (ServiceName service)) \
AMS_SF_METHOD_INFO(C, H, 65003, Result, AtmosphereAcknowledgeMitmSession, (sf::Out<MitmProcessInfo> client_info, sf::OutMoveHandle fwd_h, ServiceName service)) \

View file

@ -51,6 +51,11 @@ namespace ams::sm {
return impl::UnregisterService(this->process_id, service);
}
Result UserService::DetachClient(const sf::ClientProcessId &client_process_id) {
this->has_initialized = false;
return ResultSuccess();
}
Result UserService::AtmosphereInstallMitm(sf::OutMoveHandle srv_h, sf::OutMoveHandle qry_h, ServiceName service) {
R_TRY(this->EnsureInitialized());
return impl::InstallMitm(srv_h.GetHandlePointer(), qry_h.GetHandlePointer(), this->process_id, service);

View file

@ -34,6 +34,7 @@ namespace ams::sm {
Result GetServiceHandle(sf::OutMoveHandle out_h, ServiceName service);
Result RegisterService(sf::OutMoveHandle out_h, ServiceName service, u32 max_sessions, bool is_light);
Result UnregisterService(ServiceName service);
Result DetachClient(const sf::ClientProcessId &client_process_id);
/* Atmosphere commands. */
Result AtmosphereInstallMitm(sf::OutMoveHandle srv_h, sf::OutMoveHandle qry_h, ServiceName service);