From ab70e5461b98ddf2b56268c53c171cab89157027 Mon Sep 17 00:00:00 2001 From: Estevan Castilho Date: Thu, 2 Jul 2026 00:31:57 +0000 Subject: Nuke the old code --- include/HandlerManager.h | 96 ------------------------------------------------ 1 file changed, 96 deletions(-) delete mode 100644 include/HandlerManager.h (limited to 'include/HandlerManager.h') 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 -#include -#include - -/** - * @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 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 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 -- cgit v1.2.3