Sun Java System Directory Server Enterprise Edition 6.2 Developer's Guide

slapi_mods_get_first_smod()

Initializes a Slapi_Mods iterator and returns the first mod wrapped in a Slapi_Mods structure.

Syntax

#include "slapi-plugin.h"
 Slapi_Mod *slapi_mods_get_first_smod(Slapi_Mods *smods,
    Slapi_Mod *smod);

Parameters

This function takes the following parameters:

smods

A pointer to an initialized Slapi_Mods.

smod

Pointer to a Slapi_Mod that used to hold the mod.

Returns

This function returns a pointer to the Slapi_Mod, wrapping the first mod, or NULL if no mod exists.

Description

Use this function in conjunction with slapi_mods_get_next_smod() to iterate through the mods in a Slapi_Mods using a Slapi_Mods wrapper.

Memory Concerns

Only one thread may be iterating through a particular Slapi_Mods at any given time.

See Also

slapi_mods_get_next_smod()