2008-03-28 07:05:10 -04:00
|
|
|
// $OpenLDAP$
|
2008-03-27 13:02:37 -04:00
|
|
|
/*
|
2011-03-28 21:08:19 -04:00
|
|
|
* Copyright 2008-2011 The OpenLDAP Foundation, All Rights Reserved.
|
2008-03-27 13:02:37 -04:00
|
|
|
* 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 */
|
|
|
|
|
|