diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:32 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 16:35:32 +0000 |
commit | 5ea77a75dd2d2158401331879f3c8f47940a732c (patch) | |
tree | d89dc06e9f4850a900f161e25f84e922c4f86cc8 /contrib/ldapc++/src/LdifWriter.h | |
parent | Initial commit. (diff) | |
download | openldap-upstream.tar.xz openldap-upstream.zip |
Adding upstream version 2.5.13+dfsg.upstream/2.5.13+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'contrib/ldapc++/src/LdifWriter.h')
-rw-r--r-- | contrib/ldapc++/src/LdifWriter.h | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/contrib/ldapc++/src/LdifWriter.h b/contrib/ldapc++/src/LdifWriter.h new file mode 100644 index 0000000..10c487d --- /dev/null +++ b/contrib/ldapc++/src/LdifWriter.h @@ -0,0 +1,31 @@ +// $OpenLDAP$ +/* + * Copyright 2008-2022 The OpenLDAP Foundation, All Rights Reserved. + * COPYING RESTRICTIONS APPLY, see COPYRIGHT file + */ + +#ifndef LDIF_WRITER_H +#define LDIF_WRITER_H + +#include <LDAPEntry.h> +#include <iosfwd> +#include <list> + +class LdifWriter +{ + public: + LdifWriter( std::ostream& output, int version = 0 ); + void writeRecord(const LDAPEntry& le); + void writeIncludeRecord(const std::string& target); + + private: + void breakline( const std::string &line, std::ostream &out ); + + std::ostream& m_ldifstream; + int m_version; + bool m_addSeparator; + +}; + +#endif /* LDIF_WRITER_H */ + |