xref: /netbsd-src/external/bsd/openldap/dist/contrib/ldapc++/src/LdifWriter.h (revision 549b59ed3ccf0d36d3097190a0db27b770f3a839)
1 /*	$NetBSD: LdifWriter.h,v 1.3 2021/08/14 16:14:49 christos Exp $	*/
2 
3 // $OpenLDAP$
4 /*
5  * Copyright 2008-2021 The OpenLDAP Foundation, All Rights Reserved.
6  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
7  */
8 
9 #ifndef LDIF_WRITER_H
10 #define LDIF_WRITER_H
11 
12 #include <LDAPEntry.h>
13 #include <iosfwd>
14 #include <list>
15 
16 class LdifWriter
17 {
18     public:
19         LdifWriter( std::ostream& output, int version = 0 );
20         void writeRecord(const LDAPEntry& le);
21         void writeIncludeRecord(const std::string& target);
22 
23     private:
24         void breakline( const std::string &line, std::ostream &out );
25 
26         std::ostream& m_ldifstream;
27         int m_version;
28         bool m_addSeparator;
29 
30 };
31 
32 #endif /* LDIF_WRITER_H */
33 
34