summaryrefslogtreecommitdiffhomepage
path: root/Comm
diff options
context:
space:
mode:
authorAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-22 11:02:34 +0200
committerAmlal EL Mahrouss <amlalelmahrouss@icloud.com>2024-06-22 11:02:34 +0200
commitefd60f780ba66b363dc564b99a09b60163b9edcb (patch)
treeddb8b4564cabc0578cedc0b2b2ec4941a9b3e35a /Comm
parentafb57783942238da489de6677941ecc64f9d8929 (diff)
IMP: Support fork based operations inside the file manager, update PEF
loader to load from forks, we might need a non-fork loader class though. Signed-off-by: Amlal EL Mahrouss <amlalelmahrouss@icloud.com>
Diffstat (limited to 'Comm')
-rw-r--r--Comm/newstd.hxx49
1 files changed, 26 insertions, 23 deletions
diff --git a/Comm/newstd.hxx b/Comm/newstd.hxx
index 913d2a28..908ea017 100644
--- a/Comm/newstd.hxx
+++ b/Comm/newstd.hxx
@@ -16,6 +16,11 @@ Purpose: NewOS standard interface.
#define IMPORT_CXX extern "C++"
#define IMPORT_C extern "C"
+#define cRestrictR "r"
+#define cRestrictRB "rb"
+#define cRestrictW "w"
+#define cRestrictRW "rw"
+
class NUser; /// @brief User application class.
class NWindow; /// @brief Window class.
class NWindowAlert; /// @brief Window alert object
@@ -23,8 +28,9 @@ class NURL; /// @brief URL object.
typedef void(*NWindowCallback)(NWindow*);
-typedef int NOSType;
-typedef bool NOSBool;
+typedef int OSType;
+typedef bool Bool;
+typedef void UInt0;
typedef __UINT64_TYPE__ UInt64;
typedef __UINT32_TYPE__ UInt32;
@@ -42,33 +48,30 @@ typedef __INT8_TYPE__ SInt8;
class NUser final
{
public:
- /// THOSE REQUIRES PERMISSIONS FROM THE USER. ///
-
- static void Poweroff();
- static void Reboot();
-
- /// THOSE REQUIRES PERMISSIONS FROM THE USER. ///
+ // THOSE REQUIRES PERMISSIONS FROM THE USER. ///
- static NOSBool IsWokeup();
- static void Terminate();
+ static UInt0 Poweroff();
+ static UInt0 Reboot();
+ static Bool IsWokeup();
- /// THOSE DOESNT REQUIRE PERMISSIONS FROM THE USER. ///
+ // THOSE DOESNT REQUIRE PERMISSIONS FROM THE USER. ///
- static NOSBool Exit(NOSType code);
- static void* New(long long sz);
- static void Delete(void* ptr);
+ static UInt0 Terminate();
+ static Bool Exit(OSType code);
+ static UInt0* New(long long sz);
+ static UInt0 Delete(void* ptr);
- /// ASK FOR ELEVATION ///
+ // ASK FOR ELEVATION ///
- static NOSBool RaiseUAC();
+ static Bool RaiseUAC();
- /// THOSE MAY REQUIRE PERMISSIONS FROM THE USER. ///
+ // THOSE MAY REQUIRE PERMISSIONS FROM THE USER. ///
- static NOSType Open(const char* path);
- static void Close(NOSType fd);
+ static OSType Open(const char* path);
+ static UInt0 Close(OSType fd);
static NURL* Execute(const NURL* command);
- static void* Read(const char* forkName, NOSType fd);
- static void* Write(const char* forkName, NOSType fd);
+ static UInt0* Read(const char* forkName, OSType fd);
+ static UInt0* Write(const char* forkName, OSType fd);
};
/**
@@ -97,7 +100,7 @@ public:
virtual NWindowAlert* Collect(const char* resultBuf, long resultBufSz) = 0;
public:
- NOSBool fAsyncOperationMode;
+ Bool fAsyncOperationMode;
NWindowCallback fAsyncOnComplete;
};
@@ -129,7 +132,7 @@ public:
NWindowCallback onHover = nullptr) = 0;
public:
- NOSBool fWindowEnabled;
+ Bool fWindowEnabled;
void* fWindowDataPtr;
};