HP-UX Directory Server 8.1 plug-in reference

Table Of Contents
33.43 slapi_mods_insert_after()
Description This function inserts an LDAPMod in a Slapi_Mods immediately after the current
position of the Slapi_Mods iterator. The iterator position is unchanged.
Syntax
#include "slapi-plugin.h"
void slapi_mods_insert_after(Slapi_Mods *smods, LDAPMod *mod);
Parameters This function takes the following parameters:
Pointer to an initialized Slapi_Mods with a valid iterator position.mods
Pointer to the LDAPMod to be inserted.mod
Memory concerns Responsibility for the LDAPMod is transferred to the Slapi_Mods. This
function must not be used on a Slapi_Mods initialized with slapi_mods_init_byref().
See also
“slapi_mods_get_first_mod()”
“slapi_mods_get_next_mod()”
“slapi_mods_get_first_smod()”
“slapi_mods_get_next_smod()”
33.44 slapi_mods_insert_at()
Description This function inserts an LDAPMod at a given position pos in Slapi_Mods. Position
0 (zero) refers to the first mod. A position equal to the current number of mods(determined by
slapi_mods_get_num_mods()) causes an append mods at and above the specified position
are moved up by one, and the given position refers to the newly inserted mod. Shift everything
down to make room to insert the new mod.
Syntax
#include "slapi-plugin.h"
void slapi_mods_insert_at(Slapi_Mods *smods, LDAPMod *mod,
int pos);
Parameters This function takes the following parameters:
Pointer to an initialized Slapi_Mods.mods
Pointer to the LDAPMod to be inserted.mod
Position at which to insert the new mod. Minimum value is 0. Maximum value is the
current number of mods.
pos
Memory concerns Responsibility for the LDAPMod is transferred to the Slapi_Mods. This
function must not be used on a Slapi_Mods initialized with “slapi_mods_init_byref()”.
See also “slapi_mods_insert_at()”
“slapi_mods_insert_at()” adds to the end of all mods.
33.45 slapi_mods_insert_before()
Description Inserts an LDAPMod into a Slapi_Mods immediately before the current position
of the Slapi_Mods iterator. The iterator position is unchanged.
Syntax
#include "slapi-plugin.h"
void slapi_mods_insert_before(Slapi_Mods *smods, LDAPMod *mod);
33.43 slapi_mods_insert_after() 281