Files
onionHEN/source/include/msg.hpp
T
Hexwell ff40042d84 chore: keep only system PkgInstaller; remove DPI and custom PKG UI
Delete DirectPKGInstaller and the toolbox DPI toggle. Remove the custom
background package installer (custompkginstaller XML generation and
id_pkg_ handlers). Package install remains the stock PkgInstaller link
in OrionHEN_toolbox.xml. Leave BREW_UTIL_UNUSED_DPI ordinal for IPC
compatibility.
2026-07-10 16:03:27 +08:00

80 lines
2.3 KiB
C++

#pragma once
#include <stdint.h>
#include <stdlib.h>
#include <sys/mman.h>
#include <string>
#include <sys/param.h>
#define INVAIL -1
#define CRIT_IPC_SOC "/system_tmp/OrionHEN_crit_service"
#define UTIL_IPC_SOC "/system_tmp/OrionHEN_util_service"
#define DAEMON_BUFF_MAX 0x1000
enum class IPC_Ret : int {
NO_ERROR = 0,
INVALID = -1,
// Distinct from INVALID so callers can tell "wrong daemon" from "op failed".
OPERATION_FAILED = -2,
DEFAULT_RET = -1337
};
/* Underlying type is unsigned: several stable opcodes use the high bit set. */
enum DaemonCommands : unsigned int {
BREW_TEST_CONNECTION = 0x9000000u,
BREW_RETURN_VALUE = 0x9000002u,
BREW_REMOUNT_FOLDER,
BREW_STAT_CMD,
BREW_CALC_DIR_SIZE,
BREW_COPY_FILE,
BREW_COPY_DIR,
BREW_DELETE_DIR,
BREW_UNUSED_1,// not used anymore but kept fopr backwards compatibility for now
BREW_TEST_SB_FILE,
BREW_DAEMON_PID,
BREW_UNUSED_STORE_INSTALLER,
BREW_UNUSED_DECRYPT_DIR, // was BREW_DECRYPT_DIR (SELF directory decrypt removed)
BREW_LAST_RET,
BREW_UNUSED_TESTKIT_CHECK, // was BREW_TESTKIT_CHECK (local probe used instead)
BREW_ENABLE_TOOLBOX,
BREW_CHMOD_DIR,
// BREW_LAUNCH_DUMPER removed (no embedded ps5-app-dumper)
BREW_ADJUST_FAN_SPEED,
BREW_UTIL_TEST_CONNECTION = 0x8000000u,
BREW_UTIL_RETURN_VALUE = 0x8000002u,
BREW_UTIL_DAEMON_PID,
BREW_UTIL_UNUSED_FTP, // was BREW_UTIL_TOGGLE_FTP (service removed)
BREW_UTIL_UNUSED_KLOG, // was BREW_UTIL_TOGGLE_KLOG (service removed)
BREW_UTIL_UNUSED_DPI, // was TOGGLE_DPI (DirectPKGInstaller removed)
BREW_UTIL_LAUNCH_PLUGIN,
BREW_UTIL_SHELLUI_ON_STANDBY,
BREW_UTIL_GET_GAME_VER,
BREW_UTIL_GET_GAME_CHEAT,
BREW_UTIL_TOGGLE_CHEAT,
BREW_UTIL_DOWNLOAD_CHEATS,
BREW_UTIL_UNUSED_RELOAD_CHEATS, // was RELOAD_CHEATS (index cache removed; file-sig hot-reload)
BREW_UTIL_DOWNLOAD_KSTUFF,
BREW_UTIL_TOGGLE_LEGACY_CMD_SERVER,
BREW_UTIL_UNUSED_2,
BREW_UTIL_UNUSED_3,
// Legacy: 9021 elfldr auto-launch removed (command kept for IPC compatibility)
BREW_UTIL_LAUNCH_ELFLDR = 0xE1F1D8u,
BREW_RELOAD_SETTINGS = 0xC0FFEEu,
// BREW_TOGGLE_PS5DEBUG removed (ps5debug no longer embedded)
//KILL MAIN DAEMOM
BREW_KILL_DAEMON = 0xDEAD0001u,
BREW_FORCE_KILL_PID = 0xDEADCAFEu,
};
struct IPCMessage {
int magic = 0xDEADBABE;
enum DaemonCommands cmd;
int error = 0;
char msg[DAEMON_BUFF_MAX];
};