# Path: ldaptor/protocols/ldap/ldifprotocol.py
# class LDIFParseError(Exception):
# class LDIFLineWithoutSemicolonError(LDIFParseError):
# class LDIFEntryStartsWithNonDNError(LDIFParseError):
# class LDIFEntryStartsWithSpaceError(LDIFParseError):
# class LDIFVersionNotANumberError(LDIFParseError):
# class LDIFUnsupportedVersionError(LDIFParseError):
# class LDIFTruncatedError(LDIFParseError):
# class LDIF(object, basic.LineReceiver):
#     def __str__(self):
#     def logicalLineReceived(self, line):
#     def lineReceived(self, line):
#     def parseValue(self, val):
#     def _parseLine(self, line):
#     def state_HEADER(self, line):
#     def state_WAIT_FOR_DN(self, line):
#     def state_IN_ENTRY(self, line):
#     def gotEntry(self, obj):
#     def connectionLost(self, reason=protocol.connectionDone):
# HEADER = 'HEADER'
# WAIT_FOR_DN = 'WAIT_FOR_DN'
# IN_ENTRY = 'IN_ENTRY'
# 
# Path: ldaptor/delta.py
# class Modification(attributeset.LDAPAttributeSet):
# class Add(Modification):
# class Delete(Modification):
# class Replace(Modification):
# class Operation(object):
# class ModifyOp(Operation):
# class AddOp(Operation):
# class DeleteOp(Operation):
#     def patch(self, entry):
#     def asLDAP(self):
#     def __eq__(self, other):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#     def __init__(self, dn, modifications=[]):
#     def asLDIF(self):
#     def asLDAP(self):
#     def _getClassFromOp(class_, op):
#     def fromLDAP(class_, request):
#     def patch(self, root):
#         def gotEntry(entry, modifications):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotParent(parent, entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, dn):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotEntry(entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     _LDAP_OP = None
#     _LDAP_OP = 0
#     _LDAP_OP = 1
#     _LDAP_OP = 2
# 
# Path: ldaptor/entry.py
# def sshaDigest(passphrase, salt=None):
#     def __init__(self, dn, attributes={}):
#     def buildAttributeSet(self, key, values):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def has_key(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __len__(self):
#     def __nonzero__(self):
#     def __repr__(self):
#     def diff(self, other):
#     def bind(self, password):
#     def _bind(self, password):
#     def hasMember(self, dn):
#     def __hash__(self):
#     def __setitem__(self, key, value):
#     def __delitem__(self, key):
#     def undo(self):
#     def commit(self):
#     def move(self, newDN):
#     def delete(self):
#     def setPassword(self, newPasswd, salt=None):
# class BaseLDAPEntry(object):
# class EditableLDAPEntry(BaseLDAPEntry):


from twisted.python.failure import Failure
from twisted.internet import error
from ldaptor.protocols.ldap import ldifprotocol
from ldaptor import delta, entry
            raise LDIFDeltaModificationMissingEndDashError

        if line == '-':
            mod = self.MOD_SPEC_TO_DELTA[self.mod_spec]
            de = mod(self.mod_spec_attr, self.mod_spec_data)
            self.modifications.append(de)
            del self.mod_spec
            del self.mod_spec_attr
            del self.mod_spec_data
            self.mode = WAIT_FOR_MOD_SPEC
            return

        key, val = self._parseLine(line)

        if key != self.mod_spec_attr:
            raise LDIFDeltaModificationDifferentAttributeTypeError, \
                  (key, self.mod_spec_attr)

        self.mod_spec_data.append(val)

    def state_IN_ADD_ENTRY(self, line):
        assert self.dn is not None, 'self.dn must be set when in entry'
        assert self.data is not None, 'self.data must be set when in entry'

        if line == '':
            # end of entry
            if not self.data:
                raise LDIFDeltaAddMissingAttributesError, \
                      self.dn
            self.mode = ldifprotocol.WAIT_FOR_DN

