20 #define AFW_IMPLEMENTATION_ID "fcgi"
41 #if defined(WIN) && (_MSC_VER >= 1900)
42 envp = *__p__environ();
44 extern char ** environ;
49 for (; *envp != 0; envp++) {
50 property_name.s = *envp;
51 for (s = c = *envp; *c && *c !=
'='; c++);
52 property_name.len = c - s;
69 self->all_variables_loaded =
true;
89 self->pub.inf = &impl_afw_object_inf;
91 self->pub.meta.id = &afw_s_current;
92 self->pub.meta.object_type_uri = &afw_s__AdaptiveEnvironmentVariables_;
93 self->pub.meta.object_uri = &impl_path;
98 if (preload_variables) {
99 impl_load_all_variables(
self, xctx);
111 impl_afw_object_release(
126 impl_afw_object_add_reference (
146 if (!self->all_variables_loaded) {
147 impl_load_all_variables(
self, xctx);
157 impl_afw_object_get_meta(
172 impl_afw_object_get_property(
193 s = getenv(property_name_z);
207 impl_afw_object_get_property_meta(
214 instance, property_name, p, xctx);
223 impl_afw_object_get_next_property(
232 if (!self->all_variables_loaded) {
233 impl_load_all_variables(
self, xctx);
238 iterator, property_name, xctx);
247 impl_afw_object_get_next_property_meta(
255 instance, iterator, property_name, p, xctx);
264 impl_afw_object_has_property(
272 value = impl_afw_object_get_property(
273 instance, property_name, xctx);
275 return (value != NULL);
284 impl_afw_object_get_setter (
Adaptive Framework Core API.
AFW_DEFINE(const afw_object_t *)
Helpers for object implementation development.
Interface afw_interface implementation declares.
#define AFW_UTF8_Z_LEN
String is NUL (0) terminate.
#define AFW_UTF8_LITERAL(A_STRING)
String literal initializer.
struct afw_iterator_s afw_iterator_t
afw_utf8_octet_t afw_utf8_z_t
NFC normalized UTF-8 null terminated string.
char afw_utf8_octet_t
8 bits of utf-8 codepoint.
apr_size_t afw_size_t
size_t.
afw_environment_create_environment_variables_object(afw_boolean_t preload_variables, afw_xctx_t *xctx)
Create a readonly object for accessing environment variables.
afw_size_t impl_afw_object_get_count(const afw_object_t *instance, afw_xctx_t *xctx)
const afw_value_t * afw_object_impl_get_property_meta(const afw_object_t *instance, const afw_utf8_t *property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_property_meta for interface afw_object that can be accessed externally.
const afw_value_t * afw_object_impl_get_meta(const afw_object_t *instance, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_meta for interface afw_object that can be accessed externally.
const afw_value_t * afw_object_impl_get_next_property_meta(const afw_object_t *instance, const afw_iterator_t **iterator, const afw_utf8_t **property_name, const afw_pool_t *p, afw_xctx_t *xctx)
A general impl of method get_next_property_meta for interface afw_object that can be accessed externa...
#define afw_object_get_property(instance, property_name, xctx)
Call method get_property of interface afw_object.
#define afw_object_add_reference(instance, xctx)
Call method add_reference of interface afw_object.
#define afw_object_get_next_property(instance, iterator, property_name, xctx)
Call method get_next_property of interface afw_object.
#define afw_object_has_property(instance, property_name, xctx)
Call method has_property of interface afw_object.
#define afw_object_release(instance, xctx)
Call method release of interface afw_object.
#define afw_object_get_count(instance, xctx)
Call method get_count of interface afw_object.
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.
#define afw_object_create_and_cede_p(p, xctx)
Create an empty entity object in memory in specified pool and cede control of the pool to the object.
#define afw_pool_calloc_type(instance, type, xctx)
Macro to allocate cleared memory to hold type in pool.
const afw_pool_t * afw_pool_create(const afw_pool_t *parent, afw_xctx_t *xctx)
Create a new pool.
afw_utf8_z_create(const afw_utf8_octet_t *s, afw_size_t len, const afw_pool_t *p, afw_xctx_t *xctx)
Create a NFC Normalized zero terminated UTF-8 string in specified pool.
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.
afw_value_empty_string
Adaptive value empty string.
afw_value_make_string_copy(const afw_utf8_octet_t *s, afw_size_t len, const afw_pool_t *p, afw_xctx_t *xctx)
afw_value_create_string_from_u8z(const afw_utf8_z_t *string_z, const afw_pool_t *p, afw_xctx_t *xctx)
Interface afw_object public struct.
Interface afw_object_setter public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
Interface afw_xctx public struct.