HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
33.37 slapi_mods_get_next_mod()
Description This function increments the Slapi_Mods iterator and returns the next LDAPMod.
Use this function in conjunction with “slapi_mods_get_first_mod()” to iterate through the mods
in a Slapi_Mods. This will return an LDAPMod each time until the end.
Syntax
#include "slapi-plugin.h"
LDAPMod *slapi_mods_get_next_mod(Slapi_Mods *smods);
Parameters This function takes the following parameter:
A pointer to an initialized Slapi_Mods.smod
Returns This function returns either a pointer to the next LDAPMod or NULL if there are no
more.
Memory concerns Only one thread may be iterating through a particular Slapi_Mods at any
given time.
See also “slapi_mods_get_first_mod()”
33.38 slapi_mods_get_next_smod()
Description This function increments the Slapi_Mods iterator and returns the next mod
wrapped in a Slapi_Mods. Use this function in conjunction with “slapi_mods_get_first_smod()”
to iterate through the mods in a Slapi_Mods using a Slapi_Mods wrapper.
Syntax
#include "slapi-plugin.h"
Slapi_Mod *slapi_mods_get_next_smod(Slapi_Mods *smods,
Slapi_Mod *smod);
Parameters This function takes the following parameters:
Pointer to an initialized Slapi_Mods.mods
Pointer to a Slapi_Mods that will be used to hold the mod.smod
Returns This function returns a pointer to the Slapi_Mod, wrapping the next mod, or NULL if
there are no more mods.
Memory concerns Only one thread may be iterating through a particular Slapi_Mods at any
given time.
See also “slapi_mods_get_first_smod()”
33.39 slapi_mods_get_num_mods()
Gets the number of mods in a Slapi_Mods structure.
Syntax
#include "slapi-plugin.h"
int slapi_mods_get_num_mods(const Slapi_Mods *smods);
Parameters This function takes the following parameter:
Pointer to an initialized Slapi_Mods.mods
Returns This function returns the number of mods in Slapi_Mods.
33.37 slapi_mods_get_next_mod() 279