18 #define AFW_IMPLEMENTATION_ID "core"
20 #include <libxml/xmlregexp.h>
24 impl_suppress_libxml2_message(
52 na, 0,
"apr_pcalloc() failed");
54 self->inf = &impl_afw_xctx_inf;
57 self->current_try = unhandled_error;
61 self->flags_count = env->pub.flags_count_allocated;
64 self->stream_anchor = afw_stream_internal_stream_anchor_create(
self);
70 "apr_array_make() failed");
77 self->libxml2_error_func = (
void *)impl_suppress_libxml2_message;
78 initGenericErrorDefaultFunc((xmlGenericErrorFunc *)&self->libxml2_error_func);
82 afw_stack_internal_set_evaluation_stack(
self);
90 afw_xctx_internal_create_finishup(
afw_xctx_t *xctx)
110 &xctx->utc_dateTime_when_created, xctx);
118 afw_xctx_internal_create_thread_xctx(
130 self->thread = thread;
137 afw_xctx_internal_create_finishup(xctx);
160 self->thread = xctx->thread;
167 afw_xctx_internal_create_finishup(xctx);
188 qualifier_passed = qualifier && qualifier->len != 0;
191 if (!qualifier_passed) {
194 cur = bottom + ((
afw_size_t)xctx->stack->nelts - 1);
206 e_cur = xctx->qualifier_stack->top;
207 e_cur >= xctx->qualifier_stack->first;
214 if (qualifier_passed) {
220 if (!e_cur->
secure && xctx->secure) {
224 result = e_cur->
get(e_cur, name, xctx);
243 stopat = bottom + xctx->current_frame_index,
244 cur = bottom + ((
afw_size_t)xctx->stack->nelts - 1);
297 stopat = bottom + xctx->current_frame_index,
298 cur = bottom + ((
afw_size_t)xctx->stack->nelts - 1);
319 return (
int)(xctx->qualifier_stack->top - xctx->qualifier_stack->first);
329 xctx->qualifier_stack->first + top;
346 for (iterator = NULL;
348 context_object, &iterator, &qualifier_name, xctx)); )
371 if (!qualifier || qualifier->len == 0) {
394 impl_get_object_variable(
420 if (qualifier_name) {
424 entry->
get = impl_get_object_variable;
434 impl_afw_xctx_release(
439 afw_stream_internal_release_all_streams(xctx);
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
Interface afw_interface implementation declares.
void afw_application_internal_push_qualifiers(afw_xctx_t *xctx)
Push application qualifiers on xctx's qualifier stack.
afw_authorization_mode_id_user_value
AdaptiveAuthorizationMode user.
#define afw_object_old_get_next_property_as_object(object, iterator, property_name, xctx)
Get next property function for data type object value.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
struct afw_xctx_internal_qualifier_stack_s afw_xctx_qualifier_stack_t
Typedef for xctx qualifier stack.
struct afw_iterator_s afw_iterator_t
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
apr_size_t afw_size_t
size_t.
const afw_value_t *(* afw_xctx_get_variable_t)(const afw_xctx_qualifier_stack_entry_t *entry, const afw_utf8_t *name, afw_xctx_t *xctx)
Typedef for function to get a qualified variable.
apr_int64_t afw_integer_t
typedef for big signed int.
#define AFW_THROW_UNHANDLED_ERROR(unhandled_error, _ERROR, _CODE, _RV_SOURCE_ID, _RV, _MESSAGE_Z)
#define AFW_THROW_ERROR_FZ(code, xctx, format_z,...)
Macro used to set error and 0 rv in xctx and throw it.
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
#define afw_memory_clear(to)
Clear preallocated memory for sizeof(*(to)).
#define afw_object_get_property(instance, property_name, xctx)
Call method get_property of interface afw_object.
#define afw_object_create(p, xctx)
Create an empty unmanaged object in memory.
#define afw_pool_destroy(instance, xctx)
Call method destroy of interface afw_pool.
#define afw_pool_get_apr_pool(instance)
Call method get_apr_pool of interface afw_pool.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
afw_stack_internal_set_qualifier_stack(afw_xctx_t *xctx)
#define afw_stack_push_and_get_entry(instance, entry, xctx)
Increment stack->top to location of next entry and get entry.
afw_dateTime_set_now(afw_dateTime_t *dateTime_local, afw_dateTime_t *dateTime_utc, afw_xctx_t *xctx)
Set local and/or utc dateTime to now.
afw_boolean_t afw_utf8_equal(const afw_utf8_t *s1, const afw_utf8_t *s2)
Check to see if a string equals another string.
afw_uuid_create_utf8(const afw_pool_t *p, afw_xctx_t *xctx)
Create a UUID as a standard format UUID utf-8 string.
afw_xctx_internal_create_initialize(afw_try_t *unhandled_error, afw_error_t *error, afw_environment_internal_t *env, const afw_pool_t *p)
afw_xctx_define_variable(const afw_utf8_t *name, const afw_value_t *value, afw_xctx_t *xctx)
Defined a variable in current xctx frame.
afw_xctx_set_local_variable(const afw_utf8_t *name, const afw_value_t *value, afw_xctx_t *xctx)
Set a variable then current xctx frame.
afw_xctx_get_qualified_variable(const afw_utf8_t *qualifier, const afw_utf8_t *name, afw_xctx_t *xctx)
Get a variable from xctx stack.
afw_xctx_get_qualifier_stack_top(afw_xctx_t *xctx)
Get qualifier stack top.
afw_xctx_push_qualifier_object(const afw_utf8_t *qualifier_name, const afw_object_t *qualifier_object, afw_boolean_t secure, const afw_pool_t *p, afw_xctx_t *xctx)
Push qualifier object on to stack.
afw_xctx_push_qualifiers_object(const afw_object_t *context_object, afw_boolean_t secure, const afw_pool_t *p, afw_xctx_t *xctx)
Push qualifiers object on to stack.
afw_xctx_set_qualifier_stack_top(int top, afw_xctx_t *xctx)
Set stack top index.
afw_xctx_create(const afw_utf8_t *name, afw_integer_t number, afw_xctx_t *xctx)
Create an Adaptive Framework xctx.
afw_xctx_set_defined_variable(const afw_utf8_t *name, const afw_value_t *value, afw_xctx_t *xctx)
Set a defined variable in xctx.
afw_xctx_push_qualifier(const afw_utf8_t *qualifier, const afw_object_t *qualifier_object, afw_boolean_t secure, afw_xctx_get_variable_t get, void *data, const afw_pool_t *p, afw_xctx_t *xctx)
Push qualifier on to stack.
Struct for typedef afw_environment_t defined in afw_common.h.
Adaptive Framework Error.
Typedef for name/value pair.
Interface afw_object public struct.
Interface afw_pool public struct.
Struct for public part of afw_pool_t.
const afw_pool_t * p
The thread specific pool for the thread.
const afw_utf8_t * name
The name passed on afw_thread_create().
NFC normalized UTF-8 string.
Interface afw_value public struct.
const afw_object_t * qualifier_object
qualifier_object. This may be NULL now.
void * data
Data that will be passed to get/set.
const afw_pool_t * p
Pool used while processing entry.
afw_utf8_t qualifier
qualifier or len=0 if unqualified.
afw_xctx_get_variable_t get
Get routine or NULL if get not allowed.
afw_boolean_t secure
Secure access to this qualifier is allowed.
Interface afw_xctx public struct.