23 #define AFW_IMPLEMENTATION_ID "vfs"
29 afw_vfs_adaptor_internal_create_cede_p(
52 &impl_afw_adaptor_inf,
60 adaptor->properties, &afw_vfs_s_vfsMap, xctx);
67 "At least one \"vfsMap\" entry must be specified",
74 self->vfs_map = entries;
77 for (iterator = NULL;;entries++) {
86 "\"vfsMap\" entries must be strings",
90 for (c = entry->s, end_c = c + entry->len;
91 c < end_c && *c !=
'=';
93 if (entry->s - c + 2 == entry->len) {
95 "\"vfsMap\" entries must contain an equal ('=') "
99 entries->key.len = c - entry->s;
102 entries->string.len = end_c - c - 1;
107 if (entries->key.len > 0 &&
111 "The <objectId_prefix> in a vfsMap entry must be empty or end "
112 "with a slash ('/').",
117 if (entries->string.len == 0 ||
120 #if defined(_WIN32) || defined(WIN32)
123 "The <host file system directory path> in a vfsMap entry "
124 "must end with a slash ('/') or a backslash ('\\')",
129 "The <host file system directory path> in a vfsMap entry must "
130 "end with a slash ('/')",
136 rv = apr_stat(&finfo,
138 if (rv != APR_SUCCESS || finfo.filetype != APR_DIR) {
140 "%s in vfsMap entry <host file system directory path> is not "
146 for (e = entries; e >
self->vfs_map; e--) {
147 if ((e - 1)->key.len > e->key.len ||
148 ((e - 1)->key.len == e->key.len &&
149 strcmp((e - 1)->key_z, e->key_z) < 0))
153 if (strcmp((e - 1)->key_z, e->key_z) == 0) {
155 "vfsMap has duplicate <objectId_prefix> values",
167 &afw_vfs_s_markExecutable, xctx);
175 self->mark_executable = mark_executable;
177 for (iterator = NULL;; mark_executable++) {
184 "\"executableSuffixes\" entries must be strings",
191 mark_executable->s.len =
sizeof(mark_executable->s_z);
228 session = afw_vfs_adaptor_internal_session_create(
Adaptive Framework Core API.
Helpers for adaptor implementation development.
Interface afw_interface implementation declares.
Internal header for adaptor type vfs.
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_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_object_old_get_property_as_list(object, property_name, xctx)
Get property function for data type list value.
#define afw_value_is_string(A_VALUE)
Macro to determine if value is evaluated string.
struct afw_iterator_s afw_iterator_t
char afw_utf8_octet_t
8 bits of utf-8 codepoint.
apr_size_t afw_size_t
size_t.
#define AFW_THROW_ERROR_FZ(code, xctx, format_z,...)
Macro used to set error and 0 rv in xctx and throw it.
#define AFW_THROW_ERROR_Z(code, message_z, xctx)
Macro used to set error and 0 rv in xctx and throw it.
#define afw_list_get_next_value(instance, iterator, p, xctx)
Call method get_next_value of interface afw_list.
#define afw_list_get_count(instance, xctx)
Call method get_count of interface afw_list.
#define afw_memory_copy(to, from)
Copy to preallocated memory of same type.
#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.
afw_utf8_ends_with(const afw_utf8_t *string, const afw_utf8_t *ends_with)
Check to see if a string ends with another string.
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.
Interface afw_adaptor public struct.
Interface afw_adaptor_session public struct.
Typedef for key/string pair that have both utf8 and utf8_z.
Interface afw_list public struct.
Interface afw_object public struct.
Interface afw_pool public struct.
NFC normalized UTF-8 string.
Interface afw_value public struct.
struct for data type string values.
Interface afw_xctx public struct.
NFC normalized UTF-8 string accessible as afw_utf8_t or afw_utf8_z_t.