Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Structures | Functions
afw_ldap_metadata.h File Reference

Adaptive Framework LDAP Metadata Header. More...

#include "afw_ldap.h"
#include "afw_ldap_internal.h"

Go to the source code of this file.

Data Structures

struct  afw_ldap_metadata_syntax_handler_s
 
struct  afw_ldap_object_type_attribute_s
 
struct  afw_ldap_metadata_s
 
struct  afw_ldap_metadata_attribute_type_s
 

Functions

void afw_ldap_metadata_load (afw_ldap_internal_adaptor_t *adaptor, afw_xctx_t *xctx)
 Load LDAP adaptors Metadata . More...
 
void afw_ldap_metadata_retrieve_objects (afw_ldap_internal_adaptor_session_t *self, const afw_utf8_t *object_type_id, const afw_query_criteria_t *criteria, void *context, afw_object_cb_t callback, afw_xctx_t *xctx)
 Called by afw_ldap_adaptor_session() to retrieve metadata objects.
 
void afw_ldap_metadata_get_object (afw_ldap_internal_adaptor_session_t *self, const afw_utf8_t *object_type, const afw_utf8_t *object_id, void *context, afw_object_cb_t callback, afw_xctx_t *xctx)
 Called by afw_ldap_adaptor_session() to get a metadata object.
 
afw_ldap_object_type_attribute_tafw_ldap_metadata_get_object_type_attribute (afw_ldap_object_type_attribute_t *first_attribute, const afw_utf8_t *name)
 Return afw_ldap_object_type_attribute_t * for name. More...
 
afw_boolean_t afw_ldap_metadata_handles (const afw_utf8_t *object_type)
 
const afw_value_tafw_ldap_metadata_bv_to_value (afw_ldap_internal_adaptor_session_t *session, afw_ldap_object_type_attribute_t *attribute, const afw_utf8_t *attribute_name, struct berval **bv, const afw_pool_t *p, afw_xctx_t *xctx)
 
struct berval ** afw_ldap_metadata_value_to_bv (afw_ldap_internal_adaptor_session_t *session, const afw_utf8_t *attribute_name, const afw_value_t *value, afw_xctx_t *xctx)
 

Detailed Description

Adaptive Framework LDAP Metadata Header.

Internal.

Definition in file afw_ldap_metadata.h.

Function Documentation

◆ afw_ldap_metadata_get_object_type_attribute()

afw_ldap_object_type_attribute_t* afw_ldap_metadata_get_object_type_attribute ( afw_ldap_object_type_attribute_t first_attribute,
const afw_utf8_t name 
)

Return afw_ldap_object_type_attribute_t * for name.

Parameters
first_attributeentry.
nameto find.
Returns
entry found or NULL;

Definition at line 807 of file afw_ldap_metadata.c.

◆ afw_ldap_metadata_load()

void afw_ldap_metadata_load ( afw_ldap_internal_adaptor_t adaptor,
afw_xctx_t xctx 
)

Load LDAP adaptors Metadata .

Parameters
adaptorInternal ldap adaptor.
xctxof caller.

This function loads ldap metadata and sets the metadata variable of the afw_ldap_internal_adaptor_t struct passed. This should only be called once per adaptor create. Restart the adaptor to reload meta data.

The information in the metadata variable is rootdse and schema related.

This function:

1) Gets a fresh copy of the rootdse and schema. 2) Parses these into memory objects. 3) Creates a memory adaptor. 4) Adds ObjectType, DataType and other type of objects to this memory adaptor using information this metadata and the LDAP adaptor configuration.

A very simple LDAP schema entry parser is used based on information from RFC 4512. This parser assumes that entries are valid.

The parser parses ldapSyntaxes, objectClasses, attributeTypes, matchingRuleUse, matchingRules and similar values.

These values must always start with an '(' and end with a ')'.

The property name for the first value is passed to the parse function. This name should normally be 'numericoid' or 'ruleid'.

The name of the other properties are the tokens themselves.

The tokens OBSOLETE, ABSTRACT, STRUCTURAL, AUXILIARY, COLLECTIVE, and NO-USER-MODIFICATION are considered booleans with a value of TRUE.

The other property name tokens are followed by a single string value or '(' followed by a list of '$' separated string values ending with a ')'. This includes X-' extensions. String that start with a single quote are converted to unquoted string values. All other values are kept asis.

Todo:
FIXME: add code
Todo:
FIXME: use use count based release.

Definition at line 1158 of file afw_ldap_metadata.c.