Federated Naming Service Programming Guide

Get Multiple Attributes

Get one or more attributes associated with the object named name relative to the context ctx. If name is empty, the attributes associated with ctx are returned.


FN_multigetlist_t *fn_attr_multiget(
    FN_ctx_t *ctx,
    const   FN_composite_name_t *name,
    const   FN_attrset_t *attr_ids,
    unsigned int follow_link,
    FN_status_t *status);
 
    FN_attribute_t *fn_multigetlist_next(
    FN_multigetlist_t *ml,
    FN_status_t *status);
 
void fn_multigetlist_destroy(   
    FN_multigetlist_t *ml);

The attributes returned are those specified in attr_ids. If the value of attr_ids is 0, all attributes associated with the named object are returned. Any attribute values in attr_ids provided by the caller are ignored; only the identifiers are relevant for this operation. Each attribute (identifier, syntax, and values) is returned one at a time using an enumeration scheme similar to that for listing a context. fn_attr_multi_get() initiates the enumeration process. It returns a handle to an FN_multigetlist_t object that can be used for subsequent fn_multigetlist_next() calls to enumerate the attributes requested.

The operation fn_multigetlist_next() returns the next attribute (identifier, syntax, and values) in the enumeration and updates ml to indicate the state of the enumeration. Successive calls to fn_multigetlist_next() using ml return successive attributes in the enumeration and further update the state of the enumeration.

The operation fn_multigetlist_destroy() frees the resources used during the enumeration. This operation can be invoked at any time to terminate the enumeration.

Implementations are not required to return all attributes requested by attr_ids. Some might choose to return only the attributes found successfully; such implementations might not necessarily return identifiers for attributes that could not be read.