LexLeo 0.0.0-dev+f8e5087-dirty
Technical documentation
Loading...
Searching...
No Matches
stream_install.h File Reference

Adapter installation contracts for the stream port. More...

Include dependency graph for stream_install.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stream_adapter_desc_t
 Public descriptor used to register a concrete stream adapter. More...
 

Typedefs

typedef void(* ud_dtor_fn_t) (const void *ud, const osal_mem_ops_t *mem)
 Destructor for adapter-owned constructor user data.
 
typedef stream_status_t(* stream_ctor_fn_t) (const void *ud, const void *args, stream_t **out)
 Adapter constructor contract used by stream factory services.
 
typedef struct stream_adapter_desc_t stream_adapter_desc_t
 Public descriptor used to register a concrete stream adapter.
 

Detailed Description

This header exposes the public descriptor and constructor contracts used to register concrete stream adapters into Composition Root factory services.

Definition in file stream_install.h.

Typedef Documentation

◆ stream_adapter_desc_t

A stream_adapter_desc_t binds:

  • a public adapter key,
  • an adapter constructor,
  • optional constructor user data,
  • an optional destructor for that user data.

This descriptor is typically prepared by an adapter-facing CR helper and then registered into a stream_factory_t.

◆ stream_ctor_fn_t

typedef stream_status_t(* stream_ctor_fn_t) (const void *ud, const void *args, stream_t **out)
Parameters
[in]udOpaque adapter-owned constructor context.
[in]argsAdapter-specific creation arguments.
[out]outReceives the created stream handle.
Returns
A stream_status_t describing the construction result.

Concrete stream adapters must implement this constructor signature so they can be registered through public stream_adapter_desc_t descriptors and later invoked by factory-based creation services.

Definition at line 63 of file stream_install.h.

◆ ud_dtor_fn_t

typedef void(* ud_dtor_fn_t) (const void *ud, const osal_mem_ops_t *mem)
Parameters
[in]udOpaque adapter-owned user data to destroy.
[in]memMemory operations to use for destruction.

This callback is used by factory-side services when they own adapter registration data and must release descriptor-bound user data during teardown.

Definition at line 41 of file stream_install.h.