Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_adaptor_impl.c
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Helpers for afw_adaptor implementation development
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
14 #include "afw_internal.h"
15 #include "afw_model_location.h"
16 
17 /* Declares and rti/inf defines for interface afw_adaptor */
18 #define AFW_IMPLEMENTATION_ID "adaptor_impl"
22 
23 #define AFW_IMPLEMENTATION_INF_SPECIFIER AFW_DEFINE_CONST_DATA
24 #define AFW_IMPLEMENTATION_INF_LABEL afw_adaptor_impl_object_type_cache_inf
26 #undef AFW_IMPLEMENTATION_INF_SPECIFIER
27 #undef AFW_IMPLEMENTATION_INF_LABEL
28 
29 
30 typedef struct {
31  apr_hash_t *ht;
32  void *original_context;
33  afw_object_cb_t original_callback;
34  void *impl_callback_context;
35  afw_object_cb_t impl_callback;
36  afw_integer_t retrieved_object_count;
37 
38  const afw_pool_t *p;
40  const afw_adaptor_impl_request_t *impl_request;
41 
43 
44 
45 
46 static void
47 impl_set_trace_flag_fields(
48  afw_adaptor_t *adaptor,
49  afw_xctx_t *xctx)
50 {
51  const afw_pool_t *p = adaptor->p;
52  const afw_pool_t *env_p = xctx->env->p;
53  const afw_utf8_t *flag_id;
54  const afw_utf8_t *brief;
55  const afw_utf8_t *description;
56  const afw_utf8_t *included_by_flag_id;
57  const afw_flag_t *flag;
58 
59  /* adaptor_id_trace_flag_id */
60  adaptor->trace_flag_id =
61  afw_utf8_printf(p, xctx,
62  "trace:adaptorId:%" AFW_UTF8_FMT,
63  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
64 
65  /* adaptor_id_detail_flag_id */
66  adaptor->detail_flag_id =
67  afw_utf8_printf(p, xctx,
68  "trace:adaptorId:%" AFW_UTF8_FMT ":detail",
69  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
70 
71  /* adaptor_id_detail_flag_index */
73  adaptor->detail_flag_id, xctx);
74  if (!flag) {
75  flag_id = afw_utf8_clone(
76  adaptor->detail_flag_id,
77  env_p, xctx);
78 
79  brief = afw_utf8_printf(env_p, xctx,
80  "Detail trace of adaptor id %" AFW_UTF8_FMT,
81  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
82 
83  description = afw_utf8_printf(env_p, xctx,
84  "This produces a basic plus detail trace "
85  "of adaptor id %" AFW_UTF8_FMT ".",
86  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
87 
88  included_by_flag_id = afw_utf8_printf(env_p, xctx,
89  "trace:adaptorType:%" AFW_UTF8_FMT ":detail",
90  AFW_UTF8_FMT_ARG(adaptor->adaptor_type_id));
91 
92  afw_environment_register_flag(flag_id, brief, description,
93  included_by_flag_id, xctx);
94 
96  adaptor->detail_flag_id, xctx);
97  }
98  adaptor->detail_flag_index = flag->flag_index;
99 
100 
101  /* adaptor_id_trace_flag_index */
103  adaptor->trace_flag_id, xctx);
104  if (!flag) {
105  flag_id = afw_utf8_clone(
106  adaptor->trace_flag_id,
107  env_p, xctx);
108 
109  brief = afw_utf8_printf(env_p, xctx,
110  "Trace adaptor id %" AFW_UTF8_FMT,
111  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
112 
113  description = afw_utf8_printf(env_p, xctx,
114  "This produces a basic trace of adaptor id %" AFW_UTF8_FMT ".",
115  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
116 
117  included_by_flag_id = afw_utf8_printf(env_p, xctx,
118  "trace:adaptorType:%" AFW_UTF8_FMT,
119  AFW_UTF8_FMT_ARG(adaptor->adaptor_type_id));
120 
121  afw_environment_register_flag(flag_id, brief, description,
122  included_by_flag_id, xctx);
123 
124  afw_flag_add_included_by(adaptor->trace_flag_id,
125  adaptor->detail_flag_id, xctx);
126 
128  adaptor->trace_flag_id, xctx);
129  }
130  adaptor->trace_flag_index = flag->flag_index;
131 
132 }
133 
134 
135 
136 AFW_DEFINE(void)
138  const afw_adaptor_t *adaptor,
139  const afw_utf8_t *property_name,
140  afw_xctx_t *xctx)
141 {
142  AFW_THROW_ERROR_FZ(general, xctx,
143  "%"
145  "Configuration type=adaptor, adaptorType=%"
147  " property name %"
149  " is not valid.",
150  AFW_UTF8_FMT_ARG(adaptor->impl->source_location),
151  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id),
152  AFW_UTF8_FMT_ARG(property_name));
153 }
154 
155 
156 
157 AFW_DEFINE(void)
159  const afw_adaptor_t *adaptor,
160  const afw_utf8_t *property_name,
161  afw_xctx_t *xctx)
162 {
163  AFW_THROW_ERROR_FZ(general, xctx,
164  "%" AFW_UTF8_FMT
165  " Configuration type=adaptor, adaptorType=%" AFW_UTF8_FMT
166  " property name %" AFW_UTF8_FMT
167  " is required.",
168  AFW_UTF8_FMT_ARG(adaptor->impl->source_location),
169  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id),
170  AFW_UTF8_FMT_ARG(property_name));
171 }
172 
173 
174 
175 /* Get common variable callback. */
176 static const afw_value_t *
177 impl_adaptor_common_variable_get_cb(
179  const afw_utf8_t *name,
180  afw_xctx_t *xctx)
181 {
182  const afw_value_t *result;
183 
184  result = NULL;
187  return result;
188 }
189 
190 
191 
192 /* Push adaptor qualifiers to xctx. */
193 AFW_DEFINE(void)
195  const afw_adaptor_t *adaptor,
196  afw_xctx_t *xctx)
197 {
198  afw_xctx_push_qualifier_object(&afw_s_adaptor,
199  adaptor->properties, true, xctx->p, xctx);
200  afw_xctx_push_qualifier(&afw_s_adaptor, NULL, true,
201  impl_adaptor_common_variable_get_cb, (void *)adaptor,
202  xctx->p, xctx);
203  if (adaptor->impl->custom_variables) {
204  afw_xctx_push_qualifier_object(&afw_s_custom,
205  adaptor->impl->custom_variables, true,
206  xctx->p, xctx);
207  }
208 }
209 
210 
213  const afw_adaptor_inf_t *inf,
214  afw_size_t instance_size,
215  const afw_object_t *properties,
216  const afw_pool_t *p,
217  afw_xctx_t *xctx)
218 {
219  afw_adaptor_impl_t *impl;
220  afw_adaptor_t *adaptor;
221  const afw_adaptor_session_t *temp_session;
222  const afw_utf8_t *s;
223  const afw_authorization_handler_t *authorization_handler;
224  afw_boolean_t b;
225 
226  /* Allocate new adaptor instance. */
227  adaptor = (afw_adaptor_t *)afw_pool_calloc(p,
228  (instance_size != 0) ? instance_size : sizeof(afw_adaptor_t),
229  xctx);
230  adaptor->inf = &impl_afw_adaptor_inf;
231  adaptor->p = p;
232  adaptor->adaptor_type_id = afw_object_old_get_property_as_string(
233  properties, &afw_s_adaptorType, xctx);
234  impl = afw_pool_calloc_type(p, afw_adaptor_impl_t, xctx);
235  adaptor->impl = impl;
236  impl->adaptor = adaptor;
237  impl->wrapped_inf = inf;
238 
239  /* Prepare properties. */
240  adaptor->properties = afw_environment_prepare_conf_type_properties(
241  properties, xctx);
242 
243  /* Get adaptorType from properties. */
244  adaptor->adaptor_type_id = afw_object_old_get_property_as_string(
245  properties, &afw_s_adaptorType, xctx);
246 
247  /* Get source location. Default it to adaptor. */
249  properties, &afw_s_sourceLocation, xctx);
250  if (!impl->source_location) {
251  impl->source_location = &afw_s_adaptor;
252  }
253 
254  /* Get adaptor_id from parameters. */
256  &afw_s_adaptorId, p, xctx);
257 
258  if (!s) {
259  AFW_THROW_ERROR_FZ(general, xctx,
260  "%" AFW_UTF8_FMT " requires id property.",
262  }
263  afw_memory_copy(&adaptor->adaptor_id, s);
264  impl->adaptor_id = &adaptor->adaptor_id;
265 
266  /* Create lock. */
267  s = afw_utf8_printf(p, xctx,
268  "adaptor_id:%" AFW_UTF8_FMT,
270  if (!afw_environment_get_lock(s, xctx)) {
272  afw_utf8_clone(s, xctx->env->p, xctx),
273  afw_utf8_printf(xctx->env->p, xctx,
274  "Adaptor id %" AFW_UTF8_FMT " read/write lock",
276  afw_utf8_printf(xctx->env->p, xctx,
277  "Read/write lock used internally by adaptor id %" AFW_UTF8_FMT " implementation.",
279  xctx);
280  }
281 
282  /* Service id. */
283  adaptor->service_id = afw_utf8_printf(p, xctx,
284  "adaptor-%" AFW_UTF8_FMT,
286 
287  /* Set trace fields */
288  impl_set_trace_flag_fields(adaptor, xctx);
289 
290  /* Trace create */
291  afw_trace_fz(1, adaptor->trace_flag_index, adaptor, xctx,
292  "adaptorId %" AFW_UTF8_FMT " is being created",
293  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id));
294 
295  /* As default, allow read _AdaptiveObjectType_/_AdaptiveObjectType_. */
296  impl->supported_core_object_types = apr_hash_make(
299  &afw_s__AdaptiveObjectType_, true, false, xctx);
300 
301  /* Get optional authorizationHandlerId from parameters. */
303  afw_object_old_get_property_as_string(adaptor->properties,
304  &afw_s_authorizationHandlerId, xctx);
305  if (impl->authorization_handler_id)
306  {
307  authorization_handler = NULL;
308  AFW_TRY{
309  authorization_handler = afw_authorization_handler_get_reference(
310  impl->authorization_handler_id, xctx);
311  }
312  AFW_FINALLY {
313  if (authorization_handler) {
314  afw_authorization_handler_destroy(authorization_handler, xctx);
315  }
316  }
317  AFW_ENDTRY;
318  if (!authorization_handler) {
319  AFW_THROW_ERROR_FZ(general, xctx,
320  "%" AFW_UTF8_FMT
321  " authorizationHandlerId %" AFW_UTF8_FMT
322  " is not startable",
325  }
326  }
327 
328  /* Get optional journalAdaptorId from parameters. */
330  adaptor->properties, &afw_s_journalAdaptorId, xctx);
331  if (impl->journal_adaptor_id) {
332  AFW_LOG_FZ(debug, xctx,
333  "Adaptor %" AFW_UTF8_FMT
334  " specified journalAdaptorId %" AFW_UTF8_FMT
335  ".",
336  AFW_UTF8_FMT_ARG(&adaptor->adaptor_id),
338  }
339 
340  if (impl->journal_adaptor_id &&
341  !afw_utf8_equal(s, &adaptor->adaptor_id))
342  {
343  temp_session = NULL;
344  AFW_TRY{
345  temp_session = afw_adaptor_session_create(
346  impl->journal_adaptor_id, xctx);
347  if (!temp_session ||
348  !afw_adaptor_session_get_journal_interface(temp_session, xctx))
349  {
350  AFW_THROW_ERROR_FZ(general, xctx,
351  "%" AFW_UTF8_FMT
352  " Adaptor id %" AFW_UTF8_FMT
353  " specified in journalAdaptorId property is not startable"
354  " or does not support journaling.",
357  }
358  }
359  AFW_FINALLY{
360  if (temp_session) {
361  afw_adaptor_session_release(temp_session, xctx);
362  }
363  }
364  AFW_ENDTRY;
365  }
366 
367  /* Authorization */
369  properties, &afw_s_authorization, xctx);
370 
372  /* Create runtime metrics object and set in properties. */
374  &afw_s__AdaptiveAdaptorMetrics_,
375  &adaptor->adaptor_id, impl, xctx->env->p, xctx);
376 
377  /* If this is layout adaptor id, allow layout object type. */
378  if (xctx->env->layout_adaptor_id &&
379  afw_utf8_equal(xctx->env->layout_adaptor_id, &adaptor->adaptor_id))
380  {
382  &afw_s__AdaptiveLayoutComponentType_, true, true, xctx);
384  &afw_s__AdaptiveLayoutComponent_, false, true, xctx);
385  }
386 
387  /* If isModelLocation is true, provide appropriate object types. */
389  &afw_s_isModelLocation, xctx);
390  if (b) {
391  impl->model_location = afw_model_location_create(adaptor, p, xctx);
393  &afw_s__AdaptiveHybridProperties_, false, true, xctx);
395  &afw_s__AdaptiveModel_, true, true, xctx);
397  &afw_s__AdaptiveModelObjectTypes_, false, true, xctx);
399  &afw_s__AdaptiveModelObjectType_, false, true, xctx);
401  &afw_s__AdaptiveModelPropertyTypes_, false, true, xctx);
403  &afw_s__AdaptiveModelPropertyType_, false, true, xctx);
404  }
405 
439  /* Return new adaptor. */
440  return adaptor;
441 }
442 
443 
444 /* Call object cb for list. */
445 AFW_DEFINE(void)
447  const afw_list_t *list,
448  void *context,
449  afw_object_cb_t callback,
450  afw_xctx_t *xctx)
451 {
452  const afw_object_t *obj;
453  const afw_iterator_t *iterator;
454 
455  /* Call callback for each object in list. */
456  for (iterator = NULL;;) {
458  list, &iterator, xctx);
459  if (!obj) break;
460  callback(obj, context, xctx);
461  }
462 
463  /* Call one move time with NULL object.*/
464  callback(NULL, context, xctx);
465 }
466 
467 
468 /* Determine whether a journal entry is applicable to a consumer. */
471  const afw_adaptor_journal_t *instance,
472  const afw_object_t *entry,
473  const afw_object_t *consumer,
474  const afw_value_t *const *filter,
475  afw_xctx_t *xctx)
476 {
477  const afw_utf8_t *peerIdInEntry;
478  const afw_utf8_t *peerIdInConsumer;
479  afw_boolean_t is_applicable;
480 
481  is_applicable = true;
482 
483  peerIdInEntry = afw_object_old_get_property_as_string(entry,
484  &afw_s_peerId, xctx);
485  if (peerIdInEntry) {
486  peerIdInConsumer = afw_object_old_get_property_as_string(consumer,
487  &afw_s_peerId, xctx);
488  if (!peerIdInConsumer) {
489  AFW_THROW_ERROR_Z(general,
490  "Missing peerId property in "
492  " object",
493  xctx);
494  }
495  /* Not applicable if loopback. */
496  is_applicable = !afw_utf8_equal(peerIdInEntry, peerIdInConsumer);
497  }
498 
499  return is_applicable;
500 }
501 
502 
503 
504 static void
505 impl_update_allow(
506  const afw_object_t *object,
507  afw_boolean_t allow_entity,
508  afw_boolean_t allow_write,
509  afw_xctx_t *xctx)
510 {
511  afw_object_set_property(object, &afw_s_allowEntity,
512  (allow_entity) ? afw_value_true : afw_value_false, xctx);
513  afw_object_set_property(object, &afw_s_allowAdd,
514  (allow_write) ? afw_value_true : afw_value_false, xctx);
515  afw_object_set_property(object, &afw_s_allowChange,
516  (allow_write) ? afw_value_true : afw_value_false, xctx);
517  afw_object_set_property(object, &afw_s_allowDelete,
518  (allow_write) ? afw_value_true : afw_value_false, xctx);
519 }
520 
521 
522 
523 /* Indicates support of a core object type. */
524 AFW_DEFINE(void)
526  const afw_adaptor_t *adaptor,
527  const afw_utf8_t *object_type_id,
528  afw_boolean_t allow_entity,
529  afw_boolean_t allow_write,
530  afw_xctx_t *xctx)
531 {
532  const afw_pool_t *p = adaptor->p;
533  apr_hash_t *ht;
535  const afw_utf8_t *path;
536  afw_value_list_t *parent_paths;
537 
538  /* Ignore call for afw adaptor. Will cause parentPaths loops. */
539  if (afw_utf8_equal(&adaptor->adaptor_id, &afw_s_afw)) {
540  return;
541  }
542 
543  ht = adaptor->impl->supported_core_object_types;
544 
545  e = apr_hash_get(ht, object_type_id->s, object_type_id->len);
546  if (e) {
547  e->allow_entity = allow_entity;
548  e->allow_write = allow_write;
549  impl_update_allow(e->object, allow_entity, allow_write, xctx);
550  }
551  else {
552  e = afw_pool_calloc_type(p,
554  e->object_type_id = object_type_id;
555  e->object = afw_runtime_get_object(&afw_s__AdaptiveObjectType_,
556  object_type_id, xctx);
557  if (!e->object) {
558  AFW_THROW_ERROR_Z(general, "Invalid object type id", xctx);
559  }
561  e->object = afw_object_create_clone(e->object, p, xctx);
562  path = afw_object_meta_get_path(e->object, xctx);
563  afw_object_meta_set_ids(e->object, &adaptor->adaptor_id,
564  &afw_s__AdaptiveObjectType_, object_type_id, xctx);
565  parent_paths = afw_value_allocate_list(p, xctx);
566  parent_paths->internal = afw_list_create_wrapper_for_array(
567  (const void *)path, false, afw_data_type_anyURI, 1, p, xctx);
568  afw_object_meta_set_parent_paths(e->object, parent_paths, xctx);
569 
570  impl_update_allow(e->object, allow_entity, allow_write, xctx);
571 
572  apr_hash_set(ht, e->object_type_id->s, e->object_type_id->len, e);
573  }
574 }
575 
576 
577 
578 /* Create a generic object type object. */
579 AFW_DEFINE(const afw_object_t *)
581  const afw_adaptor_t *adaptor,
582  const afw_utf8_t *object_type_id,
583  const afw_pool_t *p,
584  afw_xctx_t *xctx)
585 {
586  const afw_object_t *result;
587  const afw_object_t *other_properties;
588  const afw_utf8_t *objectType;
589 
592  result = afw_object_create_managed(p, xctx);
593  objectType = afw_utf8_clone(object_type_id, result->p, xctx);
594  afw_object_meta_set_ids(result, &adaptor->adaptor_id,
595  &afw_s__AdaptiveObjectType_, objectType, xctx);
596  afw_object_set_property_as_string(result, &afw_s_objectType,
597  objectType, xctx);
599  &afw_s_allowAdd, afw_value_true, xctx);
601  &afw_s_allowChange, afw_value_true, xctx);
603  &afw_s_allowDelete, afw_value_true, xctx);
604  other_properties = afw_object_create_embedded(result,
605  &afw_s_otherProperties, xctx);
606  afw_object_set_property_as_boolean(other_properties,
607  &afw_s_allowQuery, afw_value_true, xctx);
608  afw_object_set_property_as_boolean(other_properties,
609  &afw_s_allowWrite, afw_value_true, xctx);
610 
611  return result;
612 }
613 
614 
615 
616 /* Initialize object type cache instance. */
617 AFW_DEFINE(void)
619  afw_adaptor_object_type_cache_t *object_type_cache,
621  const afw_adaptor_session_t *session,
622  afw_boolean_t all_object_types_immutable,
623  afw_xctx_t *xctx)
624 {
625  object_type_cache->inf = inf;
626  object_type_cache->session = session;
627  object_type_cache->all_object_types_immutable =
628  all_object_types_immutable;
629 }
630 
631 
632 /* Set object types fully loaded. */
633 AFW_DEFINE(void)
635  const afw_adaptor_t *adaptor,
636  afw_xctx_t *xctx)
637 {
638  afw_adaptor_impl_t *impl;
639 
640  impl = (afw_adaptor_impl_t *)adaptor->impl;
641  impl->object_types_fully_loaded = true;
642 }
643 
644 
645 /*
646  * Implementation of method get for interface afw_adaptor_object_type_cache.
647  */
648 const afw_object_type_t *
649 impl_afw_adaptor_object_type_cache_get(
650  const afw_adaptor_object_type_cache_t *instance,
651  const afw_utf8_t *object_type_id,
652  afw_boolean_t *final_result,
653  afw_xctx_t *xctx)
654 {
655  const afw_object_type_t *result;
656  const afw_adaptor_t *adaptor;
657  afw_adaptor_impl_t *impl;
658 
659  adaptor = instance->session->adaptor;
660  impl = (afw_adaptor_impl_t *)adaptor->impl;
661  *final_result = impl->object_types_fully_loaded;
662 
663  if (!impl->object_types_ht) {
664  return NULL;
665  }
666 
668  result = apr_hash_get(adaptor->impl->object_types_ht,
669  object_type_id->s, object_type_id->len);
670  }
672 
673  return result;
674 }
675 
676 
677 
678 /*
679  * Implementation of method set for interface afw_adaptor_object_type_cache.
680  */
681 void
682 impl_afw_adaptor_object_type_cache_set(
683  const afw_adaptor_object_type_cache_t *instance,
684  const afw_object_type_t *object_type,
685  afw_xctx_t *xctx)
686 {
687  const afw_adaptor_t *adaptor;
688  afw_adaptor_impl_t *impl;
689 
690  adaptor = instance->session->adaptor;
691  impl = (afw_adaptor_impl_t *)adaptor->impl;
692 
693  if (!impl->object_types_ht) {
694  impl->object_types_ht = apr_hash_make(
695  afw_pool_get_apr_pool(adaptor->p));
696  }
697 
699  apr_hash_set(impl->object_types_ht,
700  object_type->object_type_id->s,
701  object_type->object_type_id->len,
702  object_type);
703  }
705 }
706 
707 
708 
709 /*
710  * Implementation of method destroy of interface afw_adaptor.
711  */
712 void
714  const afw_adaptor_t *instance,
715  afw_xctx_t *xctx)
716 {
717  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->impl;
718 
721  /* Call wrapped instance method. */
722  impl->wrapped_inf->destroy(instance, xctx);
723 
725 }
726 
727 
728 
729 /*
730  * Implementation of method create_adaptor_session of interface afw_adaptor.
731  */
732 const afw_adaptor_session_t *
734  const afw_adaptor_t *instance,
735  afw_xctx_t *xctx)
736 {
737  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->impl;
739 
740  /* Create session self. */
742  result->pub.adaptor = instance;
743  result->pub.inf = &impl_afw_adaptor_session_inf;
744  result->pub.p = xctx->p;
745 
748  /* Call wrapped instance method. */
749  result->wrapped_session =
750  impl->wrapped_inf->create_adaptor_session(instance, xctx);
751 
754  /* Return result. */
755  return (const afw_adaptor_session_t *)result;
756 }
757 
758 
759 
760 /*
761  * Implementation of method get_additional_metrics of interface afw_adaptor.
762  */
763 const afw_object_t *
765  const afw_adaptor_t *instance,
766  const afw_pool_t *p,
767  afw_xctx_t *xctx)
768 {
769  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->impl;
770  const afw_object_t *result;
771 
774  /* Call wrapped instance method. */
775  result = impl->wrapped_inf->get_additional_metrics(instance,
776  p, xctx);
777 
780  /* Return result. */
781  return result;
782 }
783 
784 
785 /*
786  * Implementation of method destroy of interface afw_adaptor_session.
787  */
788 void
790  const afw_adaptor_session_t *instance,
791  afw_xctx_t *xctx)
792 {
793  // afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
795 
798  /* Call wrapped instance method. */
799  afw_adaptor_session_destroy(self->wrapped_session, xctx);
800 
802 }
803 
804 
805 
806 static void
807 impl_check_authorization(
809  const afw_value_t *action_id_value,
810  afw_xctx_t *xctx)
811 {
812  const afw_value_t *resource_id_value;
813  const afw_value_t *object_value;
814 
815  resource_id_value = afw_value_create_string(
816  ctx->impl_request->resource_id,
817  ctx->p, xctx);
818 
819  object_value = afw_value_create_object(
820  ctx->impl_request->request,
821  ctx->p, xctx);
822 
824  true, NULL,
825  resource_id_value,
826  object_value,
827  action_id_value,
828  ctx->p, xctx);
829 }
830 
831 
832 
833 static afw_boolean_t
834 impl_authorization_cb(
835  const afw_object_t *object,
836  void *context,
837  afw_xctx_t *xctx)
838 {
839  impl_request_context_t *ctx = context;
840  const afw_utf8_t *resource_id;
841  const afw_value_t *resource_id_value;
842  const afw_value_t *object_value;
843 
844  if (!object) {
845  return ctx->impl_callback(object, ctx->impl_callback_context, xctx);
846  }
847 
848  resource_id = afw_object_meta_get_path(object, xctx);
849  if (!resource_id) {
850  AFW_THROW_ERROR_Z(general, "Missing path", xctx);
851  }
852  resource_id_value = afw_value_create_string(resource_id, ctx->p, xctx);
853  object_value = afw_value_create_object(object, ctx->p, xctx);
854  afw_authorization_check(true, NULL,
855  resource_id_value, object_value,
856  afw_authorization_action_id_read, ctx->p, xctx);
857 
858  return ctx->impl_callback(object, ctx->impl_callback_context, xctx);
859 }
860 
861 
862 
863 static afw_boolean_t
864 impl_special_object_handling_cb(
865  const afw_object_t *object,
866  void *context,
867  afw_xctx_t *xctx)
868 {
869  impl_request_context_t *ctx = context;
870  const afw_utf8_t *type;
871  const afw_utf8_t *subtype;
872  const afw_object_t *conf;
873  const afw_service_type_t *service_type;
874  const afw_utf8_t *object_type_id;
875 
876  if (object) {
877 
878  /* _AdaptiveServiceConf_ special processing for conf object type. */
879  if (afw_utf8_equal(
881  &afw_s__AdaptiveServiceConf_))
882  {
884  &afw_s_conf, xctx);
885  if (conf) {
887  &afw_s_type, xctx);
888  if (type) {
889  service_type = afw_environment_get_service_type(
890  type, xctx);
891  if (service_type) {
893  conf,
894  service_type->conf_type->subtype_property_name,
895  xctx);
896  if (subtype) {
897  object_type_id = afw_utf8_printf(
898  object->p, xctx,
899  "_AdaptiveConf_%" AFW_UTF8_FMT
900  "_%" AFW_UTF8_FMT,
901  AFW_UTF8_FMT_ARG(type),
902  AFW_UTF8_FMT_ARG(subtype));
904  object_type_id, xctx);
905  }
906  }
907  }
908  }
909 
910  }
911 
912  }
913 
914  return ctx->original_callback(object, ctx->original_context, xctx);
915 }
916 
917 
918 static afw_boolean_t
919 impl_no_duplicate_object_type_cb(
920  const afw_object_t *object,
921  void *context,
922  afw_xctx_t *xctx)
923 {
924  impl_request_context_t *ctx = context;
925  const afw_utf8_t *object_id;
927 
928  /* Skip object types that have already been provided. */
929  if (object) {
930  object_id = afw_object_meta_get_object_id(object, xctx);
931  e = apr_hash_get(ctx->ht, object_id->s, object_id->len);
932  if (e) {
933  return false;
934  }
935  }
936 
937  /* Call original callback and return result. */
938  return ctx->original_callback(object, ctx->original_context,
939  xctx);
940 }
941 
942 
943 static afw_boolean_t
944 impl_limit_returned_objects_cb(
945  const afw_object_t *object,
946  void *context,
947  afw_xctx_t *xctx)
948 {
949  impl_request_context_t *ctx = context;
950 
952  ctx->retrieved_object_count++;
953  if (ctx->retrieved_object_count > 100) {
954  return true;
955  //AFW_THROW_ERROR_Z(payload_too_large,
956  // "Object retrieve limit exceeded.",
957  // xctx);
958  }
959 
963  /* Call original callback and return result. */
964  return ctx->original_callback(object, ctx->original_context,
965  xctx);
966 }
967 
968 
969 /*
970  * Implementation of method retrieve_objects for interface
971  * afw_adaptor_session.
972  */
973 void
975  const afw_adaptor_session_t *instance,
976  const afw_adaptor_impl_request_t *impl_request,
977  const afw_utf8_t *object_type_id,
978  const afw_query_criteria_t *criteria,
979  void *context,
980  afw_object_cb_t callback,
981  const afw_object_t *adaptor_type_specific,
982  const afw_pool_t *p,
983  afw_xctx_t *xctx)
984 {
985  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
987  const afw_adaptor_t *adaptor = instance->adaptor;
988  apr_hash_t *ht;
989  apr_hash_index_t *hi;
991  afw_utf8_t object_id;
993  const afw_utf8_t *resource_id;
994 
995  /* Initialize ctx. */
996  afw_memory_clear(&ctx);
997  ctx.p = p;
998  ctx.original_context = context;
999  ctx.original_callback = callback;
1000  ctx.impl_request = impl_request;
1001 
1002  resource_id = NULL;
1003  if (impl_request) {
1004  resource_id = impl_request->resource_id;
1005  }
1006  if (!resource_id) {
1007  resource_id = afw_utf8_printf(p, xctx,
1008  "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT,
1009  AFW_UTF8_FMT_ARG(&instance->adaptor->adaptor_id),
1010  AFW_UTF8_FMT_ARG(object_type_id));
1011  }
1012 
1013  /* Trace begin */
1014  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1015  "begin retrieve_objects "
1016  "%" AFW_UTF8_FMT,
1017  AFW_UTF8_FMT_ARG(resource_id));
1018 
1021 
1022  /* Do authorization check. */
1025  /*
1026  * Handle _AdaptiveObjectType_.
1027  *
1028  * Allow only specific object types to be returned for retrieve.
1029  *
1030  * Note: get allows all to be returned.
1031  */
1032  if (afw_utf8_equal(object_type_id, &afw_s__AdaptiveObjectType_))
1033  {
1034  ht = instance->adaptor->impl->supported_core_object_types;
1035  for (hi = apr_hash_first(afw_pool_get_apr_pool(p), ht);
1036  hi;
1037  hi = apr_hash_next(hi))
1038  {
1039  apr_hash_this(hi,
1040  (const void **)& object_id.s, (apr_ssize_t *)& object_id.len,
1041  (void **)& e);
1042  if (afw_query_criteria_test_object(e->object, criteria, p, xctx))
1043  {
1044  callback(e->object, context, xctx);
1045  }
1046  }
1047  ctx.ht = ht;
1048  ctx.impl_callback_context = &ctx;
1049  ctx.impl_callback = impl_no_duplicate_object_type_cb;
1051  self->wrapped_session, impl_request,
1052  object_type_id, criteria,
1053  &ctx, impl_authorization_cb,
1054  adaptor_type_specific,
1055  p, xctx);
1056  }
1057 
1059  else if (object_type_id && afw_utf8_starts_with(object_type_id, &afw_s__Adaptive)) {
1060  ctx.impl_callback_context = &ctx;
1061  ctx.impl_callback = impl_special_object_handling_cb;
1063  self->wrapped_session, impl_request,
1064  object_type_id, criteria,
1065  &ctx, impl_authorization_cb,
1066  adaptor_type_specific,
1067  p, xctx);
1068  }
1069 
1070  else {
1071  ctx.impl_callback_context = &ctx;
1072  ctx.impl_callback = impl_limit_returned_objects_cb;
1074  self->wrapped_session, impl_request,
1075  object_type_id, criteria,
1076  &ctx, impl_authorization_cb,
1077  adaptor_type_specific,
1078  p, xctx);
1079  }
1080 
1081 
1084  /* Trace end */
1085  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1086  "end retrieve_objects "
1087  "%" AFW_UTF8_FMT,
1088  AFW_UTF8_FMT_ARG(resource_id));
1089 }
1090 
1091 
1092 
1093 /*
1094  * Implementation of method get_object for interface afw_adaptor_session.
1095  */
1096 void
1098  const afw_adaptor_session_t *instance,
1099  const afw_adaptor_impl_request_t *impl_request,
1100  const afw_utf8_t *object_type_id,
1101  const afw_utf8_t *object_id,
1102  void *context,
1103  afw_object_cb_t callback,
1104  const afw_object_t *adaptor_type_specific,
1105  const afw_pool_t *p,
1106  afw_xctx_t *xctx)
1107 {
1108  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1110  const afw_adaptor_t *adaptor = instance->adaptor;
1111  const afw_object_t *object_type_object;
1114  const afw_utf8_t *resource_id;
1115 
1116  resource_id = NULL;
1117  if (impl_request) {
1118  resource_id = impl_request->resource_id;
1119  }
1120  if (!resource_id) {
1121  resource_id = afw_utf8_printf(p, xctx,
1122  "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT,
1123  AFW_UTF8_FMT_ARG(&instance->adaptor->adaptor_id),
1124  AFW_UTF8_FMT_ARG(object_type_id),
1125  AFW_UTF8_FMT_ARG(object_id));
1126  }
1127 
1128  /* Initialize ctx. */
1129  afw_memory_clear(&ctx);
1130  ctx.p = p;
1131  ctx.original_context = context;
1132  ctx.original_callback = callback;
1133  ctx.impl_request = impl_request;
1134 
1135  /* Trace begin */
1136  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1137  "begin get_object "
1138  "%" AFW_UTF8_FMT,
1139  AFW_UTF8_FMT_ARG(resource_id));
1140 
1143 
1144  /* Get any core object types from runtime environment. */
1145  if (afw_utf8_equal(object_type_id, &afw_s__AdaptiveObjectType_) &&
1146  afw_utf8_starts_with(object_id, &afw_s__Adaptive))
1147  {
1148  /* If object type might have different allows, return it. */
1149  e = apr_hash_get(instance->adaptor->impl->supported_core_object_types,
1150  object_id->s, object_id->len);
1151  if (e) {
1152  ctx.impl_callback_context = context;
1153  ctx.impl_callback = callback;
1154  impl_authorization_cb(e->object, &ctx, xctx);
1155  goto end_trace;
1156  }
1157 
1158  /* Return /afw/_AdaptiveObjectType_/<objectId> asis. */
1159  object_type_object = afw_runtime_get_object(
1160  object_type_id, object_id, xctx);
1161  if (object_type_object) {
1162  ctx.impl_callback_context = context;
1163  ctx.impl_callback = callback;
1164  impl_authorization_cb(object_type_object, &ctx, xctx);
1165  }
1166 
1167  /* Other special pattern object type ids that begin with _Adaptive. */
1168  else {
1169  ctx.impl_callback_context = context;
1170  ctx.impl_callback = callback;
1172  self->wrapped_session, impl_request,
1173  object_type_id, object_id,
1174  &ctx, impl_authorization_cb,
1175  adaptor_type_specific,
1176  p, xctx);
1177  }
1178  goto end_trace;
1179  }
1180 
1181  if (afw_utf8_starts_with(object_type_id, &afw_s__Adaptive)) {
1182  ctx.impl_callback_context = &ctx;
1183  ctx.impl_callback = impl_special_object_handling_cb;
1185  self->wrapped_session, impl_request,
1186  object_type_id, object_id,
1187  &ctx, impl_authorization_cb,
1188  adaptor_type_specific,
1189  p, xctx);
1190  }
1191 
1192  else {
1193  /* Call wrapped instance method. */
1194  ctx.impl_callback_context = context;
1195  ctx.impl_callback = callback;
1197  self->wrapped_session, impl_request,
1198  object_type_id, object_id,
1199  &ctx, impl_authorization_cb,
1200  adaptor_type_specific,
1201  p, xctx);
1202  }
1203 
1206 end_trace:
1207  /* Trace end */
1208  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1209  "end get_object "
1210  "%" AFW_UTF8_FMT,
1211  AFW_UTF8_FMT_ARG(resource_id));
1212 }
1213 
1214 
1215 
1216 /*
1217  * Implementation of method add_object for interface afw_adaptor_session.
1218  */
1219 const afw_utf8_t *
1221  const afw_adaptor_session_t *instance,
1222  const afw_adaptor_impl_request_t *impl_request,
1223  const afw_utf8_t *object_type_id,
1224  const afw_utf8_t *suggested_object_id,
1225  const afw_object_t *object,
1226  const afw_object_t *adaptor_type_specific,
1227  afw_xctx_t *xctx)
1228 {
1229  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1231  const afw_adaptor_t *adaptor = instance->adaptor;
1232  const afw_utf8_t *result;
1234  const afw_utf8_t *resource_id;
1235 
1236  resource_id = NULL;
1237  if (impl_request) {
1238  resource_id = impl_request->resource_id;
1239  }
1240  if (!resource_id) {
1241  resource_id = afw_utf8_printf(xctx->p, xctx,
1242  "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT,
1243  AFW_UTF8_FMT_ARG(&instance->adaptor->adaptor_id),
1244  AFW_UTF8_FMT_ARG(object_type_id),
1245  AFW_UTF8_FMT_OPTIONAL_ARG(suggested_object_id));
1246  }
1247 
1248  /* Initialize ctx. */
1249  afw_memory_clear(&ctx);
1250  ctx.p = instance->p;
1251  ctx.impl_request = impl_request;
1252 
1253  /* Trace begin */
1254  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1255  "begin add_object "
1256  "%" AFW_UTF8_FMT,
1257  AFW_UTF8_FMT_ARG(resource_id));
1258 
1261 
1262  /* Authorize */
1263  impl_check_authorization(&ctx,
1265 
1266  /* Call wrapped instance method. */
1268  self->wrapped_session, impl_request,
1269  object_type_id, suggested_object_id, object,
1270  adaptor_type_specific, xctx);
1271 
1274  /* Trace end */
1275  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1276  "end add_object "
1277  "%" AFW_UTF8_FMT,
1278  AFW_UTF8_FMT_ARG(resource_id));
1279 
1280  /* Return result. */
1281  return result;
1282 }
1283 
1284 
1285 
1286 /*
1287  * Implementation of method modify_object for interface afw_adaptor_session.
1288  */
1289 void
1291  const afw_adaptor_session_t *instance,
1292  const afw_adaptor_impl_request_t *impl_request,
1293  const afw_utf8_t *object_type_id,
1294  const afw_utf8_t *object_id,
1295  const afw_adaptor_modify_entry_t *const *entry,
1296  const afw_object_t *adaptor_type_specific,
1297  afw_xctx_t *xctx)
1298 {
1299  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1301  const afw_adaptor_t *adaptor = instance->adaptor;
1303  const afw_utf8_t *resource_id;
1304 
1305  resource_id = (impl_request)
1306  ? impl_request->resource_id
1307  : &afw_s_a_empty_string;
1308 
1309  resource_id = NULL;
1310  if (impl_request) {
1311  resource_id = impl_request->resource_id;
1312  }
1313  if (!resource_id) {
1314  resource_id = afw_utf8_printf(xctx->p, xctx,
1315  "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT,
1316  AFW_UTF8_FMT_ARG(&instance->adaptor->adaptor_id),
1317  AFW_UTF8_FMT_ARG(object_type_id),
1318  AFW_UTF8_FMT_ARG(object_id));
1319  }
1320 
1321  /* Initialize ctx. */
1322  afw_memory_clear(&ctx);
1323  ctx.p = instance->p;
1324  ctx.impl_request = impl_request;
1325 
1326  /* Trace begin */
1327  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1328  "begin modify_object "
1329  "%" AFW_UTF8_FMT,
1330  AFW_UTF8_FMT_ARG(resource_id));
1331 
1334 
1335  /* Authorize */
1336  impl_check_authorization(&ctx,
1338 
1339  /* Call wrapped instance method. */
1341  self->wrapped_session, impl_request,
1342  object_type_id, object_id, entry, adaptor_type_specific,
1343  xctx);
1344 
1347  /* Trace end */
1348  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1349  "end modify_object "
1350  "%" AFW_UTF8_FMT,
1351  AFW_UTF8_FMT_ARG(resource_id));
1352 }
1353 
1354 
1355 
1356 /*
1357  * Implementation of method replace_object for interface afw_adaptor_session.
1358  */
1359 void
1361  const afw_adaptor_session_t *instance,
1362  const afw_adaptor_impl_request_t *impl_request,
1363  const afw_utf8_t *object_type_id,
1364  const afw_utf8_t *object_id,
1365  const afw_object_t *replacement_object,
1366  const afw_object_t *adaptor_type_specific,
1367  afw_xctx_t *xctx)
1368 {
1369  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1371  const afw_adaptor_t *adaptor = instance->adaptor;
1373  const afw_utf8_t *resource_id;
1374 
1375  resource_id = NULL;
1376  if (impl_request) {
1377  resource_id = impl_request->resource_id;
1378  }
1379  if (!resource_id) {
1380  resource_id = afw_utf8_printf(xctx->p, xctx,
1381  "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT "/%" AFW_UTF8_FMT,
1382  AFW_UTF8_FMT_ARG(&instance->adaptor->adaptor_id),
1383  AFW_UTF8_FMT_ARG(object_type_id),
1384  AFW_UTF8_FMT_ARG(object_id));
1385  }
1386 
1387  /* Initialize ctx. */
1388  afw_memory_clear(&ctx);
1389  ctx.p = instance->p;
1390  ctx.impl_request = impl_request;
1391 
1392  /* Trace begin */
1393  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1394  "begin replace_object "
1395  "%" AFW_UTF8_FMT,
1396  AFW_UTF8_FMT_ARG(resource_id));
1397 
1400 
1401  /* Authorize */
1402  impl_check_authorization(&ctx,
1404 
1405  /* Call wrapped instance method. */
1407  self->wrapped_session, impl_request,
1408  object_type_id, object_id, replacement_object,
1409  adaptor_type_specific, xctx);
1410 
1413  /* Trace end */
1414  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1415  "end replace_object "
1416  "%" AFW_UTF8_FMT,
1417  AFW_UTF8_FMT_ARG(resource_id));
1418 }
1419 
1420 
1421 
1422 /*
1423  * Implementation of method delete_object for interface afw_adaptor_session.
1424  */
1425 void
1427  const afw_adaptor_session_t *instance,
1428  const afw_adaptor_impl_request_t *impl_request,
1429  const afw_utf8_t *object_type_id,
1430  const afw_utf8_t *object_id,
1431  const afw_object_t *adaptor_type_specific,
1432  afw_xctx_t *xctx)
1433 {
1434  afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1436  const afw_adaptor_t *adaptor = instance->adaptor;
1438  const afw_utf8_t *resource_id;
1439 
1440  resource_id = (impl_request)
1441  ? impl_request->resource_id
1442  : &afw_s_a_empty_string;
1443 
1444  /* Initialize ctx. */
1445  afw_memory_clear(&ctx);
1446  ctx.p = instance->p;
1447  ctx.impl_request = impl_request;
1448 
1449  /* Trace begin */
1450  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1451  "begin delete_object "
1452  "%" AFW_UTF8_FMT,
1453  AFW_UTF8_FMT_ARG(resource_id));
1454 
1457 
1458  /* Authorize */
1459  impl_check_authorization(&ctx,
1461 
1462  /* Call wrapped instance method. */
1464  self->wrapped_session, impl_request,
1465  object_type_id, object_id, adaptor_type_specific, xctx);
1466 
1469  /* Trace end */
1470  afw_trace_fz(1, adaptor->trace_flag_index, self->wrapped_session, xctx,
1471  "end delete_object "
1472  "%" AFW_UTF8_FMT,
1473  AFW_UTF8_FMT_ARG(resource_id));
1474 }
1475 
1476 
1477 
1478 /*
1479  * Implementation of method begin_transaction of interface afw_adaptor_session.
1480  */
1483  const afw_adaptor_session_t *instance,
1484  afw_xctx_t *xctx)
1485 {
1486  // afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1488  const afw_adaptor_transaction_t *result;
1489 
1492  /* Call wrapped instance method. */
1494  self->wrapped_session,
1495  xctx);
1496 
1499  /* Return result. */
1500  return result;
1501 }
1502 
1503 
1504 
1505 /*
1506  * Implementation of method get_journal_interface of interface afw_adaptor_session.
1507  */
1508 const afw_adaptor_journal_t *
1509 impl_afw_adaptor_session_get_journal_interface(
1510  const afw_adaptor_session_t *instance,
1511  afw_xctx_t *xctx)
1512 {
1514 
1515  /* Call wrapped instance method. */
1516  if (!self->wrapped_journal) {
1518  self->wrapped_session, xctx);
1519  if (self->wrapped_journal) {
1520  self->journal_pub.inf = &impl_afw_adaptor_journal_inf;
1521  self->journal_pub.session = instance;
1522  }
1523  }
1524 
1525  /* Return result. */
1526  return (self->wrapped_journal)
1527  ? &self->journal_pub
1528  : NULL;
1529 }
1530 
1531 
1532 
1533 /*
1534  * Implementation of method get_key_value_interface of interface afw_adaptor_session.
1535  */
1538  const afw_adaptor_session_t *instance,
1539  afw_xctx_t *xctx)
1540 {
1541  // afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1543  const afw_adaptor_key_value_t *result;
1544 
1547  /* Call wrapped instance method. */
1548  result = afw_adaptor_session_get_key_value_interface(self->wrapped_session,
1549  xctx);
1550 
1553  /* Return result. */
1554  return result;
1555 }
1556 
1557 
1558 
1559 /*
1560  * Implementation of method get_index_interface of interface afw_adaptor_session.
1561  */
1564  const afw_adaptor_session_t *instance,
1565  afw_xctx_t *xctx)
1566 {
1567  // afw_adaptor_impl_t *impl = (afw_adaptor_impl_t *)instance->adaptor->impl;
1569  const afw_adaptor_impl_index_t *result;
1570 
1573  /* Call wrapped instance method. */
1574  result = afw_adaptor_session_get_index_interface(self->wrapped_session,
1575  xctx);
1576 
1579  /* Return result. */
1580  return result;
1581 }
1582 
1583 
1584 /*
1585  * Implementation of method get_object_type_cache_interface for interface
1586  * afw_adaptor.
1587  */
1589 impl_afw_adaptor_session_get_object_type_cache_interface(
1590  const afw_adaptor_session_t *instance,
1591  afw_xctx_t *xctx)
1592 {
1594  const afw_adaptor_object_type_cache_t *result;
1595 
1597  self->wrapped_session, xctx);
1598 
1599  return result;
1600 }
1601 
1602 
1603 /*
1604  * Implementation of method add_entry for interface afw_adaptor_journal.
1605  */
1606 const afw_utf8_t *
1608  const afw_adaptor_journal_t * instance,
1609  const afw_adaptor_impl_request_t * impl_request,
1610  const afw_object_t * entry,
1611  afw_xctx_t *xctx)
1612 {
1614  (afw_adaptor_impl_session_t *)(instance->session);
1615  const afw_utf8_t *result;
1616 
1619  result = afw_adaptor_journal_add_entry(self->wrapped_journal,
1620  impl_request, entry, xctx);
1621  return result;
1622 }
1623 
1624 /*
1625  * Implementation of method get_entry for interface afw_adaptor_journal.
1626  */
1627 void
1629  const afw_adaptor_journal_t * instance,
1630  const afw_adaptor_impl_request_t * impl_request,
1632  const afw_utf8_t * consumer_id,
1633  const afw_utf8_t * entry_cursor,
1634  afw_size_t limit,
1635  const afw_object_t * response,
1636  afw_xctx_t *xctx)
1637 {
1639  (afw_adaptor_impl_session_t *)(instance->session);
1640 
1643  afw_adaptor_journal_get_entry(self->wrapped_journal,
1644  impl_request, option, consumer_id, entry_cursor,
1645  limit, response, xctx);
1646 }
1647 
1648 /*
1649  * Implementation of method mark_entry_consumed for interface
1650  * afw_adaptor_journal.
1651  */
1652 void
1654  const afw_adaptor_journal_t * instance,
1655  const afw_adaptor_impl_request_t * impl_request,
1656  const afw_utf8_t * consumer_id,
1657  const afw_utf8_t * entry_cursor,
1658  afw_xctx_t *xctx)
1659 {
1661  (afw_adaptor_impl_session_t *)(instance->session);
1662 
1665  afw_adaptor_journal_mark_entry_consumed(self->wrapped_journal,
1666  impl_request, consumer_id, entry_cursor, xctx);
1667 }
Interface afw_interface implementation declares.
AFW_DEFINE(const afw_object_t *)
Interface afw_interface implementation declares.
Interface afw_interface implementation declares.
Interface afw_interface implementation declares.
Adaptive Framework Core Internal.
Header file for Adaptive Framework model location.
const afw_object_t * impl_afw_adaptor_get_additional_metrics(const afw_adaptor_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
void impl_afw_adaptor_destroy(const afw_adaptor_t *instance, afw_xctx_t *xctx)
const afw_adaptor_session_t * impl_afw_adaptor_create_adaptor_session(const afw_adaptor_t *instance, afw_xctx_t *xctx)
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.
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.
#define AFW_ADAPTOR_IMPL_LOCK_WRITE_END
Macro to end an adaptor write lock section.
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.
afw_adaptor_impl_push_qualifiers(const afw_adaptor_t *adaptor, afw_xctx_t *xctx)
Push adaptor qualifiers to xctx.
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.
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.
#define AFW_ADAPTOR_IMPL_LOCK_READ_END
Macro to end an adaptor read lock section.
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.
#define AFW_ADAPTOR_IMPL_LOCK_READ_BEGIN(adaptor)
Macro to begin an adaptor read lock section.
#define AFW_ADAPTOR_IMPL_LOCK_WRITE_BEGIN(adaptor)
Macro to begin an adaptor write lock section.
afw_adaptor_impl_set_object_types_fully_loaded(const afw_adaptor_t *adaptor, afw_xctx_t *xctx)
Set object types fully loaded.
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_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.
void impl_afw_adaptor_journal_get_entry(const afw_adaptor_journal_t *instance, const afw_adaptor_impl_request_t *impl_request, afw_adaptor_journal_option_t option, const afw_utf8_t *consumer_id, const afw_utf8_t *entry_cursor, afw_size_t limit, const afw_object_t *response, afw_xctx_t *xctx)
const afw_utf8_t * impl_afw_adaptor_journal_add_entry(const afw_adaptor_journal_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_object_t *entry, afw_xctx_t *xctx)
void impl_afw_adaptor_journal_mark_entry_consumed(const afw_adaptor_journal_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *consumer_id, const afw_utf8_t *entry_cursor, afw_xctx_t *xctx)
#define afw_adaptor_journal_add_entry(instance, impl_request, entry, xctx)
Call method add_entry of interface afw_adaptor_journal.
#define afw_adaptor_journal_mark_entry_consumed(instance, impl_request, consumer_id, entry_cursor, xctx)
Call method mark_entry_consumed of interface afw_adaptor_journal.
#define afw_adaptor_journal_get_entry(instance, impl_request, option, consumer_id, entry_cursor, limit, response, xctx)
Call method get_entry of interface afw_adaptor_journal.
void impl_afw_adaptor_session_modify_object(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_adaptor_modify_entry_t *const *entry, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx)
void impl_afw_adaptor_session_replace_object(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_object_t *replacement_object, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx)
void impl_afw_adaptor_session_delete_object(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx)
void impl_afw_adaptor_session_retrieve_objects(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_query_criteria_t *criteria, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx)
const afw_adaptor_transaction_t * impl_afw_adaptor_session_begin_transaction(const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
void impl_afw_adaptor_session_destroy(const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
const afw_adaptor_impl_index_t * impl_afw_adaptor_session_get_index_interface(const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
const afw_utf8_t * impl_afw_adaptor_session_add_object(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *suggested_object_id, const afw_object_t *object, const afw_object_t *adaptor_type_specific, afw_xctx_t *xctx)
void impl_afw_adaptor_session_get_object(const afw_adaptor_session_t *instance, const afw_adaptor_impl_request_t *impl_request, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *context, afw_object_cb_t callback, const afw_object_t *adaptor_type_specific, const afw_pool_t *p, afw_xctx_t *xctx)
const afw_adaptor_key_value_t * impl_afw_adaptor_session_get_key_value_interface(const afw_adaptor_session_t *instance, afw_xctx_t *xctx)
#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_replace_object(instance, impl_request, object_type_id, object_id, replacement_object, adaptor_type_specific, xctx)
Call method replace_object of interface afw_adaptor_session.
#define afw_adaptor_session_add_object(instance, impl_request, object_type_id, suggested_object_id, object, adaptor_type_specific, xctx)
Call method add_object of interface afw_adaptor_session.
#define afw_adaptor_session_begin_transaction(instance, xctx)
Call method begin_transaction of interface afw_adaptor_session.
#define afw_adaptor_session_modify_object(instance, impl_request, object_type_id, object_id, entry, adaptor_type_specific, xctx)
Call method modify_object of interface afw_adaptor_session.
#define afw_adaptor_session_get_index_interface(instance, xctx)
Call method get_index_interface of interface afw_adaptor_session.
#define afw_adaptor_session_get_key_value_interface(instance, xctx)
Call method get_key_value_interface of interface afw_adaptor_session.
#define afw_adaptor_session_destroy(instance, xctx)
Call method destroy of interface afw_adaptor_session.
#define afw_adaptor_session_get_journal_interface(instance, xctx)
Call method get_journal_interface of interface afw_adaptor_session.
#define afw_adaptor_session_delete_object(instance, impl_request, object_type_id, object_id, adaptor_type_specific, xctx)
Call method delete_object 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.
#define afw_adaptor_session_get_object_type_cache_interface(instance, xctx)
Call method get_object_type_cache_interface of interface afw_adaptor_session.
afw_adaptor_session_release(const afw_adaptor_session_t *session, afw_xctx_t *xctx)
Release an adaptor session created by afw_adaptor_session_create().
Definition: afw_adaptor.c:282
afw_adaptor_session_create(const afw_utf8_t *adaptor_id, afw_xctx_t *xctx)
Create an adaptor session.
Definition: afw_adaptor.c:265
afw_integer_t afw_atomic_integer_increment(AFW_ATOMIC afw_integer_t *mem)
Integer atomic increment.
Definition: afw_atomic.h:127
#define afw_authorization_handler_destroy(instance, xctx)
Call method destroy of interface afw_authorization_handler.
afw_authorization_action_id_read
actionId value read.
afw_authorization_action_id_create
actionId value create.
afw_authorization_handler_get_reference(const afw_utf8_t *authorization_handler_id, afw_xctx_t *xctx)
Get reference to authorization handler.
afw_authorization_action_id_modify
actionId value modify.
afw_authorization_check(afw_boolean_t enforce, const afw_value_t *request_id_value, const afw_value_t *resource_id_value, const afw_value_t *object_value, const afw_value_t *action_id_value, const afw_pool_t *p, afw_xctx_t *xctx)
Perform authorization check.
afw_authorization_action_id_delete
actionId value delete.
afw_data_type_anyURI
Data type struct for anyURI.
afw_object_set_property_as_boolean(const afw_object_t *object, const afw_utf8_t *property_name, afw_boolean_t internal, afw_xctx_t *xctx)
Set property function for data type boolean values.
afw_value_allocate_list(const afw_pool_t *p, afw_xctx_t *xctx)
Allocate function for unmanaged data type list value.
#define afw_object_old_get_property_as_object(object, property_name, xctx)
Get property function for data type object value.
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.
#define afw_list_of_object_get_next(list, iterator, xctx)
Get next value from list of object.
afw_value_create_string(const afw_utf8_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type string value.
#define afw_object_old_get_property_as_string(object, property_name, xctx)
Get property function for data type string 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.
Definition: afw_common.h:605
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.
Definition: afw_common.h:1176
struct afw_iterator_s afw_iterator_t
#define AFW_UTF8_FMT_OPTIONAL_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify optional arg.
Definition: afw_common.h:616
_Bool afw_boolean_t
Definition: afw_common.h:373
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
Definition: afw_common.h:588
apr_size_t afw_size_t
size_t.
Definition: afw_common.h:151
apr_int64_t afw_integer_t
typedef for big signed int.
Definition: afw_common.h:321
enum afw_adaptor_journal_option_e afw_adaptor_journal_option_t
Typedef for afw_adaptor_journal get_entry options enum.
const afw_object_t * afw_environment_prepare_conf_type_properties(const afw_object_t *properties, afw_xctx_t *xctx)
Prepare properties for a conf type.
#define afw_environment_register_flag(flag_id, brief, description, included_by_flag_id, xctx)
Register a flag.
const afw_lock_t * afw_environment_get_lock(const afw_utf8_t *log_type, afw_xctx_t *xctx)
Get the lock instance associated a lock id.
const afw_flag_t * afw_environment_get_flag(const afw_utf8_t *flag_id, afw_xctx_t *xctx)
Get the flag instance associated with flag_id.
const afw_service_type_t * afw_environment_get_service_type(const afw_utf8_t *service_type_id, afw_xctx_t *xctx)
Get the service type instance associated with service_type_id.
#define AFW_FINALLY
Always executed regardless of error.
Definition: afw_error.h:702
#define AFW_ENDTRY
Ends an AFW try block.
Definition: afw_error.h:727
#define AFW_TRY
Begin an AFW TRY block.
Definition: afw_error.h:634
#define AFW_THROW_ERROR_FZ(code, xctx, format_z,...)
Macro used to set error and 0 rv in xctx and throw it.
Definition: afw_error.h:319
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
Definition: afw_error.h:283
void afw_flag_add_included_by(const afw_utf8_t *flag_id, const afw_utf8_t *included_by_flag_id, afw_xctx_t *xctx)
Add another include_by flag to a registered flag.
Definition: afw_flag.c:688
afw_list_create_wrapper_for_array(const void *array, afw_boolean_t indirect, const afw_data_type_t *data_type, afw_size_t count, const afw_pool_t *p, afw_xctx_t *xctx)
Create a immutable list wrapper for an array.
afw_lock_create_rw_and_register(const afw_utf8_t *lock_id, const afw_utf8_t *brief, const afw_utf8_t *description, afw_xctx_t *xctx)
Create a read/write lock and register in environment.
Definition: afw_lock.c:175
#define AFW_LOG_FZ(priority, xctx, format_z,...)
Log an message to environment's log using a printf style format and parameters.
Definition: afw_log.h:192
#define afw_memory_clear(to)
Clear preallocated memory for sizeof(*(to)).
Definition: afw_memory.h:47
#define afw_memory_copy(to, from)
Copy to preallocated memory of same type.
Definition: afw_memory.h:39
#define afw_object_get_property(instance, property_name, xctx)
Call method get_property of interface afw_object.
#define afw_object_meta_get_object_type_id(instance, xctx)
Get object's object_type_id.
afw_object_meta_set_parent_paths(const afw_object_t *instance, const afw_value_list_t *parent_paths, afw_xctx_t *xctx)
Set meta parentPaths property.
afw_object_meta_get_path(const afw_object_t *instance, afw_xctx_t *xctx)
Get an object's path.
afw_object_meta_set_object_type_id(const afw_object_t *instance, const afw_utf8_t *object_type_id, afw_xctx_t *xctx)
Set object's object type id.
afw_object_meta_set_ids(const afw_object_t *instance, const afw_utf8_t *adaptor_id, const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, afw_xctx_t *xctx)
Set object's ids.
afw_object_meta_get_object_id(const afw_object_t *instance, afw_xctx_t *xctx)
Get entity object's object id.
afw_object_create_clone(const afw_object_t *object, const afw_pool_t *p, afw_xctx_t *xctx)
Clone an object to a specified pool.
Definition: afw_memory.c:138
afw_object_old_get_property_as_utf8(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
Get an object's property value as a string in specified pool.
Definition: afw_object.c:531
#define AFW_OBJECT_Q_OBJECT_TYPE_ID_PROVISIONING_PEER
Quoted object type id for Provisioning Peer object.
Definition: afw_object.h:66
#define afw_object_create_managed(p, xctx)
Create an empty entity object in its own pool.
Definition: afw_object.h:913
afw_object_old_get_property_as_boolean_deprecated(const afw_object_t *instance, const afw_utf8_t *property_name, afw_xctx_t *xctx)
Get an object's property value as a boolean.
Definition: afw_object.c:436
afw_object_set_property(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_value_t *value, afw_xctx_t *xctx)
Set the value of an object's property.
Definition: afw_object.c:46
const afw_object_t * afw_object_create_embedded(const afw_object_t *embedding_object, const afw_utf8_t *property_name, afw_xctx_t *xctx)
Create an empty embedded object in a memory object.
#define afw_pool_calloc(instance, size, xctx)
Call method calloc of interface afw_pool.
#define afw_pool_get_apr_pool(instance)
Call method get_apr_pool of interface afw_pool.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
Definition: afw_pool.h:167
afw_query_criteria_test_object(const afw_object_t *obj, const afw_query_criteria_t *criteria, const afw_pool_t *p, afw_xctx_t *xctx)
Test object against query criteria.
afw_runtime_object_create_indirect(const afw_utf8_t *object_type_id, const afw_utf8_t *object_id, void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create an indirect runtime object.
Definition: afw_runtime.c:481
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.
Definition: afw_runtime.c:853
#define afw_trace_fz(trace_level, flag_index, instance, xctx, format_z,...)
If applicable, write trace using a printf style format.
Definition: afw_trace.h:88
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.
const afw_utf8_t * afw_utf8_clone(const afw_utf8_t *string, const afw_pool_t *p, afw_xctx_t *xctx)
Clone a utf-8 string into a specific pool.
Definition: afw_utf8.h:347
afw_utf8_printf(const afw_pool_t *p, afw_xctx_t *xctx, const afw_utf8_z_t *format,...)
Create a utf-8 string using a c format string in specified pool.
Definition: afw_utf8.c:459
afw_boolean_t afw_utf8_starts_with(const afw_utf8_t *string, const afw_utf8_t *starts_with)
Check to see if a string starts with another string.
afw_value_false
Adaptive value false.
Definition: afw_value.h:354
afw_value_true
Adaptive value true.
Definition: afw_value.h:348
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.
Definition: afw_xctx.c:406
#define afw_xctx_calloc_type(type, xctx)
Macro to allocate cleared memory to hold type in xctx's pool.
Definition: afw_xctx.h:199
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.
Definition: afw_xctx.c:359
afw_adaptor_impl_t supported_core_object_types entry.
Interface afw_adaptor_impl_index public struct.
Internal request info used by afw_adaptor_impl*() functions.
const afw_utf8_t * resource_id
resource id
const afw_object_t * request
Request object.
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.
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.
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.
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_journal_t * wrapped_journal
Journal this common impl wraps.
Interface afw_adaptor_inf_s struct.
Interface afw_adaptor_journal public struct.
Interface afw_adaptor_key_value public struct.
Adaptor modify entry.
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_adaptor_transaction public struct.
Interface afw_authorization_handler public struct.
const afw_utf8_t * subtype_property_name
Subtype property name for instances of this conf type.
const afw_pool_t * p
Pool used to hold environment.
Definition: afw_common.h:1386
Struct used for a registered flag.
Definition: afw_flag.h:32
afw_size_t flag_index
Index of this flag in flags array.
Definition: afw_flag.h:51
Interface afw_list public struct.
Interface afw_object public struct.
Struct for afw_object_type_t.
Interface afw_pool public struct.
Parsed query criteria.
Interface afw_service_type public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
struct for data type list values.
Interface afw_value public struct.
Definition: afw_xctx.h:352
Interface afw_xctx public struct.