mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 16:53:48 -04:00
sm: add HasService/HasMitm, refactor into sts::
This commit is contained in:
parent
3ccbb34c62
commit
9217e4c5f9
15 changed files with 69 additions and 118 deletions
48
stratosphere/sm/source/impl/sm_service_manager.hpp
Normal file
48
stratosphere/sm/source/impl/sm_service_manager.hpp
Normal file
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2019 Atmosphère-NX
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify it
|
||||
* under the terms and conditions of the GNU General Public License,
|
||||
* version 2, as published by the Free Software Foundation.
|
||||
*
|
||||
* This program is distributed in the hope it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
* more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <switch.h>
|
||||
#include <stratosphere/sm.hpp>
|
||||
|
||||
namespace sts::sm::impl {
|
||||
|
||||
/* Process management. */
|
||||
Result RegisterProcess(u64 pid, const void *acid_sac, size_t acid_sac_size, const void *aci0_sac, size_t aci0_sac_size);
|
||||
Result UnregisterProcess(u64 pid);
|
||||
|
||||
/* Service management. */
|
||||
Result HasService(bool *out, ServiceName service);
|
||||
Result GetServiceHandle(Handle *out, u64 pid, ServiceName service);
|
||||
Result RegisterService(Handle *out, u64 pid, ServiceName service, size_t max_sessions, bool is_light);
|
||||
Result RegisterServiceForSelf(Handle *out, ServiceName service, size_t max_sessions);
|
||||
Result UnregisterService(u64 pid, ServiceName service);
|
||||
|
||||
/* Mitm extensions. */
|
||||
Result HasMitm(bool *out, ServiceName service);
|
||||
Result InstallMitm(Handle *out, Handle *out_query, u64 pid, ServiceName service);
|
||||
Result UninstallMitm(u64 pid, ServiceName service);
|
||||
Result AcknowledgeMitmSession(u64 *out_pid, Handle *out_hnd, u64 pid, ServiceName service);
|
||||
Result AssociatePidTidForMitm(u64 pid, u64 tid);
|
||||
|
||||
/* Dmnt record extensions. */
|
||||
Result GetServiceRecord(ServiceRecord *out, ServiceName service);
|
||||
Result ListServiceRecords(ServiceRecord *out, u64 *out_count, u64 offset, u64 max_count);
|
||||
|
||||
/* Deferral extension (works around FS bug). */
|
||||
Result EndInitialDefers();
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue