21 #define AFW_IMPLEMENTATION_ID "impl"
46 afw_content_type_impl_create_object_list_writer(
61 self->pub.inf = &impl_afw_content_type_object_list_writer_inf;
65 self->content_type = instance;
66 self->options = options;
67 self->context = context;
68 self->callback = callback;
69 self->begin_object_list = begin_object_list;
70 self->object_separator = object_separator;
71 self->last_object_separator = last_object_separator;
72 self->end_object_list = end_object_list;
75 if (self->begin_object_list && self->begin_object_list->size > 0) {
76 callback(self->context,
77 self->begin_object_list->ptr,
78 self->begin_object_list->size,
92 impl_afw_content_type_object_list_writer_release(
101 if (self->object_count > 0 &&
102 self->last_object_separator &&
103 self->last_object_separator->size > 0)
105 self->callback(self->context,
106 self->last_object_separator->ptr,
107 self->last_object_separator->size,
112 if (self->end_object_list && self->end_object_list->size > 0) {
113 self->callback(self->context,
114 self->end_object_list->ptr,
115 self->end_object_list->size,
126 impl_afw_content_type_object_list_writer_write_object(
139 if (self->object_count > 0 &&
140 self->object_separator &&
141 self->object_separator->size > 0)
143 self->callback(self->context,
144 self->object_separator->ptr,
145 self->object_separator->size,
150 (
self->object_count)++;
153 value, self->options, p, xctx);
154 self->callback(self->context, raw->ptr, raw->size, p, xctx);
AFW_DEFINE(const afw_object_t *)
Interface afw_interface implementation declares.
Adaptive Framework Core Internal.
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.
apr_size_t afw_size_t
size_t.
afw_size_t(* afw_write_cb_t)(void *context, const void *buffer, afw_size_t size, const afw_pool_t *p, afw_xctx_t *xctx)
Typedef for write callback function.
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.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
Interface afw_content_type_object_list_writer public struct.
Interface afw_content_type public struct.
Struct for memory pointer and size.
Struct for object processing options.
Interface afw_object public struct.
Interface afw_pool public struct.
Interface afw_value public struct.
Interface afw_xctx public struct.