Summary: Isode provides a number of APIs which allow integrators and product developers to build components that allow client programs to connect to, query and modify data in the directory.
dsapi_entry.h File Reference

Directory client API methods for handling directory entries. More...

#include <stddef.h>
#include <isode/ds/dsapi/dsapi_cdecl.h>
#include <isode/ds/dsapi/dsapi_types.h>

Go to the source code of this file.

Functions

DS_Status DS_Entry_GetDN (const DS_Entry *entry, const DS_DN **dn_p)
 Get the DN of the given DS_Entry. More...
 
DS_Status DS_Entry_GetNewDN (const DS_Entry *entry, const DS_DN **dn_p)
 Get the New DN specified in the given DS_Entry. More...
 
DS_Status DS_Entry_GetDeleteOldRDN (const DS_Entry *entry, int *flag_p)
 Get the 'delete old RDN' flag for the given DS_Entry. More...
 
DS_Status DS_Entry_SetDN (DS_Entry *entry, const DS_DN *dn)
 Set the DN of the given DS_Entry. More...
 
DS_Status DS_Entry_SetNewDN (DS_Entry *entry, const DS_DN *new_dn)
 Set the 'new DN' of the given 'ModDN' DS_Entry. More...
 
DS_Status DS_Entry_SetDeleteOldRDN (DS_Entry *entry, int flag)
 Set the 'Delete Old RDN' flag of the given 'ModDN' DS_Entry. More...
 
DS_Status DS_Entry_IsNormal (const DS_Entry *entry)
 Check that this DS_Entry is a normal entry (i.e. not a change-entry). More...
 
DS_Status DS_Entry_IsChange (const DS_Entry *entry)
 Check that this DS_Entry is a change-entry, i.e. one of the types: Modify, Add, Delete or ModDN. More...
 
DS_Status DS_Entry_GetType (const DS_Entry *entry, DSEntryType *type_p)
 Get the type of a DS_Entry. More...
 
DS_Status DS_Entry_Convert (DS_Entry *entry, DSEntryType type)
 Convert a DS_Entry to another type of DS_Entry. More...
 
DS_Status DS_Entry_AddValues (DS_Entry *entry, const DS_Attr *attr)
 Append an add-attribute (with values) change to a DS_Entry. More...
 
DS_Status DS_Entry_DeleteValues (DS_Entry *entry, const DS_Attr *attr)
 Append a delete-attribute or delete-attribute-values change to a DS_Entry. More...
 
DS_Status DS_Entry_ReplaceValues (DS_Entry *entry, const DS_Attr *attr)
 Append a replace-attribute-values change to a DS_Entry. More...
 
const DS_EntryDS_EntryList_GetFirst (const DS_EntryList *entry_list)
 Get the first entry in a list of entries. More...
 
const DS_EntryDS_EntryList_GetNext (const DS_Entry *entry)
 Get the next entry in a list of entries. More...
 
DS_Status DS_Entry_New (DS_Entry **entryp)
 Create a DS_Entry structure for a Modify change-entry. More...
 
DS_Status DS_Entry_NewType (DS_Entry **entryp, DSEntryType type, const DS_DN *dn)
 Create a DS_Entry structure of the given type. More...
 
void DS_Entry_Delete (DS_Entry *entry)
 Free a DS_Entry. More...
 
void DS_EntryList_Delete (DS_EntryList *entry_list)
 Free a DS_Entry list. More...
 
DS_Status DS_Entry_Diff (const DS_Entry *entry1, const DS_Entry *entry2, DS_Entry **change_p)
 Compare two entries and generate a Modify change-entry with the differences. More...
 
DS_Status DS_Entry_Apply (const DS_Entry *entry1, const DS_Entry *change, DS_Entry **entry2_p)
 Apply a Modify or Add change-entry to a normal entry and return the result as a normal entry. More...
 

Detailed Description

Directory client API methods for handling directory entries.

These API methods implement access to and manipulation of directory entries in memory. Note that there are five types of DS_Entry corresponding to the five types of entry that may appear in an LDIF file: Normal (plain) entries, plus four types of change-entries: Modify, Delete, Add and ModDN. Normal entries are read-only and are returned by reading from a directory (e.g. using DS_ReadSync()) or from an LDIF file (e.g. DS_LDIF_Get()) and represent the static stored state of an entry. Change-entries represent modifications – either built up by the user or loaded from an LDIF – which can be applied to another entry, either in memory or remotely on the directory. In general, a function that accepts a DS_Entry will require either a normal entry or a change-entry (perhaps of a particular type), and will not work when given the incorrect type, returning DS_E_BADPARAM.

Definition in file dsapi_entry.h.