# Path: ldaptor/protocols/ldap/ldifprotocol.py
# class LDIFParseError(Exception):
# class LDIFLineWithoutSemicolonError(LDIFParseError):
# class LDIFEntryStartsWithNonDNError(LDIFParseError):
# class LDIFEntryStartsWithSpaceError(LDIFParseError):
# class LDIFVersionNotANumberError(LDIFParseError):
# class LDIFUnsupportedVersionError(LDIFParseError):
# class LDIFTruncatedError(LDIFParseError):
# class LDIF(object, basic.LineReceiver):
#     def __str__(self):
#     def logicalLineReceived(self, line):
#     def lineReceived(self, line):
#     def parseValue(self, val):
#     def _parseLine(self, line):
#     def state_HEADER(self, line):
#     def state_WAIT_FOR_DN(self, line):
#     def state_IN_ENTRY(self, line):
#     def gotEntry(self, obj):
#     def connectionLost(self, reason=protocol.connectionDone):
# HEADER = 'HEADER'
# WAIT_FOR_DN = 'WAIT_FOR_DN'
# IN_ENTRY = 'IN_ENTRY'
# 
# Path: ldaptor/delta.py
# class Modification(attributeset.LDAPAttributeSet):
# class Add(Modification):
# class Delete(Modification):
# class Replace(Modification):
# class Operation(object):
# class ModifyOp(Operation):
# class AddOp(Operation):
# class DeleteOp(Operation):
#     def patch(self, entry):
#     def asLDAP(self):
#     def __eq__(self, other):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#     def __init__(self, dn, modifications=[]):
#     def asLDIF(self):
#     def asLDAP(self):
#     def _getClassFromOp(class_, op):
#     def fromLDAP(class_, request):
#     def patch(self, root):
#         def gotEntry(entry, modifications):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, entry):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotParent(parent, entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __init__(self, dn):
#     def asLDIF(self):
#     def patch(self, root):
#         def gotEntry(entry):
#     def __repr__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     _LDAP_OP = None
#     _LDAP_OP = 0
#     _LDAP_OP = 1
#     _LDAP_OP = 2
# 
# Path: ldaptor/entry.py
# def sshaDigest(passphrase, salt=None):
#     def __init__(self, dn, attributes={}):
#     def buildAttributeSet(self, key, values):
#     def __getitem__(self, key):
#     def get(self, key, default=None):
#     def has_key(self, key):
#     def __contains__(self, key):
#     def keys(self):
#     def items(self):
#     def __str__(self):
#     def __eq__(self, other):
#     def __ne__(self, other):
#     def __len__(self):
#     def __nonzero__(self):
#     def __repr__(self):
#     def diff(self, other):
#     def bind(self, password):
#     def _bind(self, password):
#     def hasMember(self, dn):
#     def __hash__(self):
#     def __setitem__(self, key, value):
#     def __delitem__(self, key):
#     def undo(self):
#     def commit(self):
#     def move(self, newDN):
#     def delete(self):
#     def setPassword(self, newPasswd, salt=None):
# class BaseLDAPEntry(object):
# class EditableLDAPEntry(BaseLDAPEntry):


# Path: ldaptor/protocols/ldap/ldifdelta.py
from twisted.python.failure import Failure
from twisted.internet import error
from ldaptor.protocols.ldap import ldifprotocol
from ldaptor import delta, entry

            raise LDIFDeltaModificationMissingEndDashError

        if line == '-':
            mod = self.MOD_SPEC_TO_DELTA[self.mod_spec]
            de = mod(self.mod_spec_attr, self.mod_spec_data)
            self.modifications.append(de)
            del self.mod_spec
            del self.mod_spec_attr
            del self.mod_spec_data
            self.mode = WAIT_FOR_MOD_SPEC
            return

        key, val = self._parseLine(line)

        if key != self.mod_spec_attr:
            raise LDIFDeltaModificationDifferentAttributeTypeError, \
                  (key, self.mod_spec_attr)

        self.mod_spec_data.append(val)

    def state_IN_ADD_ENTRY(self, line):
        assert self.dn is not None, 'self.dn must be set when in entry'
        assert self.data is not None, 'self.data must be set when in entry'

        if line == '':
            # end of entry
            if not self.data:
                raise LDIFDeltaAddMissingAttributesError, \
                      self.dn
            self.mode = ldifprotocol.WAIT_FOR_DN

            o = delta.AddOp(entry.BaseLDAPEntry(dn=self.dn,