Private factory constructor callback for the dynamic_buffer_stream adapter.
More...
#include "stream/borrowers/stream_types.h"
Go to the source code of this file.
Functions | |
| stream_status_t | dynamic_buffer_stream_ctor (const void *ud, const void *args, stream_t **out) |
Factory constructor callback for the dynamic_buffer_stream adapter. | |
This constructor is stored in the adapter descriptor created by dynamic_buffer_stream_create_desc() and later invoked by the stream port factory when creating a dynamic-buffer-backed stream instance.
Definition in file dynamic_buffer_stream_ctor.h.
| stream_status_t dynamic_buffer_stream_ctor | ( | const void * | ud, |
| const void * | args, | ||
| stream_t ** | out | ||
| ) |
This function implements the stream_ctor_fn_t contract expected by the stream port factory.
The opaque user-data pointer ud is expected to reference a dynamic_buffer_stream_ctor_ud_t structure containing the configuration and environment required to construct the stream instance.
The args parameter is the runtime argument blob supplied by the factory when creating a stream instance. This adapter does not require runtime creation arguments, so args is expected to be NULL.
| [in] | ud | Opaque user data stored in the adapter descriptor. |
Expected type:
const dynamic_buffer_stream_ctor_ud_t *| [in] | args | Runtime argument blob supplied by the factory. |
Expected value:
NULL| [out] | out | Receives the created stream handle. |
STREAM_STATUS_OK on successSTREAM_STATUS_INVALID if one or more arguments are invalidSTREAM_STATUS_OOM on allocation failure*out receives a newly created stream instance owned by the caller.On failure, *out is left unchanged.
Factory constructor callback for the dynamic_buffer_stream adapter.
| ud | Borrowed adapter-specific constructor user data. |
| args | Borrowed creation arguments expected by the adapter factory contract. |
| out | Output location that receives the created stream_t * on success. |
| STREAM_STATUS_OK | The stream was created successfully. |
| STREAM_STATUS_INVALID | One or more arguments are invalid. |
| STREAM_STATUS_OOM | Memory allocation failed. |
Definition at line 287 of file dynamic_buffer_stream.c.