16 #include <unicode/utypes.h>
20 afw_function_internal_prepare_environment(
afw_xctx_t *xctx);
28 static const afw_utf8_t impl_s_description_initialEnvironmentVariables =
32 static const afw_utf8_z_t * impl_rv_decoder_z_apr(
int rv,
35 return apr_strerror(rv, wa, wa_size);
40 static const afw_utf8_z_t * impl_rv_decoder_z_icu(
int rv,
43 return u_errorName(rv);
47 void *original_context;
54 impl_AdaptiveLayoutComponentType_retrieve_cb(
63 if (ctx->skip_runtime) {
66 object->meta.
id, xctx))
71 " ignored because AFW core or an extension supplies it",
77 ctx->original_callback(
object, ctx->original_context, xctx);
86 impl_AdaptiveLayoutComponentType_retrieve_objects(
100 ctx.original_callback = callback;
101 ctx.original_context = context;
102 ctx.skip_runtime =
false;
106 impl_AdaptiveLayoutComponentType_retrieve_cb, xctx);
110 ctx.skip_runtime =
true;
114 object_type_id, criteria, (
void *)&ctx,
115 impl_AdaptiveLayoutComponentType_retrieve_cb,
120 callback(NULL, context, xctx);
127 impl_AdaptiveLayoutComponentType_get_object(
144 callback(
object, context, xctx);
152 object_type_id, object_id,
154 adaptor_type_specific,
160 callback(NULL, context, xctx);
166 impl_create_environment_variables_object(
169 extern char **environ;
180 &afw_s__AdaptiveSystemInfo_,
181 &afw_s_initialEnvironmentVariables,
184 &impl_s_description_initialEnvironmentVariables, xctx);
187 for (v = environ; *v; v++)
189 for (s = c = *v; *c !=
'=' && *c != 0; c++);
227 env->pub.
NaN = sqrt(-1);
234 env->core_data_types_registered =
true;
235 env->core_functions_registered =
true;
236 env->core_object_type_maps_registered =
true;
240 impl_rv_decoder_z_apr, xctx);
244 impl_rv_decoder_z_icu, xctx);
247 afw_flag_internal_early_register_core(xctx);
250 afw_value_register_core_value_infs(xctx);
256 afw_function_internal_prepare_environment(xctx);
260 impl_create_environment_variables_object(xctx);
271 afw_adaptor_internal_conf_type_create_cede_p,
272 &afw_s_a_adaptor_title,
273 &afw_s_a_adaptor_description,
276 &afw_s__AdaptiveAdaptor_,
279 &afw_s__AdaptiveAdaptorType_,
289 afw_adaptor_internal_register_service_type(xctx);
295 &afw_s_a_application_title,
296 &afw_s_a_application_description,
299 &afw_s__AdaptiveApplication_,
310 &afw_s_a_extension_title,
311 &afw_s_a_extension_description,
314 &afw_s__AdaptiveExtension_,
326 &afw_s_a_log_description,
329 &afw_s__AdaptiveLog_,
332 &afw_s__AdaptiveLogType_,
337 afw_log_internal_register_service_type(xctx);
341 &afw_s_requestHandler,
343 &afw_s_a_requestHandler_title,
344 &afw_s_a_requestHandler_description,
347 &afw_s__AdaptiveRequestHandler_,
348 &afw_s_requestHandlerType,
350 &afw_s__AdaptiveRequestHandlerType_,
357 &adaptor_factory->adaptor_type,
358 adaptor_factory, xctx);
361 afw_adaptor_internal_register_afw_adaptor(xctx);
366 &log_factory->log_type,
372 afw_service_internal_AdaptiveService_retrieve_objects;
374 afw_service_internal_AdaptiveService_get_object;
376 &afw_s__AdaptiveService_,
377 runtime_custom, xctx);
382 impl_AdaptiveLayoutComponentType_retrieve_objects;
384 impl_AdaptiveLayoutComponentType_get_object;
386 &afw_s__AdaptiveLayoutComponentType_,
387 runtime_custom, xctx);
392 &adaptor_factory->adaptor_type,
393 adaptor_factory, xctx);
401 afw_model_internal_register_context_type_model(xctx);
409 afw_authorization_internal_register(xctx);
414 &AFW_REQUEST_HANDLER_S_SINGLETON_KEY_HEAD,
420 &afw_s__AdaptiveApplicationComponents_,
421 &afw_s_current, afw_components,
true, xctx);
436 afw_content_type_application_afw_register(
afw_xctx_t *xctx);
437 afw_content_type_application_afw_register(xctx);
#define AFW_DECLARE_INTERNAL(type)
Declare an internal function for /src/afw/ source*.h files.
void afw_generated_register(afw_xctx_t *xctx)
Generated register for afw.
Adaptive Framework Core Internal.
#define afw_adaptor_session_retrieve_objects(instance, impl_request, object_type_id, criteria, context, callback, adaptor_type_specific, p, xctx)
Call method retrieve_objects of interface afw_adaptor_session.
#define afw_adaptor_session_get_object(instance, impl_request, object_type_id, object_id, context, callback, adaptor_type_specific, p, xctx)
Call method get_object of interface afw_adaptor_session.
afw_adaptor_session_get_cached(const afw_utf8_t *adaptor_id, afw_boolean_t begin_transaction, afw_xctx_t *xctx)
Get/create an active cached session for adaptor_id.
void afw_application_internal_register_basic_application_context_type(afw_xctx_t *xctx)
Set basic application context type.
void afw_application_internal_application_conf_type_create_cede_p(const afw_utf8_t *type, const afw_object_t *entry, const afw_utf8_t *source_location, const afw_pool_t *p, afw_xctx_t *xctx)
type=application conf handler.
afw_value_create_double(double internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type double value.
afw_object_set_property_as_string(const afw_object_t *object, const afw_utf8_t *property_name, const afw_utf8_t *internal, afw_xctx_t *xctx)
Set property function for data type string values.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
#define AFW_UTF8_Z_LEN
String is NUL (0) terminate.
afw_boolean_t(* afw_object_cb_t)(const afw_object_t *object, void *context, afw_xctx_t *xctx)
Typedef for afw_adaptor_session_object callback.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
double afw_double_t
Normal AFW number is double.
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
apr_size_t afw_size_t
size_t.
void afw_environment_internal_register_core(afw_xctx_t *xctx)
void afw_environment_internal_extension_conf_type_create_cede_p(const afw_utf8_t *type, const afw_object_t *entry, const afw_utf8_t *source_location, const afw_pool_t *p, afw_xctx_t *xctx)
type=extension conf handler.
void afw_environment_register_request_handler_type(const afw_utf8_t *handler_type, const afw_request_handler_factory_t *request_handler_factory, afw_xctx_t *xctx)
Register a request_handler factory.
void afw_environment_register_runtime_custom(const afw_utf8_t *object_type_id, const afw_runtime_custom_t *custom, afw_xctx_t *xctx)
Register afw_runtime_custom_t for a custom handled runtime object type.
void afw_environment_register_singleton(const afw_utf8_t *singleton_key, const void *void_ptr, afw_xctx_t *xctx)
Register an singleton.
afw_environment_register_adaptor_type(const afw_utf8_t *adaptor_type, const afw_adaptor_factory_t *adaptor_factory, afw_xctx_t *xctx)
Register an adaptor factory.
afw_environment_create_and_register_conf_type(const afw_utf8_t *conf_type_id, afw_environment_conf_type_create_cede_p_t create, const afw_utf8_t *title, const afw_utf8_t *description, const afw_utf8_t *id_property_name, const afw_utf8_t *id_registry_type_id, const afw_utf8_t *id_runtime_object_type_id, const afw_utf8_t *subtype_property_name, const afw_utf8_t *subtype_registry_type_id, const afw_utf8_t *subtype_runtime_object_type_id, afw_boolean_t is_unique, afw_xctx_t *xctx)
Create and register a configuration (conf) type.
void afw_environment_register_log_type(const afw_utf8_t *log_type, const afw_log_factory_t *log_factory, afw_xctx_t *xctx)
Register an log factory.
afw_environment_registry_object_get_current(afw_xctx_t *xctx)
Get current environment registry object.
void afw_environment_register_error_rv_decoder(const afw_utf8_t *rv_source_id, afw_environment_error_rv_decoder_z_t rv_decoder, afw_xctx_t *xctx)
Register an error rv decoder.
afw_file_adaptor_factory_get()
Get the factory for file adaptor.
void afw_json_register(afw_xctx_t *xctx)
Register JSON support.
void afw_log_internal_conf_type_create_cede_p(const afw_utf8_t *type, const afw_object_t *conf, const afw_utf8_t *source_location, const afw_pool_t *p, afw_xctx_t *xctx)
Configuration handler for entry type "log".
const afw_log_factory_t * afw_log_standard_factory_get()
Get the factory for log type standard.
#define AFW_LOG_FZ(priority, xctx, format_z,...)
Log an message to environment's log using a printf style format and parameters.
afw_adaptor_factory_model
#define afw_object_create(p, xctx)
Create an empty unmanaged object in memory.
void afw_os_environment_initialize(afw_xctx_t *xctx)
afw_os environment initialize
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
void afw_request_handler_internal_conf_type_create_cede_p(const afw_utf8_t *type, const afw_object_t *entry, const afw_utf8_t *source_location, const afw_pool_t *p, afw_xctx_t *xctx)
Configuration handler for entry type "requestHandler".
afw_request_handler_factory_adaptor
void afw_runtime_register_core_value_accessors(afw_xctx_t *xctx)
Register core runtime value accessors.
afw_runtime_env_create_and_set_indirect_object(const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *internal, afw_boolean_t overwrite, afw_xctx_t *xctx)
Create and set an indirect runtime object.
afw_runtime_env_set_object(const afw_object_t *object, afw_boolean_t overwrite, afw_xctx_t *xctx)
Set an object pointer in the environment's runtime objects.
afw_runtime_get_object(const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_xctx_t *xctx)
Get a runtime object.
afw_runtime_foreach(const afw_utf8_t *object_type_id, void *context, afw_object_cb_t callback, afw_xctx_t *xctx)
Call a callback for each runtime object.
afw_runtime_get_adaptor_factory()
Get singleton factory for runtime adaptor.
#define afw_utf8_create_copy(s, len, p, xctx)
Make a utf-8 sting from chars in pool specified.
#define afw_xctx_calloc_type(type, xctx)
Macro to allocate cleared memory to hold type in xctx's pool.
Interface afw_adaptor_factory public struct.
Internal request info used by afw_adaptor_impl*() functions.
Interface afw_adaptor_session public struct.
afw_double_t minus_infinity
Double minus infinity.
afw_double_t NaN
Double NaN.
const afw_object_t * initial_environment_variables
Environment variables at environment create.
const afw_pool_t * p
Pool used to hold environment.
const afw_value_t * NaN_value
Double NaN value.
const afw_value_t * infinity_value
Double infinity value.
const afw_utf8_t * layout_adaptor_id
Custom layout adaptor or NULL.
afw_double_t infinity
Double infinity.
const afw_value_t * minus_infinity_value
Double minus infinity value.
Interface afw_log_factory public struct.
Interface afw_object public struct.
Interface afw_pool public struct.
afw_adaptor_session_get_object_t get_object
The session get_object method.
afw_adaptor_session_retrieve_objects_t retrieve_objects
The session retrieve_objects method.
NFC normalized UTF-8 string.
Interface afw_xctx public struct.