From afbce642fbb2f22c4b0bf05e476d189f483db99e Mon Sep 17 00:00:00 2001 From: Nik Date: Tue, 28 Mar 2023 09:49:12 +0200 Subject: [PATCH] includes/hex: Added provider functions --- includes/hex/provider.pat | 41 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 includes/hex/provider.pat diff --git a/includes/hex/provider.pat b/includes/hex/provider.pat new file mode 100644 index 0000000..7b8e1b6 --- /dev/null +++ b/includes/hex/provider.pat @@ -0,0 +1,41 @@ +#pragma once + +/*! + Library to interact with the currently loaded provider. +*/ + +namespace hex::prv { + + + /** + Queries information from the currently loaded provider. The kind of information that's available depends on the provider that's loaded + + > **Available information** + > - File Provider + > - `file_path() -> str` + > - `file_name() -> str` + > - `file_extension() -> str` + > - `creation_time() -> time_t` + > - `access_time() -> time_t` + > - `modification_time() -> time_t` + > - `permissions() -> u16` + > - Disk Provider + > - `file_path() -> str` + > - `sector_size() -> u128` + > - GDB Provider + > - `ip() -> str` + > - `port() -> u16` + > - Process Memory Provider + > - `region_address(regionName) -> u64` + > - `region_size(regionName) -> u64` + > - `process_id() -> u32` + > - `process_name() -> str` + + @param category Information category + @param argument Extra argument to pass along + */ + fn get_information(str category, str argument = "") { + return builtin::hex::prv::get_information(category, argument); + }; + +}