diff options
| author | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-08 22:57:05 -0300 |
|---|---|---|
| committer | Marcos Magueta <maguetamarcos@gmail.com> | 2026-05-08 22:57:05 -0300 |
| commit | 0657d6815943b5350bf4a596cd826f7a9de14a90 (patch) | |
| tree | 53d4fbd03731e483f1bd83a58beab64a330c7f1d /include/HandlerManager.h | |
| parent | be67e04f498f02c601788f2e23913827d2aa3c21 (diff) | |
| download | RNT-0657d6815943b5350bf4a596cd826f7a9de14a90.tar.gz RNT-0657d6815943b5350bf4a596cd826f7a9de14a90.zip | |
port docs to doxygen
Diffstat (limited to 'include/HandlerManager.h')
| -rw-r--r-- | include/HandlerManager.h | 38 |
1 files changed, 34 insertions, 4 deletions
diff --git a/include/HandlerManager.h b/include/HandlerManager.h index d126680..185cc55 100644 --- a/include/HandlerManager.h +++ b/include/HandlerManager.h @@ -6,20 +6,50 @@ #include <string> #include <vector> +/** + * @file HandlerManager.h + * @brief Declares handle allocation and release for authorized object access. + */ + namespace nt { + /** @brief Opens and closes authorized handles to registry objects. */ class NT_API HandlerManager { public: - // This is supposed to represent an authorized access to a certain object in the registry - // This increases the handle count in the object manager - // We should consider adding on the object manager a vector of all the handles that refer to an object + /** + * @brief Represents authorized access to an object in the registry. + * + * This increases the handle count in the object manager. We should + * consider adding a vector to the object manager with all handles that + * refer to an object. + */ struct handle { + /** Object referenced by this handle. */ ObjectManager::registry* object = nullptr; + /** Connection metadata associated with the authorized access. */ void* connection_context = nullptr; }; + + /** + * @brief Releases a handle allocation. + * @param handle Handle to release. + */ void DeallocateHandle(struct handle* handle); - struct handle Open(std::vector<std::string> object_path, void* connection_context); + + /** + * @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); }; } |
