stream_data.c File Reference

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"
Include dependency graph for stream_data.c:

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...
 

Detailed Description

Stream data module implementation file.


Date
Jul 27, 2016

Definition in file stream_data.c.

Function Documentation

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.

Parameters
[in]stream_dataAll meta and payload details, callback etc. stored in this data struct.
[in]detailsA custom json object to form meta details.
Returns

Definition at line 43 of file stream_data.c.

References ASSERT_NOT_NULL, DEBUG_ENTRY, DEBUG_LEAVE, and mcl_custom_data_set_meta_details().

Here is the call graph for this function:

void stream_data_destroy ( stream_data_t **  stream_data)

Destroys stream_data.

Parameters
[in]stream_dataStream 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().

Here is the call graph for this function:

Here is the caller graph for this function:

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.

Parameters
[in]versionMeta version.
[in]typeMeta type.
[in]routingRouting information in meta description of stream_data.
[in]stream_data_read_callbackThe callback function which will be used to fill the payload of this stream object while composing the http request.
[in]user_contextThis will be passed to the callback function in each call.
[out]stream_dataInitialized stream data handle to operate on.
Returns

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().

Here is the call graph for this function:

Here is the caller graph for this function: