1/*	$NetBSD: LdifWriter.h,v 1.1.1.2 2010/03/08 02:14:14 lukem Exp $	*/
2
3// OpenLDAP: pkg/ldap/contrib/ldapc++/src/LdifWriter.h,v 1.2.2.1 2008/04/14 22:58:58 quanah Exp
4/*
5 * Copyright 2008, 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
16class 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