Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
afw_request_impl.c
Go to the documentation of this file.
1 // See the 'COPYING' file in the project root for licensing information.
2 /*
3  * Adaptive Framework Request Implementation Support
4  *
5  * Copyright (c) 2010-2023 Clemson University
6  *
7  */
8 
9 
15 #include "afw_internal.h"
16 
17 
18 
19 /* Trace request begin. */
20 AFW_DEFINE(void)
22  const afw_request_t *instance,
23  afw_xctx_t *xctx)
24 {
25  const afw_utf8_t *s;
26 
27  if (afw_flag_is_active(xctx->env->flag_index_trace_request_detail,
28  xctx))
29  {
30  s = afw_data_type_object_to_utf8(instance->properties,
31  xctx->p, xctx);
32  afw_trace_fz(1, xctx->env->flag_index_trace_request,
33  instance, xctx,
34  "RequestProperties=%" AFW_UTF8_FMT,
36  );
37  }
38  else if (afw_flag_is_active(xctx->env->flag_index_trace_request,
39  xctx))
40  {
41  afw_trace_fz(1, xctx->env->flag_index_trace_request,
42  instance, xctx,
43  "Method=%" AFW_UTF8_FMT
44  " uri=%" AFW_UTF8_FMT
45  " query_string=%" AFW_UTF8_FMT,
46  AFW_UTF8_FMT_OPTIONAL_ARG(instance->method),
47  AFW_UTF8_FMT_OPTIONAL_ARG(instance->uri),
48  AFW_UTF8_FMT_OPTIONAL_ARG(instance->query_string));
49  }
50 }
AFW_DEFINE(const afw_object_t *)
Adaptive Framework Core Internal.
afw_data_type_object_to_utf8(const afw_object_t *internal, const afw_pool_t *p, afw_xctx_t *xctx)
Convert data type object internal representation to utf-8.
#define AFW_UTF8_FMT_ARG(A_STRING)
Convenience Macro for use with AFW_UTF8_FMT to specify arg.
Definition: afw_common.h:605
#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
#define AFW_UTF8_FMT
Format string specifier used for afw_utf8_t.
Definition: afw_common.h:588
#define afw_flag_is_active(flag_index, xctx)
Determine if flag for flag index is set in xctx.
Definition: afw_flag.h:84
afw_request_impl_trace_begin(const afw_request_t *instance, afw_xctx_t *xctx)
Trace request begin if requested.
#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
Interface afw_request public struct.
NFC normalized UTF-8 string.
Definition: afw_common.h:545
Interface afw_xctx public struct.