diff options
| author | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
|---|---|---|
| committer | Estevan Castilho <tevo@riajuu.net> | 2026-07-02 00:31:57 +0000 |
| commit | ab70e5461b98ddf2b56268c53c171cab89157027 (patch) | |
| tree | 3e57218edacc8e1366e0d1a86bdb922af7e51dca /include/HandlerManager.h | |
| parent | a4f6637601548a7158869ad155f29db50b151823 (diff) | |
| download | RNT-ab70e5461b98ddf2b56268c53c171cab89157027.tar.gz RNT-ab70e5461b98ddf2b56268c53c171cab89157027.zip | |
Nuke the old code
Diffstat (limited to '')
| -rw-r--r-- | include/HandlerManager.h | 96 |
1 files changed, 0 insertions, 96 deletions
diff --git a/include/HandlerManager.h b/include/HandlerManager.h deleted file mode 100644 index b2beb5f..0000000 --- a/include/HandlerManager.h +++ /dev/null @@ -1,96 +0,0 @@ -#pragma once - -#include "Api.h" -#include "ObjectManager.h" -#include "Types.h" - -#include <set> -#include <string> -#include <vector> - -/** - * @file HandlerManager.h - * @brief Declares handle allocation and release for authorized object access. - */ - -namespace nt { - class IdentityManager; - class LifecycleManager; - class NamespaceReferenceManager; - class PermissionsManager; - - /** @brief Opens and closes authorized handles to registry objects. */ - class HandlerManager { - public: - /** - * @brief Constructs a HandlerManager with shared runtime dependencies. - * - * All managers are injected so that state (registry entries, lifecycle - * counters, permission policy) persists across calls rather than being - * rebuilt per open/close. - */ - HandlerManager(ObjectManager& objects, PermissionsManager& permissions, - IdentityManager& identities, LifecycleManager& lifecycles, - NamespaceReferenceManager& references); - - /** - * @brief Represents authorized access to an object in the registry. - * - * The access mask is evaluated once during Open and cached here for the - * lifetime of the handle. Subsequent operations check `granted_access` - * rather than re-evaluating the security descriptor on every call. This - * resolves the performance question in PermissionsManager about when to - * check permissions. - * - * Because storage is append-only, a WRITE claim does not mean mutating an - * existing tuple in-place. It means the session is authorized to commit a - * new snapshot version of the relation. Two sessions holding WRITE handles - * on the same relation always produce independent snapshots — there is no - * data-level conflict. - * - * @todo Populate `granted_access` inside HandlerManager::Open from - * PermissionsManager::Firewall / Access. See docs/reactos-ob-comparison.md §4. - */ - struct handle { - /** Object referenced by this handle. */ - ObjectManager::registry* object = nullptr; - /** Connection metadata associated with the authorized access. */ - void* connection_context = nullptr; - /** - * Access claims granted to this handle at open time. - * Cached here so that per-operation checks read from the handle - * rather than re-evaluating the security descriptor. - * @todo Populate in HandlerManager::Open. - */ - std::set<AUTH_CLAIM> granted_access; - }; - - /** - * @brief Releases a handle allocation. - * @param handle Handle to release. - */ - void DeallocateHandle(struct handle* handle); - - /** - * @brief Opens an object by path for a connection. - * @param object_path Logical object path. - * @param connection_context Connection metadata for the caller. - * @return A valid handle pointer on success, or nullptr on failure. - */ - struct handle* Open(std::vector<std::string> object_path, void* connection_context); - - /** - * @brief Closes a previously opened handle. - * @param handle Handle to close. - * @return True when the handle was closed successfully. - */ - bool Close(struct handle* handle); - - private: - ObjectManager& objects_; - PermissionsManager& permissions_; - IdentityManager& identities_; - LifecycleManager& lifecycles_; - NamespaceReferenceManager& references_; - }; -} // namespace nt |
