dsapi_ldif.h
Go to the documentation of this file.
1 /* Emacs mode: -*- C -*- */
2 
3 /*
4  * Copyright (c) 2006-2010, Isode Limited, London, England.
5  * All rights reserved.
6  *
7  * Acquisition and use of this software and related materials for any
8  * purpose requires a written licence agreement from Isode
9  * Limited, or a written licence from an organisation licenced by Isode
10  * Limited to grant such a licence.
11  *
12  */
13 
14 /*
15  * dsapi_ldif.h
16  *
17  * API methods for reading and writing LDIF files.
18  *
19  */
20 
21 /*
22  *
23  *
24  * @VERSION@
25  */
26 
27 #ifndef ISODE_DSAPI_LDIF_H
28 #define ISODE_DSAPI_LDIF_H
29 
30 #include <stddef.h>
31 #include <sys/stat.h>
32 #include <isode/ds/dsapi/dsapi_cdecl.h>
34 
84 LIBDSAPI_CDECL
86  const char *in_fnam,
87  const char *out_fnam,
88  DS_LDIF **ldif_p
89 );
90 
98 LIBDSAPI_CDECL
100  DS_LDIF *ldif
101 );
102 
129 LIBDSAPI_CDECL
131  DS_LDIF *ldif,
132  DS_Entry **entry_p
133 );
134 
159 LIBDSAPI_CDECL
161  DS_LDIF *ldif,
162  DS_DN **dn_p
163 );
164 
191 LIBDSAPI_CDECL
193  DS_LDIF *ldif1,
194  DS_LDIF *ldif2
195 );
196 
222 LIBDSAPI_CDECL
224  DS_LDIF *ldif,
225  const DS_Entry *entry
226 );
227 
244 LIBDSAPI_CDECL
246  DS_LDIF *ldif,
247  off_t *offset_p
248 );
249 
260 LIBDSAPI_CDECL
262  DS_LDIF *ldif,
263  off_t *offset_p
264 );
265 
280 LIBDSAPI_CDECL
282  DS_LDIF *ldif,
283  off_t offset
284 );
285 
302 LIBDSAPI_CDECL
304  DS_LDIF *ldif,
305  char **errstr_p
306 );
307 
308 
323 LIBDSAPI_CDECL
325  DS_LDIF *ldif,
326  const char *str
327 );
328 
349 LIBDSAPI_CDECL
351  const DS_Entry *entry,
352  char **str_p
353 );
354 
380 LIBDSAPI_CDECL
382  const char **str_p,
383  DS_Entry **entry_p,
384  int allow_unknown
385 );
386 
404 LIBDSAPI_CDECL
406  DS_LDIF *ldif,
407  int allow_unknown
408 );
409 
423 LIBDSAPI_CDECL
425  DS_LDIF *ldif,
426  int *allow_unknown_p
427 );
428 
433 #endif /* ISODE_DSAPI_LDIF_H */
struct DS_DN DS_DN
Definition: dsapi_types.h:103
DS_Status
Definition: dsapi_const.h:66
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_PutComment(DS_LDIF *ldif, const char *str)
Write a comment to the output LDIF file.
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_Entry2LDIFString(const DS_Entry *entry, char **str_p)
Convert an entry to an LDIF-encoded record in memory.
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_TellOutput(DS_LDIF *ldif, off_t *offset_p)
Return the current write-offset in the output file.
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.
DS_Status DS_LDIF_ErrorString(DS_LDIF *ldif, char **errstr_p)
Return a plain-text report of all errors encountered.
struct DS_Entry DS_Entry
Definition: dsapi_types.h:81
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_AllowUnknownAttrs(DS_LDIF *ldif, int allow_unknown)
Turn on or off the flag that allows unknown attributes to be read.
DS_Status DS_LDIF_Close(DS_LDIF *ldif)
Close the input/output LDIF files and release all associated resources.
DS_Status DS_LDIF_Seek(DS_LDIF *ldif, off_t offset)
Seek the input file to the given file-offset.
DS_Status DS_LDIF_GetDN(DS_LDIF *ldif, DS_DN **dn_p)
Get the DN of the next entry from the input LDIF file.
Directory API type definitions and forward declarations of private types.
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.
struct DS_LDIF DS_LDIF
Definition: dsapi_types.h:171
DS_Status DS_LDIF_Put(DS_LDIF *ldif, const DS_Entry *entry)
Write an entry to the output LDIF file.

All rights reserved © 2002 - 2024 Isode Ltd.