mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2024-11-18 18:06:40 +00:00
c2d9ac8f5c
Also greatly refactors libstratosphere, and does a lot of other things. There is a lot of code in this one.
29 lines
912 B
C++
29 lines
912 B
C++
#pragma once
|
|
#include <switch.h>
|
|
#include <atomic>
|
|
|
|
#include <stratosphere.hpp>
|
|
|
|
#include "debug.hpp"
|
|
|
|
class IMitMServiceObject : public IServiceObject {
|
|
protected:
|
|
Service *forward_service;
|
|
u64 process_id;
|
|
u64 title_id;
|
|
public:
|
|
IMitMServiceObject(Service *s) : forward_service(s), process_id(0), title_id(0) {
|
|
|
|
}
|
|
|
|
static bool should_mitm(u64 pid, u64 tid) {
|
|
return true;
|
|
}
|
|
|
|
virtual void clone_to(void *o) = 0;
|
|
protected:
|
|
virtual ~IMitMServiceObject() { }
|
|
virtual Result dispatch(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) = 0;
|
|
virtual void postprocess(IpcParsedCommand &r, IpcCommand &out_c, u64 cmd_id, u8 *pointer_buffer, size_t pointer_buffer_size) = 0;
|
|
virtual Result handle_deferred() = 0;
|
|
};
|