|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Functions | |
| DS_Status | DS_LDIF_Open (const char *in_fnam, const char *out_fnam, DS_LDIF **ldif_p) |
| Open an LDIF stream handle with input and/or output LDIF files. | |
| DS_Status | DS_LDIF_Close (DS_LDIF *ldif) |
| Close the input/output LDIF files and release all associated resources. | |
| DS_Status | DS_LDIF_Get (DS_LDIF *ldif, DS_Entry **entry_p) |
| Get the next entry from the input LDIF file. | |
| DS_Status | DS_LDIF_GetDN (DS_LDIF *ldif, DS_DN **dn_p) |
| Get the DN of the next entry from the input LDIF file. | |
| DS_Status | DS_LDIF_GetPut (DS_LDIF *ldif1, DS_LDIF *ldif2) |
| Copy an entry across from one LDIF file to another. | |
| DS_Status | DS_LDIF_Put (DS_LDIF *ldif, const DS_Entry *entry) |
| Write an entry to the output LDIF file. | |
| DS_Status | DS_LDIF_TellOutput (DS_LDIF *ldif, off_t *offset_p) |
| Return the current write-offset in the output file. | |
| DS_Status | DS_LDIF_Tell (DS_LDIF *ldif, off_t *offset_p) |
| Return the current read-offset in the input file. | |
| DS_Status | DS_LDIF_Seek (DS_LDIF *ldif, off_t offset) |
| Seek the input file to the given file-offset. | |
| DS_Status | DS_LDIF_ErrorString (DS_LDIF *ldif, char **errstr_p) |
| Return a plain-text report of all errors encountered. | |
| DS_Status | DS_LDIF_PutComment (DS_LDIF *ldif, const char *str) |
| Write a comment to the output LDIF file. | |
| DS_Status | DS_LDIF_Entry2LDIFString (const DS_Entry *entry, char **str_p) |
| Convert an entry to an LDIF-encoded record in memory. | |
| DS_Status | DS_LDIF_LDIFString2Entry (const char **str_p, DS_Entry **entry_p, int allow_unknown) |
| Convert an LDIF-encoded record in memory into a DS_Entry. | |
| DS_Status | DS_LDIF_AllowUnknownAttrs (DS_LDIF *ldif, int allow_unknown) |
| Turn on or off the flag that allows unknown attributes to be read. | |
| DS_Status | DS_LDIF_GetAllowUnknownAttrs (DS_LDIF *ldif, int *allow_unknown_p) |
| Get the state of the flag that allows unknown attributes to be read. | |
These API methods allow LDIF files to be read and written. Random access is permitted to input files after the first read-through, via DS_LDIF_Tell() and DS_LDIF_Seek().
Reading and writing change-records is supported. However, note that a single LDIF stream can either handle all change-records, or all normal-records, but not both at the same time. This applies to writing as well as reading.
Definition in file dsapi_ldif.h.