Entropic 2.11.1
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic_hooks.cpp File Reference

C API implementation for hook registration and deregistration. More...

Include dependency graph for entropic_hooks.cpp:

Go to the source code of this file.

Functions

static entropic::HookRegistryget_registry (entropic_handle_t handle)
 Resolve HookRegistry from engine handle.
 
ENTROPIC_EXPORT entropic_error_t entropic_register_hook (entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data, int priority)
 Register a hook callback for a hook point.
 
ENTROPIC_EXPORT entropic_error_t entropic_deregister_hook (entropic_handle_t handle, entropic_hook_point_t hook_point, entropic_hook_callback_t callback, void *user_data)
 Deregister a previously registered hook callback.
 

Variables

static auto logger = entropic::log::get("facade.hooks")
 

Detailed Description

C API implementation for hook registration and deregistration.

v1.8.9: Returned ENTROPIC_ERROR_NOT_IMPLEMENTED. v1.9.1: Full implementation delegating to HookRegistry.

Version
2.0.0

Definition in file entropic_hooks.cpp.

Function Documentation

◆ entropic_deregister_hook()

ENTROPIC_EXPORT entropic_error_t entropic_deregister_hook ( entropic_handle_t  handle,
entropic_hook_point_t  hook_point,
entropic_hook_callback_t  callback,
void *  user_data 
)

Deregister a previously registered hook callback.

Returns
ENTROPIC_OK on success. @req REQ-HOOK-001 @req REQ-API-005
Version
1.9.1

Definition at line 70 of file entropic_hooks.cpp.

◆ entropic_register_hook()

ENTROPIC_EXPORT entropic_error_t entropic_register_hook ( entropic_handle_t  handle,
entropic_hook_point_t  hook_point,
entropic_hook_callback_t  callback,
void *  user_data,
int  priority 
)

Register a hook callback for a hook point.

Register a callback for an engine hook point.

Returns
ENTROPIC_OK on success. @req REQ-HOOK-001 @req REQ-API-005
Version
1.9.1

Definition at line 43 of file entropic_hooks.cpp.

◆ get_registry()

static entropic::HookRegistry * get_registry ( entropic_handle_t  handle)
static

Resolve HookRegistry from engine handle.

Accesses the hook_registry member of the entropic_engine struct. The handle is validated by the caller (null check before call).

Parameters
handleEngine handle (must not be NULL).
Returns
Pointer to the handle's HookRegistry. @dg_internal
Version
2.0.0

Definition at line 30 of file entropic_hooks.cpp.

Variable Documentation

◆ logger

auto logger = entropic::log::get("facade.hooks")
static

Definition at line 17 of file entropic_hooks.cpp.