Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_runtime_value_accessor.c
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Implementation of afw_adaptor_factory interface for afw_runtime
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
14 #include "afw_internal.h"
16 
17 
18 /* Register core runtime value accessors. */
20 {
22  &afw_s_default,
24  xctx
25  );
26 
28  &afw_s_compile_type,
30  xctx
31  );
32 
34  &afw_s_indirect,
36  xctx
37  );
38 
40  &afw_s_octet,
42  xctx
43  );
44 
46  &afw_s_stopping_adaptor_instances,
48  xctx
49  );
50 
52  &afw_s_applicable_flags,
54  xctx
55  );
56 
58  &afw_s_stopping_authorization_handler_instances,
60  xctx
61  );
62 
64  &afw_s_adaptor_metrics,
66  xctx
67  );
68 
70  &afw_s_null_terminated_array_of_internal,
72  xctx
73  );
74 
76  &afw_s_null_terminated_array_of_objects,
78  xctx
79  );
80 
82  &afw_s_null_terminated_array_of_utf8_z_key_value_pair_objects,
84  xctx
85  );
86 
88  &afw_s_null_terminated_array_of_pointers,
90  xctx
91  );
92 
94  &afw_s_null_terminated_array_of_values,
96  xctx
97  );
98 
100  &afw_s_size,
102  xctx
103  );
104 
106  &afw_s_service_startup,
108  xctx
109  );
110 
112  &afw_s_service_status,
114  xctx
115  );
116 
118  &afw_s_uint32,
120  xctx
121  );
122 
124  &afw_s_adaptor_additional_metrics,
126  xctx
127  );
128 
130  &afw_s_afw_components_extension_loaded,
132  xctx
133  );
134 
136  &afw_s_value,
138  xctx
139  );
140 }
141 
142 
143 /* Runtime value accessor for default internal. */
144 const afw_value_t *
147  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
148 {
149  const afw_value_t *result;
150 
151  /* If internal is NULL, just return NULL. */
152  if (!internal) {
153  return NULL;
154  }
155 
156  /* If pointer cType and pointer is NULL, return NULL. */
157  if (prop->data_type->cType.s[prop->data_type->cType.len - 1] == '*'
158  && !*(void **)internal)
159  {
160  result = NULL;
161  }
162 
163  /* If cType afw_utf8_t len is 0, return NULL. */
164  else if (afw_utf8_equal_utf8_z(&prop->data_type->cType, "afw_utf8_t")
165  && ((afw_utf8_t *)internal)->len == 0)
166  {
167  result = NULL;
168  }
169 
170  /* If cType afw_memory_t size is 0, return NULL. */
171  else if (afw_utf8_equal_utf8_z(&prop->data_type->cType, "afw_memory_t")
172  && ((afw_memory_t *)internal)->size == 0)
173  {
174  result = NULL;
175  }
176 
177  /* If not a NULL, create an appropriate single value. */
178  else {
179  result = afw_value_evaluated_create(internal, prop->data_type,
180  p, xctx);
181  }
182 
183  /* Return result. */
184  return result;
185 }
186 
187 
188 
189 /* Runtime value accessor 'compile_type'. */
190 const afw_value_t *
193  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
194 {
195  afw_compile_type_t compile_type;
196  const afw_value_t *result;
197 
198  compile_type = (afw_compile_type_t)(*((afw_octet_t *)internal));
199  result = afw_compile_type_get_info(compile_type, xctx)->name_value;
200  return result;
201 }
202 
203 
204 
205 /* Runtime value accessor for indirect internal. */
206 const afw_value_t *
209  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
210 {
211  if (!internal) return NULL;
212 
213  return afw_runtime_value_accessor_default(prop, *(void **)internal,
214  p, xctx);
215 }
216 
217 
218 
219 /* Runtime value accessor for afw_octet_t as afw_integer_t. */
220 const afw_value_t *
223  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
224 {
225  afw_integer_t integer;
226 
227  integer = (afw_integer_t)(*((afw_octet_t *)internal));
228  return afw_value_create_integer(integer, p, xctx);
229 }
230 
231 
232 /* Runtime value accessor for stopping adaptor instances. */
233 const afw_value_t *
236  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
237 {
238  const afw_adaptor_id_anchor_t *anchor;
239  const afw_adaptor_id_anchor_t *stopping;
240  afw_size_t count;
241  const afw_value_t *result;
242  afw_integer_t *entry;
243  const afw_utf8_t *adaptor_id;
244  const afw_list_t *list;
245 
246  /* A copy is required since it may change by a different thread. */
247  adaptor_id = *(const afw_utf8_t **)internal;
248  result = NULL;
250 
251  anchor = afw_environment_get_adaptor_id(adaptor_id, xctx);
252  if (!anchor) {
253  break;
254  }
255 
256  for (
257  stopping = anchor->stopping,
258  count = 0;
259  stopping;
260  stopping = stopping->stopping,
261  count++);
262 
263  if (count == 0) {
264  break;
265  }
266 
267  entry = afw_pool_malloc(p, count * sizeof(afw_integer_t), xctx);
268  list = afw_list_create_wrapper_for_array(entry, false,
269  afw_data_type_integer, count, p, xctx);
270  result = afw_value_create_list(list, p, xctx);
271  for (
272  stopping = anchor->stopping,
273  count = 0;
274  stopping;
275  stopping = stopping->stopping,
276  entry++,
277  count++)
278  {
279  *entry = stopping->reference_count;
280  }
281  }
282 
283  AFW_LOCK_END;
284 
285  return result;
286 }
287 
288 
289 
290 /* Runtime value accessor for stopping authorization handler instances. */
291 const afw_value_t *
294  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
295 {
298  afw_size_t count;
299  const afw_value_t *result;
300  afw_integer_t *entry;
301  const afw_utf8_t *authorization_handler_id;
302  const afw_list_t *list;
303 
304  /* A copy is required since it may change by a different thread. */
305  authorization_handler_id = *(const afw_utf8_t **)internal;
306  result = NULL;
308 
310  authorization_handler_id,
311  xctx);
312  if (!anchor) {
313  break;
314  }
315 
316  for (
317  stopping = anchor->stopping,
318  count = 0;
319  stopping;
320  stopping = stopping->stopping,
321  count++);
322 
323  if (count == 0) {
324  break;
325  }
326 
327  entry = afw_pool_malloc(p, count * sizeof(afw_integer_t), xctx);
328  list = afw_list_create_wrapper_for_array(entry, false,
329  afw_data_type_integer, count, p, xctx);
330  result = afw_value_create_list(list, p, xctx);
331  for (
332  stopping = anchor->stopping,
333  count = 0;
334  stopping;
335  stopping = stopping->stopping,
336  entry++,
337  count++)
338  {
339  *entry = stopping->reference_count;
340  }
341  }
342 
344 
345  return (const afw_value_t *)result;
346 }
347 
348 
349 
350 /* Runtime value accessor for afw_service_startup_t. */
351 const afw_value_t *
354  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
355 {
356  afw_service_startup_t startup;
357  const afw_utf8_t *s;
358 
359  memcpy(&startup, internal, sizeof(startup));
360  s = afw_service_startup_as_utf8(startup);
361  return afw_value_create_string(s, p, xctx);
362 }
363 
364 
365 /* Runtime value accessor for afw_service_status_t. */
366 const afw_value_t *
369  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
370 {
371  afw_service_status_t status;
372  const afw_utf8_t *s;
373 
374  memcpy(&status, internal, sizeof(status));
375  s = afw_service_status_as_utf8(status);
376  return afw_value_create_string(s, p, xctx);
377 }
378 
379 
380 /* Runtime value accessor for afw_size_t as afw_integer_t. */
381 const afw_value_t *
384  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
385 {
386  afw_integer_t integer;
387 
388  integer = (afw_integer_t)(*((afw_size_t *)internal));
389  return afw_value_create_integer(integer, p, xctx);
390 }
391 
392 
393 /* Runtime value accessor for afw_uint32_t as afw_integer_t. */
394 const afw_value_t *
397  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
398 {
399  afw_integer_t integer;
400 
401  integer = (afw_integer_t)(*((afw_uint32_t *)internal));
402  return afw_value_create_integer(integer, p, xctx);
403 }
404 
405 
406 /* Runtime value accessor for /afw/_AdaptiveAdaptorMetrics_/<adaptorId>. */
407 const afw_value_t *
410  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
411 {
412  const afw_adaptor_t *adaptor = *(const afw_adaptor_t * const *)internal;
413 
414  return (adaptor)
415  ? afw_value_create_object(adaptor->impl->metrics_object,
416  p, xctx)
417  : NULL;
418 }
419 
420 
421 
422 /* Runtime value accessor to produce triggeredBy for a flag. */
423 const afw_value_t *
426  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
427 {
428  const afw_flag_t *self = internal;
429  const afw_list_t *list;
430  const afw_flag_t *flag;
431  afw_size_t i;
432 
433  list = afw_list_create_generic(p, xctx);
434  for (i = 0; i < self->applicable_flags_count_allocated; i++) {
435  if (self->applicable_flags[i]) {
436  flag = afw_flag_get_by_index(i, xctx);
437  afw_list_add_value(list, flag->flag_id_value, xctx);
438  }
439  }
440 
441  return afw_value_create_list(list, p, xctx);
442 }
443 
444 
445 
446 /* Runtime value accessor for NULL terminated array of pointers. */
447 const afw_value_t *
450  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
451 {
452  const afw_value_t *result;
453  const afw_list_t *list;
454 
455  /* If internal is NULL, return NULL. */
456  if (!internal || !*(void **)internal)
457  {
458  return NULL;
459  }
460 
461  /* Must be data type list. */
462  if (prop->data_type != afw_data_type_list) {
463  AFW_THROW_ERROR_Z(general,
464  "data type must be list for value accessor array_of_pointers.",
465  xctx);
466  }
467 
468  /* The dataTypeParameter is needed for runtime list. */
469  if (!prop->data_type_parameter_data_type) {
470  AFW_THROW_ERROR_Z(general, "list data type required", xctx);
471  }
472 
473  /* Support for pointer to array of internals. */
474  list = afw_list_create_wrapper_for_array(*((const void * const *)internal),
475  false, prop->data_type_parameter_data_type, -1, p, xctx);
476  result = afw_value_create_list(list, p, xctx);
477  result = afw_value_clone(result, p, xctx); /* Clone while locked. */
478 
479  return result;
480 }
481 
482 
483 /* Runtime value accessor for NULL terminated list of objects. */
484 const afw_value_t *
487  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
488 {
489  const afw_object_t * const *objects =
490  *(const afw_object_t * const * const *)internal;
491  const afw_list_t *list;
492 
494  p, xctx);
495 
496  return afw_value_create_list(list, p, xctx);
497 }
498 
499 
500 /*
501  * Runtime value accessor for NULL terminated list of utf8_z key/value pair
502  * objects.
503  */
504 const afw_value_t *
507  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
508 {
509  const afw_utf8_z_t * const *s_z;
510  const afw_list_t *list;
511  const afw_object_t *object;
512  const afw_utf8_t *property_name;
513  const afw_value_t *value;
514  const afw_value_t *result;
515 
516  s_z = *(const afw_utf8_z_t * const **)internal;
517  if (!s_z) {
518  return NULL;
519  }
520 
521  list = afw_list_create_generic(p, xctx);
522  result = afw_value_create_list(list, p, xctx);
523 
524  for (; *s_z; s_z++)
525  {
526  object = afw_object_create(p, xctx);
527  for (; *s_z; s_z++) {
528  property_name = afw_utf8_create(*s_z, AFW_UTF8_Z_LEN, p, xctx);
529  s_z++;
530  if (!s_z) {
531  AFW_THROW_ERROR_Z(general, "Unpaired key/value pair", xctx);
532  }
533  value = afw_value_create_string_from_u8z(*s_z, p, xctx);
534  afw_object_set_property(object, property_name, value, xctx);
535  }
536  afw_list_add_value(list,
537  afw_value_create_object(object, p, xctx), xctx);
538  }
539 
540  return result;
541 }
542 
543 
544 /* Runtime value accessor for NULL terminated array of pointers. */
545 const afw_value_t *
548  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
549 {
550  const afw_value_t *result;
551  const afw_list_t *list;
552 
553  /* If internal is NULL, return NULL. */
554  if (!internal || !*(void **)internal)
555  {
556  return NULL;
557  }
558 
559  /* Must be data type list. */
560  if (prop->data_type != afw_data_type_list) {
561  AFW_THROW_ERROR_Z(general,
562  "data type must be list for value accessor array_of_pointers.",
563  xctx);
564  }
565 
566  /* The dataTypeParameter is needed for runtime list. */
567  if (!prop->data_type_parameter_data_type) {
568  AFW_THROW_ERROR_Z(general, "list data type required", xctx);
569  }
570 
571  /* Support for pointer to array of pointers. */
572  list = afw_list_create_wrapper_for_array(*((const void * const *)internal),
573  true, prop->data_type_parameter_data_type, -1, p, xctx);
574  result = afw_value_create_list(list, p, xctx);
575  result = afw_value_clone(result, p, xctx); /* Clone while locked. */
576 
577  return result;
578 }
579 
580 
581 
582 /* Runtime value accessor for NULL terminated array of values. */
583 const afw_value_t *
586  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
587 {
588  const afw_value_t * const *values = (const afw_value_t * const *)internal;
589  const afw_list_t *list;
590 
592 
593  return afw_value_create_list(list, p, xctx);
594 }
595 
596 
597 /* Runtime value accessor to call afw_adaptor_get_additional_metrics(). */
598 const afw_value_t *
601  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
602 {
603  const afw_adaptor_impl_t *impl = internal;
604  const afw_object_t *obj;
605 
606  obj = afw_adaptor_get_additional_metrics(impl->adaptor, p, xctx);
607 
608  return (obj)
609  ? afw_value_create_object(obj, p, xctx)
610  : NULL;
611 }
612 
613 const afw_value_t *
616  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
617 {
618  afw_environment_load_extension(&afw_s_afw_components, NULL, NULL, xctx);
619 
620  return afw_value_true;
621 }
622 
623 
624 
625 /* Runtime value accessor for an afw_value_t. */
626 const afw_value_t *
629  const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
630 {
631  return *(const afw_value_t **)internal;
632 }
Adaptive Framework Core Internal.
Core runtime value accessors.
#define afw_adaptor_get_additional_metrics(instance, p, xctx)
Call method get_additional_metrics of interface afw_adaptor.
afw_value_create_integer(afw_integer_t internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type integer value.
afw_data_type_integer
Data type struct for integer.
afw_value_create_list(const afw_list_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for unmanaged data type list value.
afw_data_type_list
Data type struct for list.
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.
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_UTF8_Z_LEN
String is NUL (0) terminate.
Definition: afw_common.h:266
enum afw_service_status_e afw_service_status_t
Typedef for service status enum.
enum afw_service_startup_e afw_service_startup_t
Typedef for service startup type enum.
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
Definition: afw_common.h:523
apr_uint32_t afw_uint32_t
32-bit unsigned integer.
Definition: afw_common.h:184
enum afw_compile_type_e afw_compile_type_t
Compile type enum.
apr_size_t afw_size_t
size_t.
Definition: afw_common.h:151
unsigned char afw_octet_t
8 bits (unsigned).
Definition: afw_common.h:211
apr_int64_t afw_integer_t
typedef for big signed int.
Definition: afw_common.h:321
afw_compile_type_get_info(afw_compile_type_t compile_type, const afw_xctx_t *xctx)
Return info for a afw_compile_type_t.
Definition: afw_compile.c:120
afw_environment_load_extension(const afw_utf8_t *extension_id, const afw_utf8_t *module_path, const afw_object_t *properties, afw_xctx_t *xctx)
Load and initialize environment extension.
const afw_authorization_handler_id_anchor_t * afw_environment_get_authorization_handler_id(const afw_utf8_t *authorization_handler_id, afw_xctx_t *xctx)
Get the authorization handler id anchor associated with authorization handler id.
void afw_environment_register_runtime_value_accessor(const afw_utf8_t *accessor_name, afw_runtime_value_accessor_t function, afw_xctx_t *xctx)
Register a runtime value accessor function.
const afw_adaptor_id_anchor_t * afw_environment_get_adaptor_id(const afw_utf8_t *adaptor_id, afw_xctx_t *xctx)
Get the adaptor id anchor associated with adaptor id.
#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
afw_flag_get_by_index(afw_size_t flag_index, afw_xctx_t *xctx)
Get flag by index.
Definition: afw_flag.c:534
const afw_list_t * afw_list_const_create_null_terminated_array_of_objects(const afw_object_t *const *objects, const afw_pool_t *p, afw_xctx_t *xctx)
Create an immutable list from NULL terminated array of objects.
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.
const afw_list_t * afw_list_const_create_null_terminated_array_of_values(const afw_value_t *const *values, const afw_pool_t *p, afw_xctx_t *xctx)
Create an immutable list from NULL terminated array of values.
#define afw_list_create_generic(p, xctx)
Create an value list in memory.
Definition: afw_list.h:81
afw_list_add_value(const afw_list_t *instance, const afw_value_t *value, afw_xctx_t *xctx)
Call method add_value of interface afw_list_setter.
Definition: afw_list.c:104
#define AFW_LOCK_BEGIN(instance)
Macro to begin a lock section.
Definition: afw_lock.h:191
#define AFW_LOCK_END
Macro to end a lock section.
Definition: afw_lock.h:202
#define AFW_LOCK_WRITE_BEGIN(instance)
Macro to begin a write lock section.
Definition: afw_lock.h:400
#define AFW_LOCK_WRITE_END
Macro to end a write lock section.
Definition: afw_lock.h:411
#define afw_object_create(p, xctx)
Create an empty unmanaged object in memory.
Definition: afw_object.h:948
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
#define afw_pool_malloc(instance, size, xctx)
Call method malloc of interface afw_pool.
const afw_value_t * afw_runtime_value_accessor_compile_type(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor 'compile_type'.
const afw_value_t * afw_runtime_value_accessor_service_status(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for afw_service_status_t.
const afw_value_t * afw_runtime_value_accessor_applicable_flags(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor to produce triggeredBy for a flag.
const afw_value_t * afw_runtime_value_accessor_size(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for afw_size_t as afw_integer_t.
const afw_value_t * afw_runtime_value_accessor_adaptor_additional_metrics(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor to call afw_adaptor_get_additional_metrics().
const afw_value_t * afw_runtime_value_accessor_null_terminated_array_of_internal(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for NULL terminated list of internal.
const afw_value_t * afw_runtime_value_accessor_octet(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for afw_octet_t as afw_integer_t.
const afw_value_t * afw_runtime_value_accessor_stopping_authorization_handler_instances(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for stopping authorization handler reference counts.
const afw_value_t * afw_runtime_value_accessor_uint32(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for afw_uint32_t as afw_integer_t.
const afw_value_t * afw_runtime_value_accessor_default(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor 'default' for default internal.
const afw_value_t * afw_runtime_value_accessor_ensure_afw_components_extension_loaded(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor to ensure afw_components extension is loaded.
void afw_runtime_register_core_value_accessors(afw_xctx_t *xctx)
Register core runtime value accessors.
const afw_value_t * afw_runtime_value_accessor_stopping_adaptor_instances(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for stopping adaptor instance reference counts.
const afw_value_t * afw_runtime_value_accessor_indirect(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor 'indirect' for indirect internal.
const afw_value_t * afw_runtime_value_accessor_service_startup(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for afw_service_startup_t.
const afw_value_t * afw_runtime_value_accessor_null_terminated_array_of_values(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for NULL terminated list of values.
const afw_value_t * afw_runtime_value_accessor_value(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for an afw_value_t.
const afw_value_t * afw_runtime_value_accessor_null_terminated_array_of_utf8_z_key_value_pair_objects(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for NULL terminated list of utf8_z key/value pair objects.
const afw_value_t * afw_runtime_value_accessor_null_terminated_array_of_pointers(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for NULL terminated list of internal pointers.
const afw_value_t * afw_runtime_value_accessor_null_terminated_array_of_objects(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for NULL terminated list of objects.
const afw_value_t * afw_runtime_value_accessor_adaptor_metrics(const afw_runtime_object_map_property_t *prop, const void *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Runtime value accessor for /afw/_AdaptiveAdaptorMetrics_/<adaptorId>.
afw_service_status_as_utf8(afw_service_status_t status)
Convert afw_service_status_t enum to corresponding utf8.
Definition: afw_service.c:210
afw_service_startup_as_utf8(afw_service_startup_t startup)
Convert afw_service_startup_t enum to corresponding utf8.
Definition: afw_service.c:135
afw_boolean_t afw_utf8_equal_utf8_z(const afw_utf8_t *s1, const afw_utf8_z_t *s2_z)
Check to see if a string equals a utf8_z string.
#define afw_utf8_create(s, len, p, xctx)
Create utf-8 string without copy unless necessary in pool specified.
Definition: afw_utf8.h:239
afw_value_clone(const afw_value_t *value, const afw_pool_t *p, afw_xctx_t *xctx)
Clone a value to specified pool.
Definition: afw_value.c:282
const afw_value_t * afw_value_evaluated_create(const void *value, const afw_data_type_t *data_type, const afw_pool_t *p, afw_xctx_t *xctx)
Create function for an evaluated data type value.
afw_value_true
Adaptive value true.
Definition: afw_value.h:348
afw_value_create_string_from_u8z(const afw_utf8_z_t *string_z, const afw_pool_t *p, afw_xctx_t *xctx)
Definition: afw_value.c:519
afw_integer_t reference_count
Reference count for this instance of adaptor.
Definition: afw_adaptor.h:75
afw_adaptor_id_anchor_t * stopping
First/next stopping adaptor or NULL.
Definition: afw_adaptor.h:78
Internal struct used by common adaptor code for all adaptors.
const afw_object_t * metrics_object
Metrics object.
const afw_adaptor_t * adaptor
Associated adaptor instance.
Interface afw_adaptor public struct.
afw_integer_t reference_count
Reference count for this instance of authorization handler.
afw_authorization_handler_id_anchor_t * stopping
First/next stopping authorization handler or NULL.
const afw_lock_t * adaptor_id_anchor_lock
Lock for protecting changes to adaptor id anchors.
Definition: afw_common.h:1479
const afw_lock_rw_t * authorization_handler_id_anchor_rw_lock
Lock for protecting changes to authorization handler id anchors.
Definition: afw_common.h:1488
Struct used for a registered flag.
Definition: afw_flag.h:32
const afw_value_t * flag_id_value
sting value of objectId of this flag.
Definition: afw_flag.h:42
Interface afw_list public struct.
Struct for memory pointer and size.
Definition: afw_common.h:505
Interface afw_object public struct.
Interface afw_pool public struct.
Struct for runtime object map property.
Definition: afw_runtime.h:99
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_value public struct.
Interface afw_xctx public struct.