mirror of
https://github.com/topjohnwu/Magisk.git
synced 2025-01-05 11:48:29 +00:00
60e8415369
Co-authored-by: topjohnwu <topjohnwu@gmail.com>
51 lines
701 B
C++
51 lines
701 B
C++
#pragma once
|
|
|
|
#include <pthread.h>
|
|
#include <string_view>
|
|
#include <functional>
|
|
#include <map>
|
|
#include <atomic>
|
|
|
|
#include <core.hpp>
|
|
|
|
#define ISOLATED_MAGIC "isolated"
|
|
|
|
namespace DenyRequest {
|
|
enum : int {
|
|
ENFORCE,
|
|
DISABLE,
|
|
ADD,
|
|
REMOVE,
|
|
LIST,
|
|
STATUS,
|
|
|
|
END
|
|
};
|
|
}
|
|
|
|
namespace DenyResponse {
|
|
enum : int {
|
|
OK,
|
|
ENFORCED,
|
|
NOT_ENFORCED,
|
|
ITEM_EXIST,
|
|
ITEM_NOT_EXIST,
|
|
INVALID_PKG,
|
|
NO_NS,
|
|
ERROR,
|
|
|
|
END
|
|
};
|
|
}
|
|
|
|
// CLI entries
|
|
int enable_deny();
|
|
int disable_deny();
|
|
int add_list(int client);
|
|
int rm_list(int client);
|
|
void ls_list(int client);
|
|
|
|
bool proc_context_match(int pid, std::string_view context);
|
|
void *logcat(void *arg);
|
|
extern bool logcat_exit;
|