20 apr_array_header_t *ary;
25 #define AFW_IMPLEMENTATION_ID "afw_utf8_stream"
32 impl_afw_stream_write_cb(
42 for (i = 0; i < size; i++) {
43 APR_ARRAY_PUSH(self->ary,
char) =
64 self->pub.inf = &impl_afw_stream_inf;
66 self->pub.streamId = streamId;
67 self->pub.write_cb = impl_afw_stream_write_cb;
85 if (stream->inf != &impl_afw_stream_inf) {
87 "afw_utf8_stream_get_current_cached_string() can only be called "
88 "by stream created by afw_utf8_stream_create()", xctx);
90 current_cached_string->s =
self->ary->elts;
91 current_cached_string->len =
self->ary->nelts;
99 impl_afw_stream_release(
114 impl_afw_stream_flush(
156 for (count = 0; count < size; count++) {
157 APR_ARRAY_PUSH(self->ary,
char) = *c++;
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
apr_size_t afw_size_t
size_t.
unsigned char afw_octet_t
8 bits (unsigned).
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
#define afw_pool_get_apr_pool(instance)
Call method get_apr_pool of interface afw_pool.
#define afw_pool_release(instance, xctx)
Call method release of interface afw_pool.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
void impl_afw_stream_write(const afw_stream_t *instance, const void *buffer, afw_size_t size, afw_xctx_t *xctx)
void impl_afw_stream_read(const afw_stream_t *instance, const void *buffer, afw_size_t size, afw_xctx_t *xctx)
afw_utf8_stream_get_current_cached_string(const afw_stream_t *stream, afw_utf8_t *current_cached_string, afw_xctx_t *xctx)
Get the current string in a UTF-8 writer.
afw_utf8_stream_create(const afw_utf8_t *streamId, const afw_pool_t *p, afw_xctx_t *xctx)
Create UTF-8 stream.
Interface afw_pool public struct.
Interface afw_stream public struct.
NFC normalized UTF-8 string.
Interface afw_xctx public struct.