Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Files | Macros | Functions | Variables

Files

file  afw_content_type.h
 Header Adaptive Framework afw_content_type interface support.
 

Macros

#define afw_content_type_object_to_raw(instance, object, options, p, xctx)
 Convert object to the raw in specified pool. More...
 
#define afw_content_type_is_application_afw(instance)   ((instance) && (instance)->inf == &afw_content_type_application_afw_inf)
 Determine if content type it application/x-afw. More...
 

Functions

afw_utf8_tafw_content_type_x_to_utf8_with_options (const afw_content_type_t *instance, const afw_value_t *value, const afw_object_options_t *options, afw_xctx_t *xctx)
 
const afw_value_tafw_content_type_x_to_object_value_with_ids (const afw_content_type_t *instance, const afw_utf8_t *string, const afw_utf8_t *adaptor_id, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_xctx_t *xctx)
 
void afw_content_type_register (const afw_content_type_t *content_type, afw_xctx_t *xctx)
 Register content type with its id and all of its media types. More...
 
const afw_memory_tafw_content_type_value_to_raw (const afw_content_type_t *instance, const afw_value_t *value, const afw_object_options_t *options, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert value to the raw in specified pool. More...
 
const afw_stream_tafw_content_type_application_afw_stream_create (const afw_stream_t *response_stream, const afw_utf8_t *streamId, const afw_utf8_t *info, const afw_pool_t *p, afw_xctx_t *xctx)
 Create a stream for content type application/afw. More...
 

Variables

 afw_content_type_application_afw_inf
 application/x-afw content type inf.
 

Detailed Description

Provide afw_content_type interface common support.

Macro Definition Documentation

◆ afw_content_type_is_application_afw

#define afw_content_type_is_application_afw (   instance)    ((instance) && (instance)->inf == &afw_content_type_application_afw_inf)

Determine if content type it application/x-afw.

Parameters
instanceof content type.
Returns
result of test.

Definition at line 104 of file afw_content_type.h.

◆ afw_content_type_object_to_raw

#define afw_content_type_object_to_raw (   instance,
  object,
  options,
  p,
  xctx 
)
Value:
afw_value_create_object(object, p, xctx), options, p, xctx)
afw_value_create_object(const afw_object_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type object value.
const afw_memory_t * afw_content_type_value_to_raw(const afw_content_type_t *instance, const afw_value_t *value, const afw_object_options_t *options, const afw_pool_t *p, afw_xctx_t *xctx)
Convert value to the raw in specified pool.

Convert object to the raw in specified pool.

Parameters
instanceof content type.
objectto convert.
options.
pto use for result.
xctxof caller.
Returns
converted raw encoded memory.

Definition at line 94 of file afw_content_type.h.

Function Documentation

◆ afw_content_type_application_afw_stream_create()

const afw_stream_t* afw_content_type_application_afw_stream_create ( const afw_stream_t response_stream,
const afw_utf8_t streamId,
const afw_utf8_t info,
const afw_pool_t p,
afw_xctx_t xctx 
)

Create a stream for content type application/afw.

Parameters
response_streamthis stream will flush to.
streamId.
infofor header frame.
pto use.
xctxof caller.

Definition at line 309 of file afw_content_type_application_afw.c.

◆ afw_content_type_register()

void afw_content_type_register ( const afw_content_type_t content_type,
afw_xctx_t xctx 
)

Register content type with its id and all of its media types.

Parameters
content_typeto register.
xctxof caller.

Definition at line 19 of file afw_content_type.c.

◆ afw_content_type_value_to_raw()

const afw_memory_t* afw_content_type_value_to_raw ( const afw_content_type_t instance,
const afw_value_t value,
const afw_object_options_t options,
const afw_pool_t p,
afw_xctx_t xctx 
)

Convert value to the raw in specified pool.

Parameters
instanceof content type.
valueto convert.
options.
pto use for result.
xctxof caller.
Returns
converted raw encoded memory.

Definition at line 47 of file afw_content_type.c.

◆ afw_content_type_x_to_object_value_with_ids()

const afw_value_t* afw_content_type_x_to_object_value_with_ids ( const afw_content_type_t instance,
const afw_utf8_t string,
const afw_utf8_t adaptor_id,
const afw_utf8_t object_type_id,
const afw_utf8_t object_id,
afw_xctx_t xctx 
)
Todo:
FIXME: Decide what to do in dynamo_db code.

Definition at line 42 of file afw_content_type.h.

◆ afw_content_type_x_to_utf8_with_options()

afw_utf8_t* afw_content_type_x_to_utf8_with_options ( const afw_content_type_t instance,
const afw_value_t value,
const afw_object_options_t options,
afw_xctx_t xctx 
)
Todo:
FIXME: Decide what to do in dynamo_db code.

Definition at line 31 of file afw_content_type.h.