9 #ifndef __AFW_ADAPTOR_IMPL_H__
10 #define __AFW_ADAPTOR_IMPL_H__
43 #define AFW_ADAPTOR_IMPL_LOCK_READ_BEGIN(adaptor) \
44 AFW_LOCK_READ_BEGIN((adaptor)->impl->adaptor_lock_rw)
52 #define AFW_ADAPTOR_IMPL_LOCK_READ_END \
69 #define AFW_ADAPTOR_IMPL_LOCK_WRITE_BEGIN(adaptor) \
70 AFW_LOCK_WRITE_BEGIN((adaptor)->impl->adaptor_lock_rw)
78 #define AFW_ADAPTOR_IMPL_LOCK_WRITE_END \
449 #define AFW_ADAPTOR_IMPL_ERROR_ADAPTOR_IMMUTABLE \
450 AFW_THROW_ERROR_Z(read_only, "Adaptor is read-only.", xctx)
#define AFW_BEGIN_DECLARES
#define AFW_DECLARE(type)
Declare a public afw function.
Interfaceafw_interface header.
AFW_DECLARE_CONST_DATA(afw_utf8_t) afw_s_200
afw_utf8_t for string 200
void afw_adaptor_impl_throw_property_invalid(const afw_adaptor_t *adaptor, const afw_utf8_t *property_name, afw_xctx_t *xctx)
Developers should call this for configuration property errors.
void afw_adaptor_impl_throw_property_required(const afw_adaptor_t *adaptor, const afw_utf8_t *property_name, afw_xctx_t *xctx)
Developers should call this for missing required configuration property.
const afw_object_t * afw_adaptor_impl_generic_object_type_object_get(const afw_adaptor_t *adaptor, const afw_utf8_t *object_type_id, const afw_pool_t *p, afw_xctx_t *xctx)
Create a generic object type object.
void afw_adaptor_impl_push_qualifiers(const afw_adaptor_t *adaptor, afw_xctx_t *xctx)
Push adaptor qualifiers to xctx.
void afw_adaptor_impl_call_object_cb_from_list(const afw_list_t *list, void *context, afw_object_cb_t callback, afw_xctx_t *xctx)
Call object cb from list.
void afw_adaptor_impl_object_type_cache_initialize(afw_adaptor_object_type_cache_t *object_type_cache, const afw_adaptor_object_type_cache_inf_t *inf, const afw_adaptor_session_t *session, afw_boolean_t all_object_types_immutable, afw_xctx_t *xctx)
Initialize object type cache instance.
afw_adaptor_t * afw_adaptor_impl_create_cede_p(const afw_adaptor_inf_t *inf, afw_size_t instance_size, const afw_object_t *properties, const afw_pool_t *p, afw_xctx_t *xctx)
Developers should call this in all create functions for afw_adaptor.
afw_adaptor_impl_object_type_cache_inf
inf for an implementation of afw_adaptor_object_type_cache.
struct afw_adaptor_impl_core_object_type_s afw_adaptor_impl_core_object_type_t
afw_adaptor_impl_t supported_core_object_types entry.
void afw_adaptor_impl_set_object_types_fully_loaded(const afw_adaptor_t *adaptor, afw_xctx_t *xctx)
Set object types fully loaded.
void afw_adaptor_impl_set_supported_core_object_type(const afw_adaptor_t *adaptor, const afw_utf8_t *object_type_id, afw_boolean_t allow_entity, afw_boolean_t allow_write, afw_xctx_t *xctx)
Indicates support of a core object type.
afw_boolean_t afw_adaptor_impl_is_journal_entry_applicable(const afw_adaptor_journal_t *instance, const afw_object_t *entry, const afw_object_t *consumer, const afw_value_t *const *filter, afw_xctx_t *xctx)
Determine whether a journal entry is applicable to a consumer.
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.
struct afw_authorization_policy_location_s afw_authorization_policy_location_t
apr_size_t afw_size_t
size_t.
apr_int64_t afw_integer_t
typedef for big signed int.
afw_adaptor_impl_t supported_core_object_types entry.
Internal request info used by afw_adaptor_impl*() functions.
const afw_utf8_t * resource_id
resource id
const afw_object_t * journal_entry
Journal entry.
const afw_object_t * request
Request object.
const afw_pool_t * p
Pool used.
const afw_object_options_t * options
Object options.
Internal struct used by common adaptor code for all adaptors.
apr_hash_t * object_types_ht
If not NULL, object types that last for the life of the adaptor.
AFW_ATOMIC afw_integer_t modify_object_count
modify_object() count.
const afw_utf8_t * authorization_handler_id
Authorization handler id.
const afw_object_t * metrics_object
Metrics object.
const afw_model_location_t * model_location
Model location struct if this adaptor is a model location.
AFW_ATOMIC afw_integer_t add_object_count
add_object() count.
AFW_ATOMIC afw_integer_t get_object_count
get_object() count.
apr_hash_t * supported_core_object_types
See afw_adaptor_impl_core_object_type_t.
AFW_ATOMIC afw_integer_t update_object_count
update_object() count.
const afw_lock_rw_t * adaptor_lock_rw
Read/write lock used for changing adaptor related structs.
AFW_ATOMIC afw_integer_t delete_object_count
delete_object() count.
const afw_utf8_t * source_location
Source location associated with this adaptor.
const afw_authorization_policy_location_t * policy_location
Model location struct if this adaptor is a model location.
const afw_object_t * custom_variables
Custom variables.
afw_boolean_t object_types_fully_loaded
Object types fully loaded.
const afw_value_t * authorization
Adaptor level authorization.
const afw_adaptor_inf_t * wrapped_inf
Wrapped inf.
AFW_ATOMIC afw_integer_t replace_object_count
replace_object() count.
AFW_ATOMIC afw_integer_t retrieve_objects_count
retrieve_objects() count.
afw_boolean_t all_object_types_immutable
Object types last for lifetime of adaptor.
const afw_adaptor_t * adaptor
Associated adaptor instance.
const afw_utf8_t * adaptor_id
Pointer to adaptor id.
const afw_utf8_t * journal_adaptor_id
Journal adaptor id (FIXME Going away)
Internal session info used by afw_adaptor_impl*() functions.
const afw_adaptor_session_t * wrapped_session
Session this common impl wraps.
const afw_adaptor_journal_t * wrapped_journal
Journal this common impl wraps.
afw_adaptor_session_t pub
Public part of session.
afw_adaptor_journal_t journal_pub
Public part of journal.
Interface afw_adaptor_inf_s struct.
Interface afw_adaptor_journal public struct.
Interface afw_adaptor_object_type_cache_inf_s struct.
Interface afw_adaptor_object_type_cache public struct.
Interface afw_adaptor public struct.
Interface afw_adaptor_session public struct.
Interface afw_list public struct.
Struct used by adaptor referenced by modelLocationAdaptorId.
Struct for object processing options.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
Interface afw_xctx public struct.