Stream data module implementation file. More...
#include "mcl/mcl_common.h"
#include "mcl/mcl_custom_data.h"
#include "stream_data.h"
#include "log_util.h"
#include "memory.h"
#include "definitions.h"
Go to the source code of this file.
Functions | |
E_MCL_ERROR_CODE | stream_data_initialize (const char *version, const char *type, const char *routing, mcl_stream_data_read_callback_t stream_data_read_callback, void *user_context, stream_data_t **stream_data) |
Initializes stream_data . More... | |
E_MCL_ERROR_CODE | mcl_stream_data_set_meta_details (mcl_stream_data_t *stream_data, const mcl_json_t *details) |
Adds a custom details object to stream_data . More... | |
void | stream_data_destroy (stream_data_t **stream_data) |
Destroys stream_data . More... | |
Stream data module implementation file.
Definition in file stream_data.c.
E_MCL_ERROR_CODE mcl_stream_data_set_meta_details | ( | mcl_stream_data_t * | stream_data, |
const mcl_json_t * | details | ||
) |
Adds a custom details
object to stream_data
.
[in] | stream_data | All meta and payload details, callback etc. stored in this data struct. |
[in] | details | A custom json object to form meta details. |
stream_data
or details
is NULL. Definition at line 43 of file stream_data.c.
References ASSERT_NOT_NULL, DEBUG_ENTRY, DEBUG_LEAVE, and mcl_custom_data_set_meta_details().
void stream_data_destroy | ( | stream_data_t ** | stream_data | ) |
Destroys stream_data
.
[in] | stream_data | Stream data handle to operate on. |
Definition at line 57 of file stream_data.c.
References custom_data_destroy(), DEBUG_ENTRY, DEBUG_LEAVE, and MCL_FREE.
Referenced by _store_list_destroy_callback(), mcl_store_new_stream_data(), and stream_data_initialize().
E_MCL_ERROR_CODE stream_data_initialize | ( | const char * | version, |
const char * | type, | ||
const char * | routing, | ||
mcl_stream_data_read_callback_t | stream_data_read_callback, | ||
void * | user_context, | ||
stream_data_t ** | stream_data | ||
) |
Initializes stream_data
.
[in] | version | Meta version. |
[in] | type | Meta type. |
[in] | routing | Routing information in meta description of stream_data . |
[in] | stream_data_read_callback | The callback function which will be used to fill the payload of this stream object while composing the http request. |
[in] | user_context | This will be passed to the callback function in each call. |
[out] | stream_data | Initialized stream data handle to operate on. |
Definition at line 21 of file stream_data.c.
References ASSERT_CODE_MESSAGE, ASSERT_STATEMENT_CODE_MESSAGE, custom_data_initialize(), DEBUG_ENTRY, DEBUG_LEAVE, MCL_NEW, MCL_NULL, MCL_OK, MCL_OUT_OF_MEMORY, and stream_data_destroy().
Referenced by mcl_store_new_stream_data().